PlatformIO Mbed framework build Error on Windows

Here is my platform.ini file

[env:nrf52840_dk]
platform = nordicnrf52
framework = mbed
board = nrf52840_dk
build_flags = -DPIO_FRAMEWORK_MBED_RTOS_PRESENT

Here is my Log.
I am building on Visual studio code (Windows). This Error only happens on Windows System. Linux and Mac are working well.

Executing task: C:\Users\yongkang.song.platformio\penv\Scripts\platformio.exe run <
Processing nrf52840_dk (platform: nordicnrf52; framework: mbed; board: nrf52840_dk)
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via -v, --verbose option
CONFIGURATION: Redirecting...
PLATFORM: Nordic nRF52 3.7.0 > Nordic nRF52840-DK
HARDWARE: NRF52840 64MHz, 256KB RAM, 1MB Flash
DEBUG: Current (cmsis-dap) On-board (cmsis-dap, jlink) External (blackmagic, stlink)
PACKAGES: toolchain-gccarmnoneeabi 1.70201.0 (7.2.1), framework-mbed 5.51304.190826 (5.13.4), tool-sreccat 1.164.0 (1.64)
Collecting mbed sources…
LDF: Library Dependency Finder → Library Dependency Finder (LDF) — PlatformIO latest documentation
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 0 compatible libraries
Scanning dependencies…
No dependencies
Compiling .pio\build\nrf52840_dk\FrameworkMbed\cmsis\TARGET_CORTEX_M\mbed_tz_context.o
arm-none-eabi-gcc: error: CreateProcess: No such file or directory
Compiling .pio\build\nrf52840_dk\FrameworkMbed\components\802.15.4_RF\atmel-rf-driver\source\NanostackRfPhyAtmel.o
arm-none-eabi-g++: error: CreateProcess: No such file or directory
Compiling .pio\build\nrf52840_dk\FrameworkMbed\components\802.15.4_RF\atmel-rf-driver\source\at24mac.o
arm-none-eabi-g++: error: CreateProcess: No such file or directory
*** [.pio\build\nrf52840_dk\FrameworkMbed\cmsis\TARGET_CORTEX_M\mbed_tz_context.o] Error 1
*** [.pio\build\nrf52840_dk\FrameworkMbed\components\802.15.4_RF\atmel-rf-driver\source\NanostackRfPhyAtmel.o] Error 1
*** [.pio\build\nrf52840_dk\FrameworkMbed\components\802.15.4_RF\atmel-rf-driver\source\at24mac.o] Error 1
Compiling .pio\build\nrf52840_dk\FrameworkMbed\components\802.15.4_RF\mcr20a-rf-driver\source\MCR20Drv.o
arm-none-eabi-gcc: error: CreateProcess: No such file or directory
*** [.pio\build\nrf52840_dk\FrameworkMbed\components\802.15.4_RF\mcr20a-rf-driver\source\MCR20Drv.o] Error 1

  • Do you have a 64-bit or 32-bit Windows and CPU?
  • when you open cmd.exe and execute C:\Users\yongkang.song\.platformio\toolchain-gccarmnoneeabi\bin\arm-none-eabi-gcc.exe --version what is the output? (assuming the username is correct)
  • Do you have space in your username or in the path to the project?
  • I am using Windows 64bit.
  • I think the Path should be

C:\Users\yongkang.song.platformio\packages\toolchain-gccarmnoneeabi\bin\arm-none-eabi-gcc.exe --version

  • Here is my result

C:\Users\yongkang.song>C:\Users\yongkang.song.platformio\packages\toolchain-gccarmnoneeabi\bin\arm-none-eabi-gcc.exe --version
arm-none-eabi-gcc.exe (GNU Tools for Arm Embedded Processors 7-2017-q4-major) 7.2.1 20170904 (release) [ARM/embedded-7-branch revision 255204]
Copyright (C) 2017 Free Software Foundation, Inc.

  • There is no space in my path. Also I tried this on several computers. None of Windows PC build success. Linux and Mac all working fine.

Can you please use Markdown styling because otherwise the formatting gets messed up, but it’s critical here. Just use the 3 backticks style.