Spaces in path : VScode + PlatformIO

Hello everyone!

I’m using PlatformIO with VSCode for STM32 platform (mbed) under Windows 10.

I have an issue, that seems to be a problem of spaces in username (problem doesn’t reproduce on other computer with no spaces in username and the same OS and environment).
When I’m trying to build the project it give the error:


Generating LD script .pioenvs\bluepill_f103c8\STM32F103XB.ld.link_script.ld
arm-none-eabi-cpp: error: C:\users\Iegor: No such file or directory
arm-none-eabi-cpp: warning: ‘-x c’ after last input file has no effect
Compiling .pioenvs\bluepill_f103c8\lib182\TextLCD_ID184\TextLCD.o
Compiling .pioenvs\bluepill_f103c8\lib00f\mbed-STM32F103C8T6_ID2508\SysClockConf.o
*** [.pioenvs\bluepill_f103c8\STM32F103XB.ld.link_script.ld] Error 1


How to fix it? Updating - didn’t help.
VSCode version : 1.24.0
PlatformIO : Home 0.9.6·Core 3.6.0a2

P.S. During the brief look, I noticed that during building there is creation of file main.d, and it is the only file, where path are not covered with quotes.
File is located “project_folder”.pioenvs\bluepill_f103c8\src\main.d

Fragment from the inside (about 200 lines in total):


.pioenvs\bluepill_f103c8\src\main.o: src\main.cpp
C:\users\User\ Name\.platformio\packages\framework-mbed\platformio\variants\BLUEPILL_F103C8/mbed_config.h
C:\users\User\ Name\.platformio\lib\mbed-STM32F103C8T6_ID2508/stm32f103c8t6.h
C:\users\User\ Name\.platformio\lib\mbed-STM32F103C8T6_ID2508/PinNames.h \


Could it be the reason of problem?

Do you have a space in your username?

Do you use the latest version of dev/platform? We fixed this issue in the latest release. Please run pio update.

User name in Windows is Iegor Pererva.

Yes, I’ve updated it with “pio update”:

And after that I do still have that issue:

P.S. Sorry for splitting answer into 2 posts, new users can attach only one image per post.

