-
Notifications
You must be signed in to change notification settings - Fork 53
Error while building project - no such file or directory #1
Comments
confirmed, removing all the spaces from all paths, resulted in a successful build |
True, adding files/folder sources to workspace that contain spaces throws error on make command. GNU Make does not handle paths with spaces at all. Also, currently implemented makefile parser does not handle spaces. So, life is better if you generally avoid spaces in paths. I will add this note to readme files. |
I mostly avoid spaces in any path, but since your tutorial video contained a lot of them, I guessed it was OK, also I think paths can have spaces if you enclose them in double quotes. |
I read the readme,
my project path didn't have any spaces, it was the executables path that caused the problem, you can see the exact error message in my first post. |
Very strange. I am currently working with all, GCC, make, OpenOCD and other paths that include spaces:
|
yeah, I saw that in your video and thats odd.
No, Here are the current paths:
the previous path were the same as above but included some spacing instead of dashes |
Can't reproduce. Your setup seems OK (according to the buildData.json, tasks.json and other files inside |
If you have a specific set of configurations in mind, tell me to try to reproduce the error with that.
to the Build Project task. like this:
|
Well, the best you can do is to reproduce the error and send me exact copy of complete workspace. Usually quoting paths on windows solve problems with spaces, but since VS Code task arguments are automatically quoted with I've had a hard time finding the right way to generate Bottom line, I won't change&commit anything untill I can't reproduce exact error. |
well I tried to reproduce the error in power shell with no luck, note the space in D:/STMicroelectronics/GNU-MCU-Eclipse/Build-Tools/2.11-20180428-1604/bin/make.exe 'GCC_PATH=D:/GNU Tools-Arm-Embedded/7-2018-q2-update/bin'
D:/GNU Tools-Arm-Embedded/7-2018-q2-update/bin/arm-none-eabi-gcc -c -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -DAVOID_EMPTY_DEFINE_FIELD_C -DUSE_HAL_DRIVER -DSTM32F446xx -IInc -IDrivers/STM32F4xx_HAL_Driver/Inc -IDrivers/STM32F4xx_HAL_Driver/Inc/Legacy -IDrivers/CMSIS/Device/ST/STM32F4xx/Include -IDrivers/CMSIS/Include -Og -Wall -fdata-sections -ffunction-sections -g -gdwarf-2 -MMD -MP -MF"build/main.d" -Wa,-a,-ad,-alms=build/main.lst Src/main.c -o build/main.o
D:/GNU Tools-Arm-Embedded/7-2018-q2-update/bin/arm-none-eabi-gcc build/main.o build/stm32f4xx_it.o build/stm32f4xx_hal_msp.o build/stm32f4xx_hal_tim.o build/stm32f4xx_hal_tim_ex.o build/stm32f4xx_hal_uart.o build/stm32f4xx_hal_rcc.o build/stm32f4xx_hal_rcc_ex.o build/stm32f4xx_hal_flash.o build/stm32f4xx_hal_flash_ex.o build/stm32f4xx_hal_flash_ramfunc.o build/stm32f4xx_hal_gpio.o build/stm32f4xx_hal_dma_ex.o build/stm32f4xx_hal_dma.o build/stm32f4xx_hal_pwr.o build/stm32f4xx_hal_pwr_ex.o build/stm32f4xx_hal_cortex.o build/stm32f4xx_hal.o build/system_stm32f4xx.o build/startup_stm32f446xx.o -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -specs=nano.specs -TSTM32F446RETx_FLASH.ld -lc -lm -lnosys -Wl,-Map=build/vsCodeTest.map,--cref -Wl,--gc-sections -o build/vsCodeTest.elf
D:/GNU Tools-Arm-Embedded/7-2018-q2-update/bin/arm-none-eabi-size build/vsCodeTest.elf
text data bss dec hex filename
5868 20 1636 7524 1d64 build/vsCodeTest.elf
D:/GNU Tools-Arm-Embedded/7-2018-q2-update/bin/arm-none-eabi-objcopy -O ihex build/vsCodeTest.elf build/vsCodeTest.hex
D:/GNU Tools-Arm-Embedded/7-2018-q2-update/bin/arm-none-eabi-objcopy -O binary -S build/vsCodeTest.elf build/vsCodeTest.bin then I switched back to MSYS bash and tada, here the error appears again $ D:/STMicroelectronics/GNU-MCU-Eclipse/Build-Tools/2.11-20180428-1604/bin/make.exe 'GCC_PATH=D:/GNU Tools-Arm-Embedded/7-2018-q2-update/bin'
D:/GNU Tools-Arm-Embedded/7-2018-q2-update/bin/arm-none-eabi-gcc -c -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -DAVOID_EMPTY_DEFINE_FIELD_C -DUSE_HAL_DRIVER -DSTM32F446xx -IInc -IDrivers/STM32F4xx_HAL_Driver/Inc -IDrivers/STM32F4xx_HAL_Driver/Inc/Legacy -IDrivers/CMSIS/Device/ST/STM32F4xx/Include -IDrivers/CMSIS/Include -Og -Wall -fdata-sections -ffunction-sections -g -gdwarf-2 -MMD -MP -MF"build/main.d" -Wa,-a,-ad,-alms=build/main.lst Src/main.c -o build/main.o
/usr/bin/sh: D:/GNU: No such file or directory
make: *** [Makefile:156: build/main.o] Error 127 so it seems that MSYS bash or possibly linux bash have problems with spaces in arguments, and adding single or double quotes also wont help. the only thing I could do to fix the problem was replacing all the spaces with \space, which results in successful build: D:/STMicroelectronics/GNU-MCU-Eclipse/Build-Tools/2.11-20180428-1604/bin/make.exe 'GCC_PATH=D:/GNU\ Tools-Arm-Embedded/7-2018-q2-update/bin'
D:/GNU\ Tools-Arm-Embedded/7-2018-q2-update/bin/arm-none-eabi-gcc -c -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -DAVOID_EMPTY_DEFINE_FIELD_C -DUSE_HAL_DRIVER -DSTM32F446xx -IInc -IDrivers/STM32F4xx_HAL_Driver/Inc -IDrivers/STM32F4xx_HAL_Driver/Inc/Legacy -IDrivers/CMSIS/Device/ST/STM32F4xx/Include -IDrivers/CMSIS/Include -Og -Wall -fdata-sections -ffunction-sections -g -gdwarf-2 -MMD -MP -MF"build/main.d" -Wa,-a,-ad,-alms=build/main.lst Src/main.c -o build/main.o
D:/GNU\ Tools-Arm-Embedded/7-2018-q2-update/bin/arm-none-eabi-gcc build/main.o build/stm32f4xx_it.o build/stm32f4xx_hal_msp.o build/stm32f4xx_hal_tim.o build/stm32f4xx_hal_tim_ex.o build/stm32f4xx_hal_uart.o build/stm32f4xx_hal_rcc.o build/stm32f4xx_hal_rcc_ex.o build/stm32f4xx_hal_flash.o build/stm32f4xx_hal_flash_ex.o build/stm32f4xx_hal_flash_ramfunc.o build/stm32f4xx_hal_gpio.o build/stm32f4xx_hal_dma_ex.o build/stm32f4xx_hal_dma.o build/stm32f4xx_hal_pwr.o build/stm32f4xx_hal_pwr_ex.o build/stm32f4xx_hal_cortex.o build/stm32f4xx_hal.o build/system_stm32f4xx.o build/startup_stm32f446xx.o -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -specs=nano.specs -TSTM32F446RETx_FLASH.ld -lc -lm -lnosys -Wl,-Map=build/vsCodeTest.map,--cref -Wl,--gc-sections -o build/vsCodeTest.elf
D:/GNU\ Tools-Arm-Embedded/7-2018-q2-update/bin/arm-none-eabi-size build/vsCodeTest.elf
text data bss dec hex filename
5868 20 1636 7524 1d64 build/vsCodeTest.elf
D:/GNU\ Tools-Arm-Embedded/7-2018-q2-update/bin/arm-none-eabi-objcopy -O ihex build/vsCodeTest.elf build/vsCodeTest.hex
D:/GNU\ Tools-Arm-Embedded/7-2018-q2-update/bin/arm-none-eabi-objcopy -O binary -S build/vsCodeTest.elf build/vsCodeTest.bin |
I see. Well, in that case, I will leave the current configuration as it is. It is much more readable (than escaping), convenient and system versatile to just avoid spaces and use the default VS Code integrated terminal, which is cmd.exe. Updated FAQ. |
seems logical, to be more clear here is what I concluded from the tests. |
Hi
while building the project I get the following error in the terminal:
this output is from powershell terminal, changing the terminal to MSYS bash gives the same error,
it seems there is a bug in parsing addresses which include spaces
The text was updated successfully, but these errors were encountered: