1

I created soft symbolic links to files for my toolchain path. In CMake file I have command CMAKE_FORCE_C_COMPILER, which must take path to my c compiler arm-none-eabi-gcc.exe. But path to this compilers are always changing when new update arrive. So instead of path "C:/Program Files (x86)/GNU Tools ARM Embedded/6 2017-q2-update/bin" I created symbolic link "C:/Program Files (x86)/GNU Tools ARM Embedded/gcc-compiler/bin", which point to previously file.But problem is now with symbolic link, it won't find "arm-none-eabi-gcc.exe" compiler.

So this code will work with no symbolic links and direct path to compiler.

But with symbolic link, it won't work, in build console it says:"arm-none-eabi-gcc.exe Not such a file or directory"

set(ARM_TOOLCHAIN_DIR "C:/Program Files (x86)/GNU Tools ARM Embedded/gcc-compiler/bin")
set(ARM_TOOLCHAIN_SUFFIX ".exe")
MAKE_FORCE_C_COMPILER("${ARM_TOOLCAHIN_DIR}/arm-none-eabi-gcc${ARM_TOOLCAHIN_SUFFIX}" GNU)

1 Answer 1

0

When making symbolic links in Windows, which point to file where you have your compiler arm-none-eabi-gcc.exe. In your case you did symbolic link direct to point to file "/bin" in full path "C:/Program Files (x86)/GNU Tools ARM Embedded/6 2017-q2-update/bin". When command CMAKE_FORCE_C_COMPILER takes your path with symbolic link as a parameter, Windows will not find a full path.

Solution is to make symbolic link to point only to the previous file, not to the finale file! So do NOT make symbolic link point to final file where your *.exe file is. Windows will not recognize your path.

So don't make it point to "/bin" but to here "C:/Program Files (x86)/GNU Tools ARM Embedded/6 2017-q2-update/".

In your case, use Windows Cmd command line and type:

mklink /D "C:/Program Files (x86)/GNU Tools ARM Embedded/gcc-arm-none-eabi/"  "C:/Program Files (x86)/GNU Tools ARM Embedded/6 2017-q2-update"

And now in your CMake file you can use this path to you C compiler:

set(ARM_TOOLCHAIN_DIR "C:/Program Files (x86)/GNU Tools ARM Embedded/gcc-compiler/bin")
MAKE_FORCE_C_COMPILER("${ARM_TOOLCAHIN_DIR}/arm-none-eabi gcc.exe GNU)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.