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

Hi @marko, so I placed my new west manifest repo in my user folder, and I decided to start with a simple hello world application from Zephyr to test basic Golioth integration first.

Following this guide: https://zephyrproject.org/how-to-add-golioth-to-an-existing-zephyr-or-ncs-project/

The guide details adding CONFIG_GOLIOTH_FIRMWARE_SDK=y, but as soon as I do this, I get a bunch of KConfig warnings and it’s not exactly obvious what additional config options I need to enable for the ESP32 to get this to work.. I tried adding a couple config’s for the ESP32 to see if that would enable one of those dependencies, but still didn’t help

CONFIG_GOLIOTH_FIRMWARE_SDK=y
CONFIG_NETWORKING=y
CONFIG_NET_IPV4=y
CONFIG_WIFI=y

Here are the warnings I get:

warning: ZCBOR (defined at modules/zcbor/Kconfig:7, modules\zcbor\Kconfig:7) has direct dependencies ZEPHYR_ZCBOR_MODULE || (ZEPHYR_ZCBOR_MODULE && 0) with value n, but is currently being y-selected by the following symbols:
 - GOLIOTH_FIRMWARE_SDK (defined at C:/Users/nicol/esp32-west-workspace/modules/lib/golioth-firmware-sdk/port/zephyr/Kconfig:7), with value y, direct dependencies y (value: y)

warning: MBEDTLS (defined at modules\mbedtls\Kconfig:19) has direct dependencies 0 with value n, but is currently being y-selected by the following symbols:
 - GOLIOTH_FIRMWARE_SDK (defined at C:/Users/nicol/esp32-west-workspace/modules/lib/golioth-firmware-sdk/port/zephyr/Kconfig:7), with value y, direct dependencies y (value: y)
 - NET_SOCKETS_SOCKOPT_TLS (defined at subsys/net/lib/sockets/Kconfig:128), with value y, direct dependencies NET_SOCKETS && NETWORKING (value: y), and select condition NET_NATIVE && NET_SOCKETS && NETWORKING (value: y)

warning: MBEDTLS_SSL_PROTO_DTLS (defined at modules\mbedtls\Kconfig.mbedtls:19) has direct dependencies MBEDTLS_SSL_PROTO_TLS1_2 && MBEDTLS_BUILTIN && MBEDTLS_CFG_FILE = "config-mbedtls.h" && MBEDTLS && 0 with value n, but is currently being y-selected by the following symbols:
 - NET_SOCKETS_ENABLE_DTLS (defined at subsys/net/lib/sockets/Kconfig:169), with value y, direct dependencies NET_SOCKETS_SOCKOPT_TLS && NET_SOCKETS && NETWORKING (value: y), and select condition NET_NATIVE && NET_SOCKETS_SOCKOPT_TLS && NET_SOCKETS && NETWORKING (value: y)

warning: MBEDTLS_SSL_EXTENDED_MASTER_SECRET (defined at modules\mbedtls\Kconfig.mbedtls:517) has direct dependencies MBEDTLS_SSL_PROTO_TLS1_2 && MBEDTLS_BUILTIN && MBEDTLS_CFG_FILE = "config-mbedtls.h" && MBEDTLS && 0 with value n, but is currently being y-selected by the following symbols:
 - GOLIOTH_FIRMWARE_SDK (defined at C:/Users/nicol/esp32-west-workspace/modules/lib/golioth-firmware-sdk/port/zephyr/Kconfig:7), with value y, direct dependencies y (value: y)

error: Aborting due to Kconfig warnings

Just enabling Golioth SDK via menuconfig modules, i can generate a deconfig like so

CONFIG_SERIAL=y
CONFIG_GPIO=y
CONFIG_CONSOLE=y
CONFIG_GOLIOTH_FIRMWARE_SDK=y
CONFIG_GOLIOTH_FW_UPDATE=y
CONFIG_UART_CONSOLE=y
CONFIG_NETWORKING=y

