I have gone through the Nordic Academy to install the tools and build the first example which is blinky. I am using MS Visual Code and SDK version 1.9.1. I have seen some similar questions but the suggested solution of deleting the files in the 'ToolchainCapabilityDatabase' did not help.
I have tried a number of the exercises and it always locks up after it tries to do the build. It seems to complete the steps to setup the configuration successfully but locks up early in the build process. I suspect that it is a conflict with something else on my PC. I have a good number of other development tools installed on my machine.
I see when it reaches about step 4/162 that a task starts called ccache.exe. I have found that if I abort the build that I cannot delete the files until I terminate that task. We do not see that task start on a coworker’s machine.
I have tried deleting everything and installing it again but the same thing happens. I am running Windows 10 (64bit) on a Lenovo PC.
When the build locks up, I have a couple of files in the build/CMakeFiles directory that seem to point out some issues. I have attached these files. The error file contains the message “exit.c:(.text.exit+0x2c): undefined reference to `_exit'”.
When I do the build configuration, I see the following output in the terminal. The output looks the same as a coworker until mine hangs.
-------------------------------------------------------------------------------------
> Executing task: nRF Connect: Generate config nrf52840dk_nrf52840 for c:\nordicsemi\myapps\less1_exer1 <
Building less1_exer1
west build --build-dir c:\nordicsemi\myapps\less1_exer1\build c:\nordicsemi\myapps\less1_exer1 --pristine --board nrf52840dk_nrf52840 -- -DNCS_TOOLCHAIN_VERSION:STRING="NONE" -DCONFIG_DEBUG_OPTIMIZATIONS=y -DCONFIG_DEBUG_THREAD_INFO=y
-- west build: generating a build system
Including boilerplate (Zephyr base): C:/nordicsemi/v1.9.1/zephyr/cmake/app/boilerplate.cmake
-- Application: C:/nordicsemi/myapps/less1_exer1
-- Zephyr version: 2.7.99 (C:/nordicsemi/v1.9.1/zephyr), build: v2.7.99-ncs1-1
-- Found Python3: C:/nordicsemi/v1.9.1/toolchain/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter
-- Found west (found suitable version "0.12.0", minimum required is "0.7.1")
-- Board: nrf52840dk_nrf52840
-- Cache files will be written to: C:/nordicsemi/v1.9.1/zephyr/.cache
-- Found dtc: C:/nordicsemi/v1.9.1/toolchain/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
-- Found toolchain: gnuarmemb (c:/nordicsemi/v1.9.1/toolchain/opt)
-- Found BOARD.dts: C:/nordicsemi/v1.9.1/zephyr/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840.dts
-- Generated zephyr.dts: C:/nordicsemi/myapps/less1_exer1/build/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: C:/nordicsemi/myapps/less1_exer1/build/zephyr/include/generated/devicetree_unfixed.h
-- Generated device_extern.h: C:/nordicsemi/myapps/less1_exer1/build/zephyr/include/generated/device_extern.h
-- Including generated dts.cmake file: C:/nordicsemi/myapps/less1_exer1/build/zephyr/dts.cmake
Parsing C:/nordicsemi/v1.9.1/zephyr/Kconfig
Loaded configuration 'C:/nordicsemi/v1.9.1/zephyr/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840_defconfig'
Merged configuration 'C:/nordicsemi/myapps/less1_exer1/prj.conf'
Merged configuration 'C:/nordicsemi/myapps/less1_exer1/build/zephyr/misc/generated/extra_kconfig_options.conf'
Configuration saved to 'C:/nordicsemi/myapps/less1_exer1/build/zephyr/.config'
Kconfig header saved to 'C:/nordicsemi/myapps/less1_exer1/build/zephyr/include/generated/autoconf.h'
-- The C compiler identification is GNU 9.2.1
-- The CXX compiler identification is GNU 9.2.1
-- The ASM compiler identification is GNU
-- Found assembler: C:/nordicsemi/v1.9.1/toolchain/opt/bin/arm-none-eabi-gcc.exe
-- Configuring done
-- Generating done
-- Build files have been written to: C:/nordicsemi/myapps/less1_exer1/build
-- west build: building application
[1/162] Generating misc/generated/syscalls.json, misc/generated/struct_tags.json
[2/162] Generating include/generated/driver-validation.h
[3/162] Generating include/generated/kobj-types-enum.h, include/generated/otype-to-str.h, include/generated/otype-to-size.h
[4/162] Generating include/generated/syscall_dispatch.c, include/generated/syscall_list.h
Here are the output files generated during the build:
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed. Compiler: C:/nordicsemi/v1.9.1/toolchain/opt/bin/arm-none-eabi-gcc.exe Build flags: Id flags: The output was: 1 c:/nordicsemi/v1.9.1/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: c:/nordicsemi/v1.9.1/toolchain/opt/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 Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. Compiler: C:/nordicsemi/v1.9.1/toolchain/opt/bin/arm-none-eabi-gcc.exe Build flags: Id flags: The output was: 1 c:/nordicsemi/v1.9.1/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: c:/nordicsemi/v1.9.1/toolchain/opt/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
The target system is: Generic - 2.7.99 - arm The host system is: Windows - 10.0.19044 - AMD64 Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded. Compiler: C:/nordicsemi/v1.9.1/toolchain/opt/bin/arm-none-eabi-gcc.exe Build flags: Id flags: -c The output was: 0 Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "CMakeCCompilerId.o" The C compiler identification is GNU, found in "C:/nordicsemi/myapps/less1_exer1/build/CMakeFiles/3.20.5/CompilerIdC/CMakeCCompilerId.o" Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded. Compiler: C:/nordicsemi/v1.9.1/toolchain/opt/bin/arm-none-eabi-gcc.exe Build flags: Id flags: -c The output was: 0 Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "CMakeCXXCompilerId.o" The CXX compiler identification is GNU, found in "C:/nordicsemi/myapps/less1_exer1/build/CMakeFiles/3.20.5/CompilerIdCXX/CMakeCXXCompilerId.o" Checking whether the ASM compiler is GNU using "--version" matched "(GNU assembler)|(GCC)|(Free Software Foundation)": arm-none-eabi-gcc.exe (GNU Tools for Arm Embedded Processors 9-2019-q4-major) 9.2.1 20191025 (release) [ARM/arm-9-branch revision 277599] Copyright (C) 2019 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.