CMake configure failed for Zephyr project: blinky

I'm following the steps in exercise 1 of the nRF Connect SDK Fundamentals and getting configuration failures.  From what I can tell it looks like Zephyr is failing to build


   ****************************
   * Running CMake for blinky *
   ****************************

Loading Zephyr default modules (Zephyr base).
-- Application: C:/blinky
-- CMake version: 3.21.0
-- Found Python3: C:/ncs/toolchains/66cdf9b75e/opt/bin/python.exe (found suitable version "3.12.4", minimum required is "3.10") found components: Interpreter
-- Cache files will be written to: C:/ncs/v3.2.1/zephyr/.cache
-- Zephyr version: 4.2.99 (C:/ncs/v3.2.1/zephyr)
-- Found west (found suitable version "1.4.0", minimum required is "0.14.0")
-- Board: nrf52840dk, qualifiers: nrf52840
-- Found host-tools: zephyr 0.17.0 (C:/ncs/toolchains/66cdf9b75e/opt/zephyr-sdk)
-- Found toolchain: zephyr 0.17.0 (C:/ncs/toolchains/66cdf9b75e/opt/zephyr-sdk)
-- Found Dtc: C:/ncs/toolchains/66cdf9b75e/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
-- Found BOARD.dts: C:/ncs/v3.2.1/zephyr/boards/nordic/nrf52840dk/nrf52840dk_nrf52840.dts
-- Generated zephyr.dts: C:/blinky/build/blinky/zephyr/zephyr.dts
-- Generated pickled edt: C:/blinky/build/blinky/zephyr/edt.pickle
-- Generated devicetree_generated.h: C:/blinky/build/blinky/zephyr/include/generated/zephyr/devicetree_generated.h
Parsing C:/ncs/v3.2.1/zephyr/Kconfig
Loaded configuration 'C:/ncs/v3.2.1/zephyr/boards/nordic/nrf52840dk/nrf52840dk_nrf52840_defconfig'
Merged configuration 'C:/blinky/prj.conf'
Merged configuration 'C:/blinky/build/blinky/zephyr/misc/generated/extra_kconfig_options.conf'
Merged configuration 'C:/blinky/build/blinky/zephyr/.config.sysbuild'
Configuration saved to 'C:/blinky/build/blinky/zephyr/.config'
Kconfig header saved to 'C:/blinky/build/blinky/zephyr/include/generated/zephyr/autoconf.h'
-- Found GnuLd: c:/ncs/toolchains/66cdf9b75e/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi/bin/ld.bfd.exe (found version "2.38")
-- The C compiler identification is GNU 12.2.0
-- The CXX compiler identification is GNU 12.2.0
-- The ASM compiler identification is GNU
-- Found assembler: C:/ncs/toolchains/66cdf9b75e/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc.exe
CMake Error at C:/ncs/v3.2.1/zephyr/cmake/modules/extensions.cmake:2627 (message):
  Assertion failed: The toolchain is unable to build a dummy C file.  Move
  C:/ncs/v3.2.1/zephyr/.cache, re-run and look at CMakeError.log
Call Stack (most recent call first):
  C:/ncs/v3.2.1/zephyr/cmake/modules/kernel.cmake:150 (assert)
  C:/ncs/v3.2.1/zephyr/cmake/modules/zephyr_default.cmake:140 (include)
  C:/ncs/v3.2.1/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
  C:/ncs/v3.2.1/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
  CMakeLists.txt:4 (find_package)


-- Configuring incomplete, errors occurred!
See also "C:/blinky/build/blinky/CMakeFiles/CMakeOutput.log".
See also "C:/blinky/build/blinky/CMakeFiles/CMakeError.log".
CMake Error at cmake/modules/sysbuild_extensions.cmake:530 (message):
  CMake configure failed for Zephyr project: blinky

  Location: C:/blinky
Call Stack (most recent call first):
  cmake/modules/sysbuild_images.cmake:43 (ExternalZephyrProject_Cmake)
  cmake/modules/sysbuild_default.cmake:21 (include)
  C:/ncs/v3.2.1/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:75 (include)
  C:/ncs/v3.2.1/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
  C:/ncs/v3.2.1/zephyr/share/sysbuild-package/cmake/SysbuildConfig.cmake:8 (include)
  template/CMakeLists.txt:10 (find_package)


-- Configuring incomplete, errors occurred!
See also "C:/blinky/build/CMakeFiles/CMakeOutput.log".
←[91mFATAL ERROR: command exited with status 1: 'C:\ncs\toolchains\66cdf9b75e\opt\bin\cmake.EXE' -DWEST_PYTHON=C:/ncs/toolchains/66cdf9b75e/opt/bin/python.exe '-Bc:\blinky\build' -GNinja -DBOARD=nrf52
840dk/nrf52840 -DCONFIG_DEBUG_THREAD_INFO=y -DCONF_FILE=prj.conf '-SC:\ncs\v3.2.1\zephyr\share\sysbuild' '-DAPP_DIR:PATH=c:\blinky'
←[0m
 *  The terminal process terminated with exit code: 1. 
 *  Terminal will be reused by tasks, press any key to close it. 

I searched and found one other question that looked similar, but it seems to be related to when nRF connect did not bundle the toolchains?

devzone.nordicsemi.com/.../276027

My configuration

nRF52840DK

Windows 11

NCS v3.2.1

Building with VSCode and nRF Connect extension pack

  • Hi,

    Honestly, I don't really know what happened in details, but it failed somewhere and cached it. So by removing the cached information, it forced it to retry from scratch.

    CMake Error at C:/ncs/v3.2.1/zephyr/cmake/modules/extensions.cmake:2627 (message):
      Assertion failed: The toolchain is unable to build a dummy C file.  Move
      C:/ncs/v3.2.1/zephyr/.cache, re-run and look at CMakeError.log

    There was this message in your error logs. I still asked you the full logs to see the build command sent to check if there was an issue there, but it was all fine.

    Happy that I was able to help you,

    Simon D-M

Related