But that still results in the following errors:

warning: ZCBOR (defined at modules/zcbor/Kconfig:7, modules\zcbor\Kconfig:7) has direct dependencies ZEPHYR_ZCBOR_MODULE || (ZEPHYR_ZCBOR_MODULE && 0) with value n, but is currently being y-selected by the following symbols:
 - GOLIOTH_FIRMWARE_SDK (defined at C:/Users/nicol/esp32-west-workspace/modules/lib/golioth-firmware-sdk/port/zephyr/Kconfig:7), with value y, direct dependencies y (value: y)

warning: MBEDTLS (defined at modules\mbedtls\Kconfig:19) has direct dependencies 0 with value n, but is currently being y-selected by the following symbols:
 - GOLIOTH_FIRMWARE_SDK (defined at C:/Users/nicol/esp32-west-workspace/modules/lib/golioth-firmware-sdk/port/zephyr/Kconfig:7), with value y, direct dependencies y (value: y)
 - NET_SOCKETS_SOCKOPT_TLS (defined at subsys/net/lib/sockets/Kconfig:128), with value y, direct dependencies NET_SOCKETS && NETWORKING (value: y), and select condition NET_NATIVE && NET_SOCKETS && NETWORKING (value: y)

warning: MBEDTLS_SSL_PROTO_DTLS (defined at modules\mbedtls\Kconfig.mbedtls:19) has direct dependencies MBEDTLS_SSL_PROTO_TLS1_2 && MBEDTLS_BUILTIN && MBEDTLS_CFG_FILE = "config-mbedtls.h" && MBEDTLS && 0 with value n, but is currently being y-selected by the following symbols:
 - NET_SOCKETS_ENABLE_DTLS (defined at subsys/net/lib/sockets/Kconfig:169), with value y, direct dependencies NET_SOCKETS_SOCKOPT_TLS && NET_SOCKETS && NETWORKING (value: y), and select condition NET_NATIVE && NET_SOCKETS_SOCKOPT_TLS && NET_SOCKETS && NETWORKING (value: y)

warning: MBEDTLS_SSL_EXTENDED_MASTER_SECRET (defined at modules\mbedtls\Kconfig.mbedtls:517) has direct dependencies MBEDTLS_SSL_PROTO_TLS1_2 && MBEDTLS_BUILTIN && MBEDTLS_CFG_FILE = "config-mbedtls.h" && MBEDTLS && 0 with value n, but is currently being y-selected by the following symbols:
 - GOLIOTH_FIRMWARE_SDK (defined at C:/Users/nicol/esp32-west-workspace/modules/lib/golioth-firmware-sdk/port/zephyr/Kconfig:7), with value y, direct dependencies y (value: y)
Parsing C:/Users/nicol/esp32-west-workspace/deps/zephyr/Kconfig
Loaded configuration 'C:/Users/nicol/esp32-west-workspace/hello_world/build/primary/zephyr/.config'

error: Aborting due to Kconfig warnings

Hey @nicolas,

These warnings strongly suggest that the ZCBOR module isn’t being imported, which usually happens when it’s missing from the manifest allowlist. The allowlist determines which modules west is permitted to fetch. If zcbor isn’t included there, Zephyr treats it as absent, and Kconfig will complain whenever something (like the Firmware SDK) tries to select it.

Take a look at the west.yml file from our Reference Design Template and compare it with your own manifest. It’s possible that zcbor, or even other required modules, are missing from your allowlist.

You can also check out a couple of helpful resources, this blog post on allowlists, as well as the lecture Mike gave at EOSS on manifest files.

Ohh ok I see, thanks for those references! That’s a great write up I will need to digest..

It seems the reference example doesn’t have the actual zephyr version specified inside it’s yml file… is this supposed to be a T3 topology example? Here is my west.yml after including what the reference has:

