Failing to build Zephyr Reference Design template - mcuboot failure

Description

Hello,

I made a fork of the Golioth Reference Design template here: GitHub - NicoPowers/reference-design-template: Template for making new Golioth Reference Design repositories

I followed the steps to make a new Zephyr project, and when I go to perform the build step, by doing west build -p -b nrf9160dk/nrf9160/ns --sysbuild app, I get this error:

CMake Error at cmake/modules/sysbuild_extensions.cmake:530 (message):
  CMake configure failed for Zephyr project: mcuboot

  Location:
  C:/Users/nicol/OneDrive/Documents/Projects/golioth-reference-design-template/deps/bootloader/mcuboot/boot/zephyr
Call Stack (most recent call first):
  cmake/modules/sysbuild_images.cmake:43 (ExternalZephyrProject_Cmake)
  cmake/modules/sysbuild_default.cmake:21 (include)
  C:/Users/nicol/OneDrive/Documents/Projects/golioth-reference-design-template/deps/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:75 (include)
  C:/Users/nicol/OneDrive/Documents/Projects/golioth-reference-design-template/deps/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
  C:/Users/nicol/OneDrive/Documents/Projects/golioth-reference-design-template/deps/zephyr/share/sysbuild-package/cmake/SysbuildConfig.cmake:8 (include)
  template/CMakeLists.txt:10 (find_package)


-- Configuring incomplete, errors occurred!
FATAL ERROR: command exited with status 1: 'C:\Program Files\CMake\bin\cmake.EXE' -DWEST_PYTHON=C:/Users/nicol/OneDrive/Documents/Projects/golioth-reference-design-template/.venv/Scripts/python.exe '-BC:\Users\nicol\OneDrive\Documents\Projects\golioth-reference-design-template\build' -GNinja -DBOARD=nrf9160dk/nrf9160/ns '-SC:\Users\nicol\OneDrive\Documents\Projects\golioth-reference-design-template\deps\zephyr\share\sysbuild' '-DAPP_DIR:PATH=C:\Users\nicol\OneDrive\Documents\Projects\golioth-reference-design-template\app'

Steps to Reproduce

Follow the local setup and build guide in the repo.

Expected Behavior

Successful build of nrf9160dk/nrf9160/ns

Actual Behavior

Error regarding mcuboot

Environment

Zephyr, configured and setup using steps outline in reference design template

Logs and Console Output

– west build: making build dir C:\Users\nicol\OneDrive\Documents\Projects\golioth-reference-design-template\build pristine
– west build: generating a build system
Loading Zephyr module(s) (Zephyr base): sysbuild_default
– Found Python3: C:/Users/nicol/OneDrive/Documents/Projects/golioth-reference-design-template/.venv/Scripts/python.exe (found suitable version “3.12.10”, minimum required is “3.10”) found components: Interpreter
– Cache files will be written to: C:/Users/nicol/OneDrive/Documents/Projects/golioth-reference-design-template/deps/zephyr/.cache
– Found west (found suitable version “1.5.0”, minimum required is “0.14.0”)
– Board: nrf9160dk, Revision: 0.14.0, qualifiers: nrf9160/ns
Parsing C:/Users/nicol/OneDrive/Documents/Projects/golioth-reference-design-template/deps/zephyr/share/sysbuild/Kconfig
Loaded configuration ‘C:/Users/nicol/OneDrive/Documents/Projects/golioth-reference-design-template/build/_sysbuild/empty.conf’
Merged configuration ‘C:/Users/nicol/OneDrive/Documents/Projects/golioth-reference-design-template/build/_sysbuild/empty.conf’
Merged configuration ‘C:/Users/nicol/OneDrive/Documents/Projects/golioth-reference-design-template/app/sysbuild.conf’
Configuration saved to ‘C:/Users/nicol/OneDrive/Documents/Projects/golioth-reference-design-template/build/zephyr/.config’
Kconfig header saved to ‘C:/Users/nicol/OneDrive/Documents/Projects/golioth-reference-design-template/build/_sysbuild/autoconf.h’


  • Running CMake for mcuboot *

