PlatformIO Community

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.

Yes.
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 -> http://bit.ly/configure-pio-ldf
LDF MODES: FINDER(chain) COMPATIBILITY(soft)
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? http://docs.platformio.org/en/latest/platforms/ststm32.html#upstream

I’ve just made some fix

1 Like

Fixed!

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.

image

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.

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