manifest:
  remotes:
    - name: zephyrproject
      url-base: https://github.com/zephyrproject-rtos
  projects:
    - name: zephyr
      repo-path: zephyr
      remote: zephyrproject
      revision: v4.3.0
      import:
        path-prefix: deps
        name-allowlist:
          - cmsis
          - cmsis-dsp
          - cmsis_6
          - percepio
          - picolibc
          - segger
          - hal_espressif
          - hal_nordic
    # Golioth repository.
    - name: golioth
      path: modules/lib/golioth-firmware-sdk
      revision: v0.21.1
      url: https://github.com/golioth/golioth-firmware-sdk.git
      submodules: true
      import:
        file: west-zephyr.yml
        path-prefix: deps
        name-allowlist:
          - nrf
          - zephyr
          - cmsis_6
          - hal_nordic
          - mbedtls
          - mbedtls-nrf
          - mcuboot
          - net-tools
          - nrfxlib
          - oberon-psa-crypto
          - qcbor
          - segger
          - tfm-mcuboot
          - tinycrypt
          - trusted-firmware-m
          - zcbor
          
    - name: libostentus
      path: deps/modules/lib/libostentus
      revision: v2.0.0
      url: https://github.com/golioth/libostentus

    - name: zephyr-network-info
      path: deps/modules/lib/network-info
      revision: v1.2.0
      url: https://github.com/golioth/zephyr-network-info
  
  self:
    path: app

And I was missing the Kconfig, so I added that with the same values as in the reference:

# Copyright (c) 2022-2023 Golioth, Inc.
# SPDX-License-Identifier: Apache-2.0

mainmenu "Golioth application options"

if DNS_RESOLVER

config DNS_SERVER_IP_ADDRESSES
	default y

config DNS_SERVER1
	default "1.1.1.1"

endif # DNS_RESOLVER

source "Kconfig.zephyr"

So I think I am getting closer, but still getting some dependency issues around ZCBOR and MBEDTLS, even though those are now being allowed… It seemed to pull those in just fine when I did west update.. I did do a pristine build as well, and here is my current proj.conf:

# Copyright (c) 2022-2023 Golioth, Inc.
# SPDX-License-Identifier: Apache-2.0

# Enable Golioth Firmware SDK
CONFIG_GOLIOTH_FIRMWARE_SDK=y

# Golioth services used in this app
CONFIG_GOLIOTH_FW_UPDATE=y
CONFIG_GOLIOTH_LIGHTDB_STATE=y
CONFIG_LOG_BACKEND_GOLIOTH=y
CONFIG_GOLIOTH_RPC=y
CONFIG_GOLIOTH_SETTINGS=y
CONFIG_GOLIOTH_STREAM=y

# Enable common sample library
CONFIG_GOLIOTH_SAMPLE_COMMON=y

# Configure Golioth SDK dependencies
CONFIG_ZVFS_EVENTFD_MAX=14
CONFIG_ZVFS_OPEN_MAX=23
CONFIG_LOG_PROCESS_THREAD_STACK_SIZE=1536
CONFIG_MBEDTLS_ENABLE_HEAP=y
CONFIG_MBEDTLS_HEAP_SIZE=10240
CONFIG_NETWORKING=y
CONFIG_NET_IPV4=y
CONFIG_COAP_EXTENDED_OPTIONS_LEN=y
CONFIG_COAP_EXTENDED_OPTIONS_LEN_VALUE=39

# Application
CONFIG_MAIN_STACK_SIZE=2048
CONFIG_NET_LOG=y
CONFIG_NET_SHELL=y
CONFIG_REBOOT=y

# Flash memory (etc.) for firmware upgrade
CONFIG_FLASH=y
CONFIG_FLASH_MAP=y
CONFIG_NVS=y
CONFIG_STREAM_FLASH=y
CONFIG_IMG_MANAGER=y
CONFIG_IMG_ERASE_PROGRESSIVELY=y
CONFIG_REBOOT=y

