# is not a full path to an existing compiler tool

**URL:** <https://discourse.cmake.org/t/is-not-a-full-path-to-an-existing-compiler-tool/436>\
**Category:** Code\
**Tags:** os:windows\
**Created:** [December 26, 2019, 1:13pm UTC](https://discourse.cmake.org/t/is-not-a-full-path-to-an-existing-compiler-tool/436 "2019-12-26T13:13:37Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![skulkarni](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/s/94ad74/32.png) [@skulkarni](https://discourse.cmake.org/u/skulkarni)\
**Post date:** [December 26, 2019, 1:13pm UTC](https://discourse.cmake.org/t/is-not-a-full-path-to-an-existing-compiler-tool/436/1 "2019-12-26T13:13:37Z")

</div>

Hi I am new to Cmake.  
I have installed Cmake tool and downloaded **gcc-arm-none-eabi**.

Below settings I have done in my cmake file  
set(ARM\_NONE\_EABI\_TOOLCHAIN\_PATH “C:/Users/XXXXX/binaries/gcc-arm-none-eabi/bin”)

Also I have set the CC and CXX variables in the environment path as below  
C:\Users\XXXXX\binaries\gcc-arm-none-eabi\bin\arm-none-eabi-gcc  
C:\Users\XXXXX\binaries\gcc-arm-none-eabi\bin\arm-none-eabi-g++

When I run the Cmake I am getting below error  
– The C compiler identification is unknown  
– The CXX compiler identification is unknown

C:/Users/XXXXX/binaries/gcc-arm-none-eabi/bin/bin/arm-none-eabi-gcc

is not a full path to an existing compiler tool.

Kindly advice

---

<div class="post-metadata">

**Author:** ![McMartin](https://discourse.cmake.org/user_avatar/discourse.cmake.org/mcmartin/32/150_2.png) [@McMartin](https://discourse.cmake.org/u/McMartin)\
**Post date:** [December 26, 2019, 2:01pm UTC](https://discourse.cmake.org/t/is-not-a-full-path-to-an-existing-compiler-tool/436/2 "2019-12-26T14:01:00Z")

</div>

`C:/Users/XXXXX/binaries/gcc-arm-none-eabi/bin/bin/arm-none-eabi-gcc` contains `bin/bin`, which doesn’t seem correct. I guess you should set `ARM_NONE_EABI_TOOLCHAIN_PATH` to `"C:/Users/XXXXX/binaries/gcc-arm-none-eabi"` (i.e. without the trailing `/bin`).

I hope this helps.

---

<div class="post-metadata">

**Author:** ![fdk17](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/f/ea666f/32.png) [@fdk17](https://discourse.cmake.org/u/fdk17)\
**Post date:** [December 26, 2019, 2:48pm UTC](https://discourse.cmake.org/t/is-not-a-full-path-to-an-existing-compiler-tool/436/3 "2019-12-26T14:48:57Z")

</div>

You don’t show your tool-chain file to see what you are doing with `ARM_NONE_EABI_TOOLCHAIN_PATH `. Setting CC and CCX in the environment is fine but then that is what it should use for CMAKE\_C\_COMPILER and CMAKE\_CXX\_COMPILER.

Also the output log and error log will have details on how it tried to invoke the compiler on the command line.

---

<div class="post-metadata">

**Author:** ![skulkarni](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/s/94ad74/32.png) [@skulkarni](https://discourse.cmake.org/u/skulkarni)\
**Post date:** [January 1, 2020, 6:29am UTC](https://discourse.cmake.org/t/is-not-a-full-path-to-an-existing-compiler-tool/436/4 "2020-01-01T06:29:33Z")

</div>

Hi,  
Sorry for my delayed response . Now I have installed “GNU Tools Arm Embedded” and set the below environment variables  
**ARM\_NONE\_EABI\_TOOLCHAIN\_PATH** = C:\Program Files (x86)\GNU Tools Arm Embedded\9 2019-q4-major

**CC** = C:\Program Files (x86)\GNU Tools Arm Embedded\9 2019-q4-major\bin\arm-none-eabi-gcc.  
I am using MinGW for generating the makfiles.

 ![cmake error](https://discourse.cmake.org/uploads/default/original/1X/89cd69c1e14c230b5eafd4d35562866c07dd2dc9.jpeg)  
**CmakeError.log**  
Compiling the C compiler identification source file “CMakeCCompilerId.c” failed.  
Compiler: C:/Program Files (x86)/GNU Tools Arm Embedded/9 2019-q4-major/bin/arm-none-eabi-gcc.exe  
Build flags:  
Id flags:

The output was:  
1  
c:/program files (x86)/gnu tools arm embedded/9 2019-q4-major/bin/…/lib/gcc/arm-none-eabi/9.2.1/…/…/…/…/arm-none-eabi/bin/ld.exe: c:/program files (x86)/gnu tools arm embedded/9 2019-q4-major/bin/…/lib/gcc/arm-none-eabi/9.2.1/…/…/…/…/arm-none-eabi/lib\libc.a(lib\_a-exit.o): in function `exit': exit.c:(.text.exit+0x2c): undefined reference to `\_exit’  
collect2.exe: error: ld returned 1 exit status

Determining if the C compiler works failed with the following output:  
Change Dir: D:/SDK/15.3/nRF5\_SDK\_15.3/examples/ble\_peripheral/ble\_app\_blinky/cmake-build/CMakeFiles/CMakeTmp

Run Build Command(s):C:/MinGW/bin/mingw32-make.exe cmTC\_f7474/fast  
C:/MinGW/bin/mingw32-make.exe -f CMakeFiles\cmTC\_f7474.dir\build.make CMakeFiles/cmTC\_f7474.dir/build

mingw32-make.exe[1]: Entering directory ‘D:/SDK/15.3/nRF5\_SDK\_15.3/examples/ble\_peripheral/ble\_app\_blinky/cmake-build/CMakeFiles/CMakeTmp’

Building C object CMakeFiles/cmTC\_f7474.dir/testCCompiler.c.obj

C:\PROGRA~2\GNUTOO~1\92019-~1\bin\AR19DD~1.EXE -o CMakeFiles\cmTC\_f7474.dir\testCCompiler.c.obj -c D:\SDK\15.3\nRF5\_SDK\_15.3\examples\ble\_peripheral\ble\_app\_blinky\cmake-build\CMakeFiles\CMakeTmp\testCCompiler.c

Linking C executable cmTC\_f7474.exe

“C:\Program Files\CMake\bin\cmake.exe” -E cmake\_link\_script CMakeFiles\cmTC\_f7474.dir\link.txt --verbose=1

“C:\Program Files\CMake\bin\cmake.exe” -E remove -f CMakeFiles\cmTC\_f7474.dir/objects.a  
CMAKE\_AR-NOTFOUND cr CMakeFiles\cmTC\_f7474.dir/objects.a @CMakeFiles\cmTC\_f7474.dir\objects1.rsp  
Error running link command: The system cannot find the file specified  
CMakeFiles\cmTC\_f7474.dir\build.make:86: recipe for target ‘cmTC\_f7474.exe’ failed

mingw32-make.exe[1]: \*\*\* [cmTC\_f7474.exe] Error 2

mingw32-make.exe[1]: Leaving directory ‘D:/SDK/15.3/nRF5\_SDK\_15.3/examples/ble\_peripheral/ble\_app\_blinky/cmake-build/CMakeFiles/CMakeTmp’

Makefile:120: recipe for target ‘cmTC\_f7474/fast’ failed

mingw32-make.exe: \*\*\* [cmTC\_f7474/fast] Error 2

CmakeList.txt  
cmake\_minimum\_required (VERSION 3.14)  
project(ble\_app\_blinky\_pca10040\_s132 C ASM)  
set(CMAKE\_SHARED\_LIBRARY\_LINK\_C\_FLAGS “”)  
set(CMAKE\_SHARED\_LIBRARY\_LINK\_CXX\_FLAGS “”)  
set(PROJECT\_ROOT\_FOLDER “D:/SDK/15.3/nRF5\_SDK\_15.3/examples/ble\_peripheral/ble\_app\_blinky/pca10040/s132/armgcc”)  
set(CMAKE\_EXPORT\_COMPILE\_COMMANDS ON)  
add\_definitions(  
-DBOARD\_PCA10040  
-DCONFIG\_GPIO\_AS\_PINRESET  
-DFLOAT\_ABI\_HARD  
-DINITIALIZE\_USER\_SECTIONS  
-DNO\_VTOR\_CONFIG  
-DNRF52  
-DNRF52832\_XXAA  
-DNRF52\_PAN\_74  
-DNRF\_SD\_BLE\_API\_VERSION=6  
-DS132  
-DSOFTDEVICE\_PRESENT  
-DSWI\_DISABLE0  
)  
include\_directories(  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/ble/ble\_advertising  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/ble/ble\_dtm  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/ble/ble\_racp  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/ble/ble\_services/ble\_ancs\_c  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/ble/ble\_services/ble\_ans\_c  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/ble/ble\_services/ble\_bas  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/ble/ble\_services/ble\_bas\_c  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/ble/ble\_services/ble\_cscs  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/ble/ble\_services/ble\_cts\_c  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/ble/ble\_services/ble\_dfu  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/ble/ble\_services/ble\_dis  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/ble/ble\_services/ble\_gls  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/ble/ble\_services/ble\_hids  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/ble/ble\_services/ble\_hrs  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/ble/ble\_services/ble\_hrs\_c  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/ble/ble\_services/ble\_hts  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/ble/ble\_services/ble\_ias  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/ble/ble\_services/ble\_ias\_c  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/ble/ble\_services/ble\_lbs  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/ble/ble\_services/ble\_lbs\_c  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/ble/ble\_services/ble\_lls  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/ble/ble\_services/ble\_nus  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/ble/ble\_services/ble\_nus\_c  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/ble/ble\_services/ble\_rscs  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/ble/ble\_services/ble\_rscs\_c  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/ble/ble\_services/ble\_tps  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/ble/common  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/ble/nrf\_ble\_gatt  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/ble/nrf\_ble\_qwr  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/ble/peer\_manager  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/boards  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/atomic  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/atomic\_fifo  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/atomic\_flags  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/balloc  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/bootloader/ble\_dfu  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/button  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/cli  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/crc16  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/crc32  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/crypto  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/csense  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/csense\_drv  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/delay  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/ecc  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/experimental\_section\_vars  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/experimental\_task\_manager  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/fds  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/fstorage  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/gfx  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/gpiote  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/hardfault  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/hci  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/led\_softblink  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/log  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/log/src  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/low\_power\_pwm  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/mem\_manager  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/memobj  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/mpu  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/mutex  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/pwm  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/pwr\_mgmt  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/queue  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/ringbuf  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/scheduler  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/sdcard  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/slip  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/sortlist  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/spi\_mngr  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/stack\_guard  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/strerror  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/svc  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/timer  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/twi\_mngr  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/twi\_sensor  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/usbd  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/usbd/class/audio  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/usbd/class/cdc  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/usbd/class/cdc/acm  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/usbd/class/hid  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/usbd/class/hid/generic  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/usbd/class/hid/kbd  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/usbd/class/hid/mouse  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/usbd/class/msc  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/util  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/nfc/ndef/conn\_hand\_parser  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/nfc/ndef/conn\_hand\_parser/ac\_rec\_parser  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/nfc/ndef/conn\_hand\_parser/ble\_oob\_advdata\_parser  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/nfc/ndef/conn\_hand\_parser/le\_oob\_rec\_parser  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/nfc/ndef/connection\_handover/ac\_rec  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/nfc/ndef/connection\_handover/ble\_oob\_advdata  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/nfc/ndef/connection\_handover/ble\_pair\_lib  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/nfc/ndef/connection\_handover/ble\_pair\_msg  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/nfc/ndef/connection\_handover/common  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/nfc/ndef/connection\_handover/ep\_oob\_rec  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/nfc/ndef/connection\_handover/hs\_rec  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/nfc/ndef/connection\_handover/le\_oob\_rec  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/nfc/ndef/generic/message  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/nfc/ndef/generic/record  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/nfc/ndef/launchapp  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/nfc/ndef/parser/message  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/nfc/ndef/parser/record  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/nfc/ndef/text  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/nfc/ndef/uri  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/nfc/t2t\_lib  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/nfc/t2t\_parser  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/nfc/t4t\_lib  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/nfc/t4t\_parser/apdu  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/nfc/t4t\_parser/cc\_file  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/nfc/t4t\_parser/hl\_detection\_procedure  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/nfc/t4t\_parser/tlv  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/softdevice/common  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/softdevice/s132/headers  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/softdevice/s132/headers/nrf52  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/toolchain/cmsis/include  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/external/fprintf  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/external/segger\_rtt  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/external/utf\_converter  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/integration/nrfx  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/integration/nrfx/legacy  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/modules/nrfx  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/modules/nrfx/drivers/include  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/modules/nrfx/hal  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/modules/nrfx/mdk  
${PROJECT\_ROOT\_FOLDER}/…/config  
)  
set(SOURCE\_FILES  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/modules/nrfx/mdk/gcc\_startup\_nrf52.S  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/log/src/nrf\_log\_backend\_rtt.c  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/log/src/nrf\_log\_backend\_serial.c  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/log/src/nrf\_log\_backend\_uart.c  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/log/src/nrf\_log\_default\_backends.c  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/log/src/nrf\_log\_frontend.c  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/log/src/nrf\_log\_str\_formatter.c  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/button/app\_button.c  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/util/app\_error.c  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/util/app\_error\_handler\_gcc.c  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/util/app\_error\_weak.c  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/scheduler/app\_scheduler.c  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/timer/app\_timer.c  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/util/app\_util\_platform.c  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/hardfault/hardfault\_implementation.c  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/util/nrf\_assert.c  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/atomic\_fifo/nrf\_atfifo.c  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/atomic\_flags/nrf\_atflags.c  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/atomic/nrf\_atomic.c  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/balloc/nrf\_balloc.c  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/external/fprintf/nrf\_fprintf.c  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/external/fprintf/nrf\_fprintf\_format.c  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/memobj/nrf\_memobj.c  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/pwr\_mgmt/nrf\_pwr\_mgmt.c  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/ringbuf/nrf\_ringbuf.c  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/experimental\_section\_vars/nrf\_section\_iter.c  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/libraries/strerror/nrf\_strerror.c  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/modules/nrfx/mdk/system\_nrf52.c  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/boards/boards.c  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/integration/nrfx/legacy/nrf\_drv\_clock.c  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/integration/nrfx/legacy/nrf\_drv\_uart.c  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/modules/nrfx/soc/nrfx\_atomic.c  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/modules/nrfx/drivers/src/nrfx\_clock.c  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/modules/nrfx/drivers/src/nrfx\_gpiote.c  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/modules/nrfx/drivers/src/prs/nrfx\_prs.c  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/modules/nrfx/drivers/src/nrfx\_uart.c  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/modules/nrfx/drivers/src/nrfx\_uarte.c  
${PROJECT\_ROOT\_FOLDER}/…/…/…/main.c  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/external/segger\_rtt/SEGGER\_RTT.c  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/external/segger\_rtt/SEGGER\_RTT\_Syscalls\_GCC.c  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/external/segger\_rtt/SEGGER\_RTT\_printf.c  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/ble/common/ble\_advdata.c  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/ble/ble\_advertising/ble\_advertising.c  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/ble/common/ble\_conn\_params.c  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/ble/common/ble\_conn\_state.c  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/ble/common/ble\_srv\_common.c  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/ble/nrf\_ble\_gatt/nrf\_ble\_gatt.c  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/ble/nrf\_ble\_qwr/nrf\_ble\_qwr.c  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/ble/ble\_services/ble\_lbs/ble\_lbs.c  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/external/utf\_converter/utf.c  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/softdevice/common/nrf\_sdh.c  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/softdevice/common/nrf\_sdh\_ble.c  
${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/components/softdevice/common/nrf\_sdh\_soc.c  
)  
set(CMAKE\_C\_FLAGS " -O3 -g3 -mcpu=cortex-m4 -mthumb -mabi=aapcs -Wall -Werror -mfloat-abi=hard -mfpu=fpv4-sp-d16 -ffunction-sections -fdata-sections -fno-strict-aliasing -fno-builtin -fshort-enums")

set(LINKER\_SCRIPT ${PROJECT\_ROOT\_FOLDER}/ble\_app\_blinky\_gcc\_nrf52.ld)  
set(CMAKE\_EXE\_LINKER\_FLAGS " -O3 -g3 -mthumb -mabi=aapcs -L${PROJECT\_ROOT\_FOLDER}/…/…/…/…/…/…/modules/nrfx/mdk -T…/ble\_app\_blinky\_gcc\_nrf52.ld -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -Wl,–gc-sections --specs=nano.specs")

set(CMAKE\_ASM\_FLAGS " -g3 -mcpu=cortex-m4 -mthumb -mabi=aapcs -mfloat-abi=hard -mfpu=fpv4-sp-d16")

add\_executable(${PROJECT\_NAME}.elf ${SOURCE\_FILES})

set(HEX\_FILE ${PROJECT\_NAME}.hex)  
set(BIN\_FILE ${PROJECT\_NAME}.bin)

add\_custom\_command(TARGET ${PROJECT\_NAME}.elf POST\_BUILD  
COMMAND ${OBJCOPY} -Oihex $\<TARGET\_FILE:${PROJECT\_NAME}.elf\> ${HEX\_FILE}  
COMMAND ${OBJCOPY} -Obinary $\<TARGET\_FILE:${PROJECT\_NAME}.elf\> ${BIN\_FILE}  
COMMENT “Building ${HEX\_FILE} \nBuilding ${BIN\_FILE}”  
)  
Looking at the error I am clueless… Pls advice me

---

<div class="post-metadata">

**Author:** ![fdk17](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/f/ea666f/32.png) [@fdk17](https://discourse.cmake.org/u/fdk17)\
**Post date:** [January 1, 2020, 1:37pm UTC](https://discourse.cmake.org/t/is-not-a-full-path-to-an-existing-compiler-tool/436/5 "2020-01-01T13:37:46Z")

</div>

You are not properly setup to use that compiler in the way you have set the compiler flags. Refer to [https://gitlab.kitware.com/cmake/cmake/issues/18730](https://gitlab.kitware.com/cmake/cmake/issues/18730). Basically with the default settings this compiler can’t build full executable projects because it doesn’t provide a fully implemented `c` library so the linking phase fails. Try setting `CMAKE_TRY_COMPILE_TARGET_TYPE` to `STATIC_LIBRARY` either in the toolchain file or before the `project()` command. That should make this step build a static library and not an executable.

---

<div class="post-metadata">

**Author:** ![skulkarni](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/s/94ad74/32.png) [@skulkarni](https://discourse.cmake.org/u/skulkarni)\
**Post date:** [January 2, 2020, 8:49am UTC](https://discourse.cmake.org/t/is-not-a-full-path-to-an-existing-compiler-tool/436/6 "2020-01-02T08:49:22Z")

</div>

Hi Thank you for your mail.  
Could you please elaborate “You are not properly setup to use that compiler”. Please share reference link to understand better.  
I have modified the CmakeLists.txt from the link  
SET(CMAKE\_SYSTEM\_NAME Generic)  
#this one not so much  
SET(CMAKE\_SYSTEM\_VERSION 1)  
SET(CMAKE\_SYSTEM\_PROCESSOR arm)  
SET(CMAKE\_CROSSCOMPILING 1)  
set(triple arm-none-eabi)  
SET(CMAKE\_C\_COMPILER\_TARGET ${triple})  
SET(CMAKE\_TRY\_COMPILE\_TARGET\_TYPE STATIC\_LIBRARY)

project(ble\_app\_blinky\_pca10040\_s132 C ASM)

With this changes I could see linker issue seems to be resolved  
D:\SDK\15.3\nRF5\_SDK\_15.3\examples\ble\_peripheral\ble\_app\_blinky\>cmake -B"cmake-build" -G “MinGW Makefiles” .  
– The C compiler identification is GNU 9.2.1  
– The ASM compiler identification is GNU  
– Found assembler: C:/Program Files (x86)/GNU Tools Arm Embedded/9 2019-q4-major/bin/arm-none-eabi-gcc.exe  
– Check for working C compiler: C:/Program Files (x86)/GNU Tools Arm Embedded/9 2019-q4-major/bin/arm-none-eabi-gcc.exe  
– Check for working C compiler: C:/Program Files (x86)/GNU Tools Arm Embedded/9 2019-q4-major/bin/arm-none-eabi-gcc.exe – works  
– Detecting C compiler ABI info  
– Detecting C compiler ABI info - done  
– Detecting C compile features  
– Detecting C compile features - done  
– Configuring done  
– Generating done  
– Build files have been written to: D:/SDK/15.3/nRF5\_SDK\_15.3/examples/ble\_peripheral/ble\_app\_blinky/cmake-build

But in error log I could still see  
Compiling the C compiler identification source file “CMakeCCompilerId.c” failed.  
Compiler: C:/Program Files (x86)/GNU Tools Arm Embedded/9 2019-q4-major/bin/arm-none-eabi-gcc.exe  
Build flags:  
Id flags:

The output was:  
1  
c:/program files (x86)/gnu tools arm embedded/9 2019-q4-major/bin/…/lib/gcc/arm-none-eabi/9.2.1/…/…/…/…/arm-none-eabi/bin/ld.exe: c:/program files (x86)/gnu tools arm embedded/9 2019-q4-major/bin/…/lib/gcc/arm-none-eabi/9.2.1/…/…/…/…/arm-none-eabi/lib\libc.a(lib\_a-exit.o): in function `exit': exit.c:(.text.exit+0x2c): undefined reference to `\_exit’  
collect2.exe: error: ld returned 1 exit status

From my understanding this error is nothing to do with my project.  
Using Makefile generated I can go ahead and build the executable.  
Please share your advice.

---

<div class="post-metadata">

**Author:** ![fdk17](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/f/ea666f/32.png) [@fdk17](https://discourse.cmake.org/u/fdk17)\
**Post date:** [January 2, 2020, 2:48pm UTC](https://discourse.cmake.org/t/is-not-a-full-path-to-an-existing-compiler-tool/436/7 "2020-01-02T14:48:44Z")

</div>

> [@skulkarni](#):
>
> Could you please elaborate “You are not properly setup to use that compiler”. Please share reference link to understand better.

All the relevant links are in issue #18730. I thought I already clarified my statement by also saying:

> [@fdk17](#):
>
> Basically with the default settings this compiler can’t build full executable projects because it doesn’t provide a fully implemented `c` library so the linking phase fails.

The CMake issue mentions several options you could take regarding on how to build executable programs, assuming you are using this compiler or something similar: [Arm GNU Toolchain](https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm).

> [@skulkarni](#):
>
> But in error log I could still see  
> Compiling the C compiler identification source file “CMakeCCompilerId.c” failed.  
> Compiler: C:/Program Files (x86)/GNU Tools Arm Embedded/9 2019-q4-major/bin/arm-none-eabi-gcc.exe

Unless you deleted the error log file it will keep its contents. This may have been the error from before you updated your toolchain file.

BTW, You’ll want to set `CMAKE_<LANG>_FLAGS` with the proper settings for the kind of ARM chip you are targeting.

Here is another example of how someone chose to resolve their linking issues. Also note in the original question where they mentioned using `--cpu Cortex-M3` to set the target CPU type. This is also in the aforementioned links.

> <https://stackoverflow.com/questions/43781207/how-to-cross-compile-with-cmake-arm-none-eabi-on-windows>

---

<div class="post-metadata">

**Author:** ![skulkarni](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/s/94ad74/32.png) [@skulkarni](https://discourse.cmake.org/u/skulkarni)\
**Post date:** [January 3, 2020, 6:27am UTC](https://discourse.cmake.org/t/is-not-a-full-path-to-an-existing-compiler-tool/436/8 "2020-01-03T06:27:16Z")

</div>

Thank you…
