Arm-none-eabi-gcc: error:

I’m just new on PIO. Maybe I was just to stupid to find it on teh forum…

When i try to compile my blinky i get that error (arm-none-eabi-gcc: error:) and a warning (Warning! Cannot find a linker script for the required board!)

Maybe someone can help me


PS C:\Users\thinkpad x250\Documents\PlatformIO\Projects\Test bluepill stm32> pio run -v
Processing bluepill_f103c8 (platform: ststm32; board: bluepill_f103c8; framework: stm32cube)

CONFIGURATION: Redirecting...
PLATFORM: ST STM32 > BluePill F103C8
HARDWARE: STM32F103C8T6 72MHz 20KB RAM (64KB Flash)
DEBUG: CURRENT(stlink) EXTERNAL(blackmagic, jlink, stlink)
Warning! Cannot find a linker script for the required board! Firmware will be linked with a default linker script!
Library Dependency Finder → Library Dependency Finder (LDF) — PlatformIO latest documentation
Collected 11 compatible libraries
Scanning dependencies…
No dependencies
arm-none-eabi-gcc -o .pioenvs\bluepill_f103c8\firmware.elf -T C:\Users\thinkpad x250.platformio\packages\framework-stm32cube\platformio\ldscripts\STM32F103C8_DEFAULT.ld -Os -Wl,–gc-sections,–relax -mthumb -mcpu=cortex-m3
–specs=nano.specs --specs=nosys.specs .pioenvs\bluepill_f103c8\src\main.o “-LC:\Users\thinkpad x250.platformio\platforms\ststm32\ldscripts” -L.pioenvs\bluepill_f103c8 “-LC:\Users\thinkpad x250.platformio\packages\framework-stm32cube\f1\Drivers\CMSIS\Lib\GCC” “-LC:\Users\thinkpad x250.platformio\packages\framework-stm32cube\platformio\ldscripts” -Wl,–start-group -lc -lgcc -lm -lstdc++ -lnosys .pioenvs\bluepill_f103c8\libFrameworkHALDriver.a .pioenvs\bluepill_f103c8\libFrameworkCMSISDevice.a -Wl,–end-group
arm-none-eabi-gcc: error: x250.platformio\packages\framework-stm32cube\platformio\ldscripts\STM32F103C8_DEFAULT.ld: No such file or directory
*** [.pioenvs\bluepill_f103c8\firmware.elf] Error 1
========================================== [ERROR] Took 5.04 seconds ==========================================
PS C:\Users\thinkpad x250\Documents\PlatformIO\Projects\Test bluepill stm32>

State your full platformio.ini please.

; PlatformIO Project Configuration File
; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags
; Library options: dependencies, extra library storages
; Advanced options: extra scripting
; Please visit documentation for the other options and examples
platform = ststm32
board = bluepill_f103c8
framework = stm32cube

Not reproducable for me.

arm-none-eabi-g++ -o .pioenvs\debug_env\firmware.elf -T C:\Users\Maxi\.platformio\packages\framework-stm32cube\platformio\ldscripts\STM32F103C8_DEFAULT.ld -Os -Wl,--gc-sections,--relax -mthumb -mcpu=cortex-m3 --specs=nano.specs --specs=nosys.specs .pioenvs\debug_env\src\main.o -LC:\Users\Maxi\.platformio\platforms\ststm32\ldscripts -L.pioenvs\debug_env -LC:\Users\Maxi\.platformio\packages\framework-stm32cube\f1\Drivers\CMSIS\Lib\GCC -LC:\Users\Maxi\.platformio\packages\framework-stm32cube\platformio\ldscripts -Wl,--start-group -lc -lgcc -lm -lstdc++ -lnosys .pioenvs\debug_env\libFrameworkHALDriver.a .pioenvs\debug_env\libFrameworkCMSISDevice.a -Wl,--end-group
MethodWrapper(["checkprogsize"], [".pioenvs\debug_env\firmware.elf"])
arm-none-eabi-objcopy -O binary .pioenvs\debug_env\firmware.elf .pioenvs\debug_env\firmware.bin
Memory Usage ->
DATA:    [          ]   0.1% (used 28 bytes from 20480 bytes)
PROGRAM: [          ]   0.6% (used 392 bytes from 65536 bytes)
 [SUCCESS] Took 4.05 seconds 

Ah, from the way your PIO tries to link the archive files together I can tell you the error: Update your PlatformIO installation and all platforms (ststm32 specifically). You’ve got an old version. Either via the CLI (pio platform update) or the VSCode GUI.

1 Like


did all the updates

I still have the same issue.

Just saw the problem tab tell me this.
cannot open source file “stdint.h”

I’d just uninstall and reinstall the PlatformIO extension at this point to get a clean state.

1 Like

Please remove %USERHOMEDIR%/.platformio/packages/framework-stm32cube directory and try again. Also, please check that antivirus tools don’t block PlatformIO build system.