# The rest of the runtime credentials config
CONFIG_SETTINGS=y
CONFIG_SETTINGS_RUNTIME=y
CONFIG_GOLIOTH_SAMPLE_SETTINGS_AUTOLOAD=y
CONFIG_GOLIOTH_SAMPLE_SETTINGS_SHELL=y

# Misc.
CONFIG_JSON_LIBRARY=y

# Longer response length needed for network info
CONFIG_GOLIOTH_RPC_MAX_RESPONSE_LEN=512
CONFIG_I2C=y

Do you guys have an example for the ESP32 specifically? It seems all the samples for Golioth on the GitHub are for the nRF, ST, and RAK base boards, but I’d like to see an example for the ESP32 to make sure there are not some obscure configurations I need to do for the Espressif HAL to work nicely with all this :slightly_smiling_face:

I am also not sure if using the latest version of Zephyr could be the issue as well..

Here are the warnings/errors I am getting now:

warning: MBEDTLS_ENABLE_HEAP (defined at modules\mbedtls\Kconfig:182) was assigned the value 'y' but
got the value 'n'. Check these unsatisfied dependencies: 0 (=n). See
http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_MBEDTLS_ENABLE_HEAP and/or look up
MBEDTLS_ENABLE_HEAP in the menuconfig/guiconfig interface. The Application Development Primer,
Setting Configuration Values, and Kconfig - Tips and Best Practices sections of the manual might be
helpful too.


warning: MBEDTLS_HEAP_SIZE (defined at modules\mbedtls\Kconfig:193) was assigned the value '10240'
but got the value ''. Check these unsatisfied dependencies: MBEDTLS_ENABLE_HEAP (=n), 0 (=n). See
http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_MBEDTLS_HEAP_SIZE and/or look up
MBEDTLS_HEAP_SIZE in the menuconfig/guiconfig interface. The Application Development Primer, Setting
Configuration Values, and Kconfig - Tips and Best Practices sections of the manual might be helpful
too.


warning: ZCBOR (defined at modules/zcbor/Kconfig:7, modules\zcbor\Kconfig:7) has direct dependencies ZEPHYR_ZCBOR_MODULE || (ZEPHYR_ZCBOR_MODULE && 0) with value n, but is currently being y-selected by the following symbols:
 - GOLIOTH_FIRMWARE_SDK (defined at C:/Users/nicol/esp32-west-workspace/deps/modules/lib/golioth-firmware-sdk/port/zephyr/Kconfig:7), with value y, direct dependencies y (value: y)
 - LOG_BACKEND_GOLIOTH (defined at C:/Users/nicol/esp32-west-workspace/deps/modules/lib/golioth-firmware-sdk/port/zephyr/Kconfig:227), with value y, direct dependencies LOG && !LOG_MODE_IMMEDIATE && GOLIOTH_FIRMWARE_SDK && GOLIOTH_FIRMWARE_SDK (value: y), and select condition LOG && !LOG_MODE_IMMEDIATE && GOLIOTH_FIRMWARE_SDK && GOLIOTH_FIRMWARE_SDK (value: y)

warning: MBEDTLS (defined at modules\mbedtls\Kconfig:19) has direct dependencies 0 with value n, but is currently being y-selected by the following symbols:
 - GOLIOTH_FIRMWARE_SDK (defined at C:/Users/nicol/esp32-west-workspace/deps/modules/lib/golioth-firmware-sdk/port/zephyr/Kconfig:7), with value y, direct dependencies y (value: y)
 - NET_SOCKETS_SOCKOPT_TLS (defined at subsys/net/lib/sockets/Kconfig:128), with value y, direct dependencies NET_SOCKETS && NETWORKING (value: y), and select condition NET_NATIVE && NET_SOCKETS && NETWORKING (value: y)