Please open PIO IDE Terminal, button on bottom toolbar, and type ‘pio run -v`

Please provide output here.

C:\Users\Iegor Pererva\Documents\PlatformIO\Projects\RABR_DRIVER>pio run -v
[06/14/18 14:57:12] Processing bluepill_f103c8 (platform: ststm32; build_flags: -D PIO_FRAMEWORK_MBED_EVENTS_PRESENT -D PIO_FRAMEWORK_MBED_RTOS_PRESENT; board: bluepill_f103c8; framework: mbed)

PLATFORM: ST STM32 > BluePill F103C8
SYSTEM: STM32F103C8T6 72MHz 20KB RAM (64KB Flash)
DEBUG: CURRENT(blackmagic) EXTERNAL(blackmagic, jlink, stlink)
Library Dependency Finder → Library Dependency Finder (LDF) — PlatformIO latest documentation
Collected 20 compatible libraries
Scanning dependencies…
Dependency Graph
|-- (C:\Users\Iegor Pererva.platformio\packages\framework-mbed\rtos)
|-- (C:\Users\Iegor Pererva.platformio\lib\TextLCD_ID184)
|-- (C:\Users\Iegor Pererva.platformio\lib\mbed-STM32F103C8T6_ID2508)
arm-none-eabi-cpp -E -P -mcpu=cortex-m3 -mthumb -Wl,–gc-sections -Wl,–wrap,main -Wl,–wrap,_malloc_r -Wl,–wrap,_free_r -Wl,–wrap,_realloc_r -Wl,–wrap,_memalign_r -Wl,–wrap,_calloc_r -Wl,–wrap,exit -Wl,–wrap,atexit -Wl,-n ““C:\Users\Iegor Pererva.platformio\packages\framework-mbed\targets\TARGET_STM\TARGET_STM32F1\TARGET_BLUEPILL_F103C8\device\TOOLCHAIN_GCC_ARM\STM32F103XB.ld”” -o .pioenvs\bluepill_f103c8\STM32F103XB.ld.link_script.ld
arm-none-eabi-cpp: error: C:\Users\Iegor: No such file or directory
arm-none-eabi-cpp: warning: ‘-x c’ after last input file has no effect
*** [.pioenvs\bluepill_f103c8\STM32F103XB.ld.link_script.ld] Error 1
============================================================================== [ERROR] Took 5.35 seconds ==============================================================================

Could you try upstream version of stm32 dev/platform? ST STM32 — PlatformIO latest documentation

I’ve just made some fix

1 Like


Thank you very much!

Thanks! We will make hot fix release for all mbed supported dev/platforms in the next hours.

Happy coding with PlatformIO!

1 Like

I am getting this same problem with build_flags in the platformio.ini, for atmelsam builds.


Creates an “arm-none-eabi-g++: error: xxxxxxxx: No such file or directory”

Try changing the backslash (\) between ${PROJECTSRC_DIR} and flash_without_bootloader.ld to a forward slash (/) - backslash is an escape character. If you look at the path shown in the error, you’ll see there’s no backslash between src and flash_without_bootloader.ld.


The below finds the file for me - although in my case it’s empty just so that it exists.

platform = atmelsam
framework = arduino
board = mzeropro
debug_tool = atmel-ice
upload_protocol = atmel-ice
build_flags = -Wl,-T${PROJECTSRC_DIR}/flash_without_bootloader.ld

I have the same problem with the latest version of PlatformIO (5.0.1). My Windows username contains a space and I am unable to create a project with Espressif IoT Development Framework.

Is this a problem related to PlatformIO in VScode or is it related to the Espressif framework? It works fine when I create a project with the Arduino framework.

PIO Core Call Error: "The current working directory C:\\Users\\Cori TG0\\Documents\\PlatformIO\\Projects\\test3 will be used for the project.\r\n\r\nThe next files/directories have been created in C:\\Users\\Cori TG0\\Documents\\PlatformIO\\Projects\\test3\r\ninclude - Put project header files here\r\nlib - Put here project specific (private) libraries\r\nsrc - Put project source files here\r\nplatformio.ini - Project Configuration File\r\n\n\nError: Processing featheresp32 (platform: espressif32; board: featheresp32; framework: espidf)\r\n--------------------------------------------------------------------------------\r\nVerbose mode can be enabled via `-v, --verbose` option\r\nCONFIGURATION:\r\nPLATFORM: Espressif 32 (2.0.0+sha.3688b7b) > Adafruit ESP32 Feather\r\nHARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash\r\nDEBUG: Current (esp-prog) External (esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)\r\nPACKAGES: \r\n - framework-espidf 3.40100.200827 (4.1.0) \r\n - tool-cmake 3.16.4 \r\n - tool-esptoolpy 1.20600.0 (2.6.0) \r\n - tool-idf 1.0.1 \r\n - tool-mconf 1.4060000.20190628 (406.0.0) \r\n - tool-ninja 1.9.0 \r\n - toolchain-esp32ulp 1.22851.191205 (2.28.51) \r\n - toolchain-xtensa32 2.80200.200827 (8.2.0)\r\nInstalling ESP-IDF's Python dependencies\r\n'C:\\Users\\Cori' is not recognized as an internal or external command,\r\noperable program or batch file.\r\n*** Error 1\r\nInstalling windows-curses package\r\n'C:\\Users\\Cori' is not recognized as an internal or external command,\r\noperable program or batch file.\r\n*** Error 1\r\nError: Detected a whitespace character in project paths.\r\n========================== [FAILED] Took 0.97 seconds =========================="

Your path has spaces and thus goes against the documented limitations of Espressif’s ESP-IDF build system: Espressif IoT Development Framework — PlatformIO latest documentation