Closed adamboardman closed 7 years ago
@adamboardman I think this is a relatively easy patch, but i'm out and about at the moment, and unlikely to be at a machine capable of building through yotta until this evening.
If you browse to the yotta_targets/bbc-microbit-classic-gcc/CMake/toolchain.cmake
file, and edit line 22 to be:
set(CMAKE_EXE_LINKER_FLAGS_INIT "${CMAKE_EXE_LINKER_FLAGS_INIT} -mcpu=cortex-m0 -mthumb -T\"${CMAKE_CURRENT_LIST_DIR}/../ld/NRF51822.ld\"")
It should theoretically pass the quotes directly to the command line, where g++ should treat it as an unescaped directory string.
I've tested locally and confirmed this works.
Additionally for those interested in avoiding source forge, I made an experimental target ages ago that uses a python script to merge hex files together instead:
Ninja fails to find NRF51822.ld as path is not escaped/quoted in parameter list
[Ubuntu+yotta] To reproduce just move microbit-samples to a sub folder with a space in its name, eg Path Name
:~/Path Name/microbit-samples$ yt build
Gives: arm-none-eabi-g++: error: Name/microbit-samples/yotta_targets/bbc-microbit-classic-gcc/CMake/../ld/NRF51822.ld: No such file or directory ninja: build stopped: subcommand failed. error: command ['ninja'] failed
Compared to:
:~/microbit/microbit-samples$ yt build
No errors reported