warning: MBEDTLS_SSL_PROTO_DTLS (defined at modules\mbedtls\Kconfig.mbedtls:19) has direct dependencies MBEDTLS_SSL_PROTO_TLS1_2 && MBEDTLS_BUILTIN && MBEDTLS_CFG_FILE = "config-mbedtls.h" && MBEDTLS && 0 with value n, but is currently being y-selected by the following symbols:
 - NET_SOCKETS_ENABLE_DTLS (defined at subsys/net/lib/sockets/Kconfig:169), with value y, direct dependencies NET_SOCKETS_SOCKOPT_TLS && NET_SOCKETS && NETWORKING (value: y), and select condition NET_NATIVE && NET_SOCKETS_SOCKOPT_TLS && NET_SOCKETS && NETWORKING (value: y)

warning: MBEDTLS_SSL_EXTENDED_MASTER_SECRET (defined at modules\mbedtls\Kconfig.mbedtls:517) has direct dependencies MBEDTLS_SSL_PROTO_TLS1_2 && MBEDTLS_BUILTIN && MBEDTLS_CFG_FILE = "config-mbedtls.h" && MBEDTLS && 0 with value n, but is currently being y-selected by the following symbols:
 - GOLIOTH_FIRMWARE_SDK (defined at C:/Users/nicol/esp32-west-workspace/deps/modules/lib/golioth-firmware-sdk/port/zephyr/Kconfig:7), with value y, direct dependencies y (value: y)
Parsing C:/Users/nicol/esp32-west-workspace/hello_world/Kconfig
Loaded configuration 'C:/Users/nicol/esp32-west-workspace/deps/zephyr/boards/espressif/esp32c6_devkitc/esp32c6_devkitc_hpcore_defconfig'
Merged configuration 'C:/Users/nicol/esp32-west-workspace/hello_world/prj.conf'

error: Aborting due to Kconfig warnings

The Reference Design Template is very close to a T3 topology, but not exactly the same. The RD Templates west.yml manifest file pulls in the west-ncs.yml from the Firmware SDK, which then brings in NCS v3.1.1. You can always check which Zephyr/NCS version each Firmware SDK release is compatible with in the Release Changelog.

If you let Golioth’s west-zephyr.yml drive the workspace, you should not declare Zephyr again in your own west.yml.

In your current layout, you define:

- name: zephyr
  revision: v4.3.0

and then also import west-zephyr.yml from the Firmware SDK. That creates a hybrid workspace where Zephyr is defined twice.

The correct approach with your example is to treat the Golioth Firmware SDK as a Zephyr module, not as an additional manifest to import. So instead of this:

# Golioth repository.
- name: golioth
  path: modules/lib/golioth-firmware-sdk
  revision: v0.21.1
  url: https://github.com/golioth/golioth-firmware-sdk.git
  submodules: true
  import:
    file: west-zephyr.yml
    path-prefix: deps
    name-allowlist:
      - nrf
      - zephyr
      - cmsis_6
      - hal_nordic
      - mbedtls
      - mbedtls-nrf
      - mcuboot
      - net-tools
      - nrfxlib
      - oberon-psa-crypto
      - qcbor
      - segger
      - tfm-mcuboot
      - tinycrypt
      - trusted-firmware-m
      - zcbor

Add it simply as a module:

# Golioth repository.
- name: golioth
  path: modules/lib/golioth-firmware-sdk
  revision: v0.21.1
  url: https://github.com/golioth/golioth-firmware-sdk.git
  submodules: true

Then let Zephyr’s own manifest pull in all required modules (including zcbor, mbedtls, tfm, mcuboot, etc.) by adding them to the name-allowlist under your Zephyr import. This should ensure that only one Zephyr version is present and that modules are placed in the correct directory.

1 Like

Oh ok that makes sense! Thank you so much!

I watched Mike’s video on YouTube and I like the approach of the app and deps folders, and having everything related to west in the app folder so it can all be version controlled, so I think i will work off the template repo as that makes the most sense to me now.. before I didn’t understand why it was structured the way it was, but after watching that video and reading that blogpost it makes sense!

2 Likes