Loading Zephyr default modules (Zephyr base).
– Application: C:/Users/nicol/OneDrive/Documents/Projects/golioth-reference-design-template/deps/bootloader/mcuboot/boot/zephyr
– CMake version: 4.1.2
– Found Python3: C:/Users/nicol/OneDrive/Documents/Projects/golioth-reference-design-template/.venv/Scripts/python.exe (found suitable version “3.12.10”, minimum required is “3.10”) found components: Interpreter
– Cache files will be written to: C:/Users/nicol/OneDrive/Documents/Projects/golioth-reference-design-template/deps/zephyr/.cache
– Zephyr version: 4.1.99 (C:/Users/nicol/OneDrive/Documents/Projects/golioth-reference-design-template/deps/zephyr)
– Found west (found suitable version “1.5.0”, minimum required is “0.14.0”)
– Board: nrf9160dk, Revision: 0.14.0, qualifiers: nrf9160
– Found host-tools: zephyr 0.17.3 (C:/Users/nicol/.zephyr_ide/toolchains/zephyr-sdk-0.17.3)
– Found toolchain: zephyr 0.17.3 (C:/Users/nicol/.zephyr_ide/toolchains/zephyr-sdk-0.17.3)
– Found Dtc: C:/Users/nicol/AppData/Local/Microsoft/WinGet/Packages/oss-winget.dtc_Microsoft.Winget.Source_8wekyb3d8bbwe/usr/bin/dtc.exe (found suitable version “1.6.1”, minimum required is “1.4.6”)
– Found BOARD.dts: C:/Users/nicol/OneDrive/Documents/Projects/golioth-reference-design-template/deps/zephyr/boards/nordic/nrf9160dk/nrf9160dk_nrf9160.dts
– Found devicetree overlay: C:/Users/nicol/OneDrive/Documents/Projects/golioth-reference-design-template/deps/zephyr/boards/nordic/nrf9160dk/nrf9160dk_nrf9160_0_14_0.overlay
– Found devicetree overlay: C:/Users/nicol/OneDrive/Documents/Projects/golioth-reference-design-template/deps/bootloader/mcuboot/boot/zephyr/app.overlay
– Generated zephyr.dts: C:/Users/nicol/OneDrive/Documents/Projects/golioth-reference-design-template/build/mcuboot/zephyr/zephyr.dts
– Generated pickled edt: C:/Users/nicol/OneDrive/Documents/Projects/golioth-reference-design-template/build/mcuboot/zephyr/edt.pickle
– Generated devicetree_generated.h: C:/Users/nicol/OneDrive/Documents/Projects/golioth-reference-design-template/build/mcuboot/zephyr/include/generated/zephyr/devicetree_generated.h
Parsing C:/Users/nicol/OneDrive/Documents/Projects/golioth-reference-design-template/deps/bootloader/mcuboot/boot/zephyr/Kconfig
Loaded configuration ‘C:/Users/nicol/OneDrive/Documents/Projects/golioth-reference-design-template/deps/zephyr/boards/nordic/nrf9160dk/nrf9160dk_nrf9160_defconfig’
Merged configuration ‘C:/Users/nicol/OneDrive/Documents/Projects/golioth-reference-design-template/deps/bootloader/mcuboot/boot/zephyr/prj.conf’
Merged configuration ‘C:/Users/nicol/OneDrive/Documents/Projects/golioth-reference-design-template/deps/nrf/modules/mcuboot/tfm.conf’
Merged configuration ‘C:/Users/nicol/OneDrive/Documents/Projects/golioth-reference-design-template/build/mcuboot/zephyr/.config.sysbuild’
Configuration saved to ‘C:/Users/nicol/OneDrive/Documents/Projects/golioth-reference-design-template/build/mcuboot/zephyr/.config’
Kconfig header saved to ‘C:/Users/nicol/OneDrive/Documents/Projects/golioth-reference-design-template/build/mcuboot/zephyr/include/generated/zephyr/autoconf.h’
CMake Error at C:/Users/nicol/OneDrive/Documents/Projects/golioth-reference-design-template/deps/zephyr/cmake/compiler/gcc/target.cmake:11 (message):
C compiler
C:/Users/nicol/.zephyr_ide/toolchains/zephyr-sdk-0.17.3/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
not found - Please check your toolchain installation
Call Stack (most recent call first):
C:/Users/nicol/OneDrive/Documents/Projects/golioth-reference-design-template/deps/zephyr/cmake/modules/FindTargetTools.cmake:103 (include)
C:/Users/nicol/OneDrive/Documents/Projects/golioth-reference-design-template/deps/zephyr/cmake/modules/kernel.cmake:25 (find_package)
C:/Users/nicol/OneDrive/Documents/Projects/golioth-reference-design-template/deps/zephyr/cmake/modules/zephyr_default.cmake:140 (include)
C:/Users/nicol/OneDrive/Documents/Projects/golioth-reference-design-template/deps/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
C:/Users/nicol/OneDrive/Documents/Projects/golioth-reference-design-template/deps/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
CMakeLists.txt:18 (find_package)

– Configuring incomplete, errors occurred!
CMake Error at cmake/modules/sysbuild_extensions.cmake:530 (message):
CMake configure failed for Zephyr project: mcuboot

Location:
C:/Users/nicol/OneDrive/Documents/Projects/golioth-reference-design-template/deps/bootloader/mcuboot/boot/zephyr
Call Stack (most recent call first):
cmake/modules/sysbuild_images.cmake:43 (ExternalZephyrProject_Cmake)
cmake/modules/sysbuild_default.cmake:21 (include)
C:/Users/nicol/OneDrive/Documents/Projects/golioth-reference-design-template/deps/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:75 (include)
C:/Users/nicol/OneDrive/Documents/Projects/golioth-reference-design-template/deps/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
C:/Users/nicol/OneDrive/Documents/Projects/golioth-reference-design-template/deps/zephyr/share/sysbuild-package/cmake/SysbuildConfig.cmake:8 (include)
template/CMakeLists.txt:10 (find_package)

– Configuring incomplete, errors occurred!
FATAL ERROR: command exited with status 1: ‘C:\Program Files\CMake\bin\cmake.EXE’ -DWEST_PYTHON=C:/Users/nicol/OneDrive/Documents/Projects/golioth-reference-design-template/.venv/Scripts/python.exe ‘-BC:\Users\nicol\OneDrive\Documents\Projects\golioth-reference-design-template\build’ -GNinja -DBOARD=nrf9160dk/nrf9160/ns ‘-SC:\Users\nicol\OneDrive\Documents\Projects\golioth-reference-design-template\deps\zephyr\share\sysbuild’ ‘-DAPP_DIR:PATH=C:\Users\nicol\OneDrive\Documents\Projects\golioth-reference-design-template\app’

Hi @nicolas,

Looking at the build output, both the Devicetree and Kconfig stages complete successfully (.dts and .config files are generated), so it seems sysbuild and MCUboot are working as expected.

The failure happens later, when CMake tries to locate the ARM compiler. The build stops because the Zephyr SDK toolchain isn’t found at the expected path:

C:/Users/nicol/.zephyr_ide/toolchains/zephyr-sdk-0.17.3/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc

as shown in these lines from the log:

CMake Error at C:/Users/nicol/OneDrive/Documents/Projects/golioth-reference-design-template/deps/zephyr/cmake/compiler/gcc/target.cmake:11 (message): 
C compiler
C:/Users/nicol/.zephyr_ide/toolchains/zephyr-sdk-0.17.3/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
not found - Please check your toolchain installation

As far as I know, this path belongs to the VS Code Zephyr extension’s managed SDK folder (.zephyr_ide), which often exists but doesn’t actually include the arm-zephyr-eabi compiler unless the Zephyr SDK was fully installed and initialized.

A few things to check:

  • Verify that the ZEPHYR_SDK_INSTALL_DIR environment variable points to a valid Zephyr SDK installation that contains toolchains for each of Zephyr’s supported architectures
  • If you’re unsure, reinstall the Zephyr SDK (or repair it) following the official docs: Install the Zephyr SDK

Additionally, consider moving the repository out of OneDrive to a shorter local path, as OneDrive paths and long filenames can lead to issues during sysbuild or MCUboot builds.

Once the SDK path is correctly configured and the compiler is found, the build should proceed without errors.

Thank you for the quick and detailed reply Mark!

I truly hate how windows forces us now to use OneDrive lol, I will try to move back to the local C drive for everything.

I will give this a shot later tonight when I get back home from work. I am trying to basically setup a custom ESP32C6 PCB to work with Golioth, and I hoping this reference repo will work seamlessly for that.

I’ll keep you posted if I run into anymore issues.

Thank you,

Nicolas