Cannot make Zigbee sample working with nrf52840_mdk_usb_dongle

Hello dear community!

Few months ago I bought a NRF52840 from MakerDiary (https://wiki.makerdiary.com/nrf52840-mdk-usb-dongle/) for a personal project arounf Zigbee

Weeks ago I reached this site about difficulties to set up environnement to program nrf52840.
I'm now able to setup a stable environnement, but I'm stuck with building sample to experiment Zigbee protocol.


I can build firmware for hello world, blinky and so on with the command (please note the board's name, I had to change it even if the documentation mentionned another board):
west build -p always -b nrf52840_mdk_usb_dongle samples/hello_world

But when I tried this one:
west build -p always -b nrf52840_mdk_usb_dongle samples/zigbee/shell

I had many errors (please find them below). It seems that these samples are note fully configured to work with nrf52840_mdk_usb_dongle board?

Would you mind to help me solving this issue? I think i'm lake of skills about configuring Zephyr or whatever... I'm confused with all documentation and very lost :(

Thanks,




######## LOG ERROR FOR nrf52840_mdk_usb_dongle WITH SAMPLE ZIGBEE/SHELL ########


$ west build -p always -b nrf52840_mdk_usb_dongle samples/zigbee/shell
-- west build: making build dir /home/greg/Documents/distro-pyhton-home/my-workspace/ncs-playground/build pristine
-- west build: generating a build system
Loading Zephyr module(s) (Zephyr base): sysbuild_default
-- Found Python3: /run/host/var/home/greg/venv/bin/python3 (found suitable version "3.12.3", minimum required is "3.10") found components: Interpreter
-- Cache files will be written to: /var/home/greg/Documents/distro-pyhton-home/.cache/zephyr
-- Found west (found suitable version "1.5.0", minimum required is "0.14.0")
-- Board: nrf52840_mdk_usb_dongle, qualifiers: nrf52840
Parsing /home/greg/Documents/distro-pyhton-home/my-workspace/zephyr/share/sysbuild/Kconfig
Loaded configuration '/home/greg/Documents/distro-pyhton-home/my-workspace/ncs-playground/build/_sysbuild/empty.conf'
Merged configuration '/home/greg/Documents/distro-pyhton-home/my-workspace/ncs-playground/build/_sysbuild/empty.conf'
Configuration saved to '/home/greg/Documents/distro-pyhton-home/my-workspace/ncs-playground/build/zephyr/.config'
Kconfig header saved to '/home/greg/Documents/distro-pyhton-home/my-workspace/ncs-playground/build/_sysbuild/autoconf.h'
--
***************************
* Running CMake for shell *
***************************

Loading Zephyr default modules (Zephyr base).
-- Application: /home/greg/Documents/distro-pyhton-home/my-workspace/ncs-playground/samples/zigbee/shell
-- CMake version: 4.1.2
-- Found Python3: /run/host/var/home/greg/venv/bin/python (found suitable version "3.12.3", minimum required is "3.10") found components: Interpreter
-- Cache files will be written to: /var/home/greg/Documents/distro-pyhton-home/.cache/zephyr
-- Zephyr version: 4.2.99 (/home/greg/Documents/distro-pyhton-home/my-workspace/zephyr)
-- Found west (found suitable version "1.5.0", minimum required is "0.14.0")
-- Board: nrf52840_mdk_usb_dongle, qualifiers: nrf52840
-- ZEPHYR_TOOLCHAIN_VARIANT not set, trying to locate Zephyr SDK
-- Found host-tools: zephyr 0.16.1 (/var/home/greg/Documents/distro-pyhton-home/zephyr-sdk-0.16.1)
-- Found toolchain: zephyr 0.16.1 (/var/home/greg/Documents/distro-pyhton-home/zephyr-sdk-0.16.1)
-- Found Dtc: /var/home/greg/Documents/distro-pyhton-home/zephyr-sdk-0.16.1/sysroots/x86_64-pokysdk-linux/usr/bin/dtc (found suitable version "1.6.0", minimum required is "1.4.6")
-- Found BOARD.dts: /home/greg/Documents/distro-pyhton-home/my-workspace/zephyr/boards/makerdiary/nrf52840_mdk_usb_dongle/nrf52840_mdk_usb_dongle.dts
-- Generated zephyr.dts: /home/greg/Documents/distro-pyhton-home/my-workspace/ncs-playground/build/shell/zephyr/zephyr.dts
-- Generated pickled edt: /home/greg/Documents/distro-pyhton-home/my-workspace/ncs-playground/build/shell/zephyr/edt.pickle
-- Generated devicetree_generated.h: /home/greg/Documents/distro-pyhton-home/my-workspace/ncs-playground/build/shell/zephyr/include/generated/zephyr/devicetree_generated.h

warning: LOG_PROCESS_THREAD_STARTUP_DELAY_MS (defined at
boards/common/usb/Kconfig.cdc_acm_serial.defconfig:43, subsys/logging/Kconfig.processing:64) was
assigned the value '1000' but got the value ''. Check these unsatisfied dependencies: ((LOG &&
BOARD_SERIAL_BACKEND_CDC_ACM && BOARD_NRF52840_MDK_USB_DONGLE) || (LOG_PROCESS_THREAD &&
LOG_MODE_DEFERRED && !LOG_FRONTEND_ONLY && !LOG_MODE_MINIMAL && LOG)) (=n). See
http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_LOG_PROCESS_THREAD_STARTUP_DELAY_MS and/or
look up LOG_PROCESS_THREAD_STARTUP_DELAY_MS 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: LOG_PROCESS_THREAD_STACK_SIZE (defined at soc/nordic/nrf54h/Kconfig.defconfig:45,
subsys/logging/Kconfig.processing:78) was assigned the value '1024' but got the value ''. Check
these unsatisfied dependencies: ((LOG && PM && SOC_SERIES_NRF54HX && SOC_FAMILY_NORDIC_NRF) ||
(LOG_PROCESS_THREAD && LOG_MODE_DEFERRED && !LOG_FRONTEND_ONLY && !LOG_MODE_MINIMAL && LOG)) (=n).
See http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_LOG_PROCESS_THREAD_STACK_SIZE and/or
look up LOG_PROCESS_THREAD_STACK_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: LOG_BUFFER_SIZE (defined at /home/greg/Documents/distro-pyhton-home/my-
workspace/nrf/modules/../subsys/net/openthread/Kconfig.defconfig:118,
subsys/logging/Kconfig.processing:121) was assigned the value '4096' but got the value ''. Check
these unsatisfied dependencies: (OPENTHREAD || (LOG_MODE_DEFERRED && !LOG_FRONTEND_ONLY &&
!LOG_MODE_MINIMAL && LOG)) (=n). See
http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_LOG_BUFFER_SIZE and/or look up
LOG_BUFFER_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: LOG_CMDS (defined at subsys/logging/Kconfig.misc:6) was assigned the value 'y' but got the
value 'n'. Check these unsatisfied dependencies: SHELL (=n), LOG (=n). See
http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_LOG_CMDS and/or look up LOG_CMDS 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: SHELL_BACKEND_SERIAL_RX_RING_BUFFER_SIZE (defined at
subsys/shell/backends/Kconfig.backends:89) was assigned the value '128' but got the value ''. Check
these unsatisfied dependencies: (SHELL_BACKEND_SERIAL_API_INTERRUPT_DRIVEN ||
SHELL_BACKEND_SERIAL_API_POLLING) (=n), SHELL_BACKEND_SERIAL (=n), SHELL_BACKENDS (=n), SHELL (=n).
See
http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_SHELL_BACKEND_SERIAL_RX_RING_BUFFER_SIZE
and/or look up SHELL_BACKEND_SERIAL_RX_RING_BUFFER_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: The choice symbol LOG_MODE_DEFERRED (defined at subsys/logging/Kconfig.mode:11) was
selected (set =y), but no symbol ended up as the choice selection. See
http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_LOG_MODE_DEFERRED and/or look up
LOG_MODE_DEFERRED 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.


/home/greg/Documents/distro-pyhton-home/my-workspace/ncs-playground/samples/zigbee/shell/prj.conf:26: warning: attempt to assign the value 'y' to the undefined symbol ZIGBEE

/home/greg/Documents/distro-pyhton-home/my-workspace/ncs-playground/samples/zigbee/shell/prj.conf:27: warning: attempt to assign the value 'y' to the undefined symbol ZIGBEE_APP_UTILS

/home/greg/Documents/distro-pyhton-home/my-workspace/ncs-playground/samples/zigbee/shell/prj.conf:28: warning: attempt to assign the value 'y' to the undefined symbol ZIGBEE_ROLE_ROUTER

/home/greg/Documents/distro-pyhton-home/my-workspace/ncs-playground/samples/zigbee/shell/prj.conf:47: warning: attempt to assign the value 'y' to the undefined symbol ZIGBEE_SHELL

/home/greg/Documents/distro-pyhton-home/my-workspace/ncs-playground/samples/zigbee/shell/prj.conf:48: warning: attempt to assign the value 'y' to the undefined symbol ZIGBEE_SHELL_DEBUG_CMD

/home/greg/Documents/distro-pyhton-home/my-workspace/ncs-playground/samples/zigbee/shell/prj.conf:49: warning: attempt to assign the value '64' to the undefined symbol ZIGBEE_SHELL_ENDPOINT
Parsing /home/greg/Documents/distro-pyhton-home/my-workspace/zephyr/Kconfig
Loaded configuration '/home/greg/Documents/distro-pyhton-home/my-workspace/zephyr/boards/makerdiary/nrf52840_mdk_usb_dongle/nrf52840_mdk_usb_dongle_defconfig'
Merged configuration '/home/greg/Documents/distro-pyhton-home/my-workspace/ncs-playground/samples/zigbee/shell/prj.conf'
Merged configuration '/home/greg/Documents/distro-pyhton-home/my-workspace/ncs-playground/build/shell/zephyr/.config.sysbuild'

error: Aborting due to Kconfig warnings

CMake Error at /home/greg/Documents/distro-pyhton-home/my-workspace/zephyr/cmake/modules/kconfig.cmake:387 (message):
command failed with return code: 1
Call Stack (most recent call first):
/home/greg/Documents/distro-pyhton-home/my-workspace/nrf/cmake/modules/kconfig.cmake:94 (include)
/home/greg/Documents/distro-pyhton-home/my-workspace/zephyr/cmake/modules/zephyr_default.cmake:131 (include)
/home/greg/Documents/distro-pyhton-home/my-workspace/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
/home/greg/Documents/distro-pyhton-home/my-workspace/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
CMakeLists.txt:9 (find_package)


-- Configuring incomplete, errors occurred!
CMake Error at cmake/modules/sysbuild_extensions.cmake:531 (message):
CMake configure failed for Zephyr project: shell

Location:
/home/greg/Documents/distro-pyhton-home/my-workspace/ncs-playground/samples/zigbee/shell
Call Stack (most recent call first):
cmake/modules/sysbuild_images.cmake:43 (ExternalZephyrProject_Cmake)
cmake/modules/sysbuild_default.cmake:21 (include)
/home/greg/Documents/distro-pyhton-home/my-workspace/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:75 (include)
/home/greg/Documents/distro-pyhton-home/my-workspace/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
/home/greg/Documents/distro-pyhton-home/my-workspace/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: /usr/bin/cmake -DWEST_PYTHON=/run/host/var/home/greg/venv/bin/python3 -B/home/greg/Documents/distro-pyhton-home/my-workspace/ncs-playground/build -GNinja -DBOARD=nrf52840_mdk_usb_dongle -S/home/greg/Documents/distro-pyhton-home/my-workspace/zephyr/share/sysbuild -DAPP_DIR:PATH=/home/greg/Documents/distro-pyhton-home/my-workspace/ncs-playground/samples/zigbee/shell

  • Hi  !

    Here is the prj.conf:

    #
    # Copyright (c) 2020 Nordic Semiconductor ASA
    #
    # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
    #
    
    CONFIG_NCS_SAMPLES_DEFAULTS=y
    
    CONFIG_UART_INTERRUPT_DRIVEN=y
    CONFIG_SERIAL=y
    CONFIG_GPIO=y
    
    # Make sure printk is not printing to the UART console
    CONFIG_CONSOLE=y
    CONFIG_UART_CONSOLE=y
    
    CONFIG_HEAP_MEM_POOL_SIZE=2048
    
    CONFIG_ZIGBEE=y
    CONFIG_ZIGBEE_APP_UTILS=y
    CONFIG_ZIGBEE_ROLE_END_DEVICE=y
    
    # Enable DK LED and Buttons library
    CONFIG_DK_LIBRARY=y
    
    # This example requires more workqueue stack
    CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
    
    # Enable API for powering down unused RAM parts
    CONFIG_RAM_POWER_DOWN_LIBRARY=y
    
    # Networking
    CONFIG_NET_IPV6=n
    CONFIG_NET_IP_ADDR_CHECK=n
    CONFIG_NET_UDP=n
    

    I tired two time with adding

    CONFIG_NRF_SECURITY=y
    CONFIG_NRF_CC3XX_PLATFORM=y

    And then

    CONFIG_NRF_SECURITY=y
    CONFIG_NRF_CC3XX_PLATFORM=y
    CONFIG_NRF_OBERON=y
    

    But result is still this error:

    [...]
    /v2.9.0/zephyr=ZEPHYR_BASE -fmacro-prefix-map=/var/home/greg/Documents/nordicsemi/nordichome/ncs/v2.9.0=WEST_TOPDIR -ffunction-sections -fdata-sections -std=c99 -nostdinc -Wno-packed-bitfield-compat -MD -MT modules/nrf/subsys/zigbee/CMakeFiles/..__nrf__subsys__zigbee.dir/osif/zb_nrf_crypto.c.obj -MF modules/nrf/subsys/zigbee/CMakeFiles/..__nrf__subsys__zigbee.dir/osif/zb_nrf_crypto.c.obj.d -o modules/nrf/subsys/zigbee/CMakeFiles/..__nrf__subsys__zigbee.dir/osif/zb_nrf_crypto.c.obj -c /var/home/greg/Documents/nordicsemi/nordichome/ncs/v2.9.0/nrf/subsys/zigbee/osif/zb_nrf_crypto.c
    /var/home/greg/Documents/nordicsemi/nordichome/ncs/v2.9.0/nrf/subsys/zigbee/osif/zb_nrf_crypto.c:18:2: error: #error No crypto suite for Zigbee stack has been selected
       18 | #error No crypto suite for Zigbee stack has been selected
          |  ^~~~~
    /var/home/greg/Documents/nordicsemi/nordichome/ncs/v2.9.0/nrf/subsys/zigbee/osif/zb_nrf_crypto.c: In function 'zb_osif_aes128_hw_encrypt':
    /var/home/greg/Documents/nordicsemi/nordichome/ncs/v2.9.0/nrf/subsys/zigbee/osif/zb_nrf_crypto.c:112:9: warning: implicit declaration of function 'encrypt_aes' [-Wimplicit-function-declaration]
      112 |         encrypt_aes(key, msg, c);
          |         ^~~~~~~~~~~
    [231/393] Building C object zephyr/drivers/serial/CMakeFiles/drivers__serial.dir/uart_nrfx_uarte.c.obj
    ninja: build stopped: subcommand failed.
    FAILED: _sysbuild/sysbuild/images/light_switch-prefix/src/light_switch-stamp/light_switch-build /var/home/greg/Documents/nordicsemi/nordichome/ncs/v2.9.0/build/_sysbuild/sysbuild/images/light_switch-prefix/src/light_switch-stamp/light_switch-build 
    cd /var/home/greg/Documents/nordicsemi/nordichome/ncs/v2.9.0/build/light_switch && /var/home/greg/Documents/nordicsemi/nordichome/ncs/toolchains/b77d8c1312/usr/local/bin/cmake --build .
    ninja: build stopped: subcommand failed.
    FATAL ERROR: command exited with status 1: /var/home/greg/Documents/nordicsemi/nordichome/ncs/toolchains/b77d8c1312/usr/local/bin/cmake --build /var/home/greg/Documents/nordicsemi/nordichome/ncs/v2.9.0/build

  • i tested with this prj.conf on NCS2.9.0 on light_switch using VSC

    1401.prj.conf

    And everything builds fine with NRF_SECURITY ENABLED

  • Wonderfu  l!

    I'm able to build it now! Thanks!

    But, I sureley misunderstood, but even with the light_switch firmware my nrf52840 remain undiscoverable from Home Assistant (using Zigbee Home Automation)... Do you know something about this?

    Thanks again!

  • I am not sure why,  but have you looked into the documentation here  You probably need to enable CONFIG_ZIGBEE_CHANNEL_SELECTION_MODE_SINGLE=y and set CONFIG_ZIGBEE_CHANNEL to the same channel channel your home assistance is set to.

  • Hi  !

    It's been a while! Thanks for your previous answer.

    Sdely,neither with `CONFIG_ZIGBEE_CHANNEL_SELECTION_MODE_SINGLE=y` and the according channel or neither with `CONFIG_ZIGBEE_CHANNEL_SELECTION_MODE_MULTI=y` I can make it.

    I tried to add USB/serial support to troubleshoot, but it's not enabled in v2.9.0.

    With the hello world sample of Makerdiary repo, I can build, then flash to board and see a COM10 appearing. Then I open putty and could see the `printk` value.

    I tried to hack a little de nrfsdk v2.9.0 to add usb support thanks to `hello_world` sample of makerdiary repo.

    • copying Makerdiary directory `zephyr/boards/makerdiary` and replace nrfsdk makderdiarey `zephyr/boards/makerdiary`
    • copying Makerdiary directory `zephyr/boards/common/usb` to nrfsdk `zephyr/boards/common`
    • copying Makerdiary directory `zephyr/subsys/usb/device_next/app` to nrfsdk `zephyr/subsys/usb/device_next/`
    • copying Makerdiary file `zephyr/boards/Kconfig` and replace nrfsdk file `zephyr/boards/Kconfig`

    And the result is now:

    - For zigbee/light_switch:

    (v2.9.0) C:\ncs\v2.9.0\nrf> west build -p always -b nrf52840_mdk_usb_dongle .\samples\zigbee\light_switch -- -DCONF_FILE=prj_usb.conf
    -- west build: making build dir C:\ncs\v2.9.0\nrf\build pristine
    -- west build: generating a build system
    Loading Zephyr module(s) (Zephyr base): sysbuild_default
    -- Found Python3: C:/ncs/toolchains/b620d30767/opt/bin/python.exe (found suitable version "3.12.4", minimum required is "3.8") found components: Interpreter
    -- Cache files will be written to: C:/ncs/v2.9.0/zephyr/.cache
    -- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
    -- Board: nrf52840_mdk_usb_dongle, qualifiers: nrf52840
    Parsing C:/ncs/v2.9.0/nrf/samples/zigbee/light_switch/Kconfig.sysbuild
    Loaded configuration 'C:/ncs/v2.9.0/nrf/build/_sysbuild/empty.conf'
    Merged configuration 'C:/ncs/v2.9.0/nrf/build/_sysbuild/empty.conf'
    Configuration saved to 'C:/ncs/v2.9.0/nrf/build/zephyr/.config'
    Kconfig header saved to 'C:/ncs/v2.9.0/nrf/build/_sysbuild/autoconf.h'
    --
       **********************************
       * Running CMake for light_switch *
       **********************************
    
    Loading Zephyr default modules (Zephyr base).
    -- Application: C:/ncs/v2.9.0/nrf/samples/zigbee/light_switch
    -- CMake version: 3.21.0
    -- Using NCS Toolchain 2.8.20241119.782234748775 for building. (C:/ncs/toolchains/b620d30767/cmake)
    -- Found Python3: C:/ncs/toolchains/b620d30767/opt/bin/python.exe (found suitable version "3.12.4", minimum required is "3.8") found components: Interpreter
    -- Cache files will be written to: C:/ncs/v2.9.0/zephyr/.cache
    -- Zephyr version: 3.7.99 (C:/ncs/v2.9.0/zephyr)
    -- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
    -- Board: nrf52840_mdk_usb_dongle, qualifiers: nrf52840
    -- Found host-tools: zephyr 0.17.0 (C:/ncs/toolchains/b620d30767/opt/zephyr-sdk)
    -- Found toolchain: zephyr 0.17.0 (C:/ncs/toolchains/b620d30767/opt/zephyr-sdk)
    -- Found Dtc: C:/ncs/toolchains/b620d30767/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
    -- Found BOARD.dts: C:/ncs/v2.9.0/zephyr/boards/makerdiary/nrf52840_mdk_usb_dongle.makerdiary/nrf52840_mdk_usb_dongle.dts
    -- Generated zephyr.dts: C:/ncs/v2.9.0/nrf/build/light_switch/zephyr/zephyr.dts
    -- Generated devicetree_generated.h: C:/ncs/v2.9.0/nrf/build/light_switch/zephyr/include/generated/zephyr/devicetree_generated.h
    -- Including generated dts.cmake file: C:/ncs/v2.9.0/nrf/build/light_switch/zephyr/dts.cmake
    CMake Error at C:/ncs/v2.9.0/zephyr/cmake/modules/kconfig.cmake:327 (message):
      File not found: C:/ncs/v2.9.0/nrf/samples/zigbee/light_switch/prj_usb.conf
    Call Stack (most recent call first):
      C:/ncs/v2.9.0/nrf/cmake/modules/kconfig.cmake:29 (include)
      C:/ncs/v2.9.0/zephyr/cmake/modules/zephyr_default.cmake:133 (include)
      C:/ncs/v2.9.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
      C:/ncs/v2.9.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
      CMakeLists.txt:9 (find_package)
    
    
    -- Configuring incomplete, errors occurred!
    CMake Error at cmake/modules/sysbuild_extensions.cmake:514 (message):
      CMake configure failed for Zephyr project: light_switch
    
      Location: C:/ncs/v2.9.0/nrf/samples/zigbee/light_switch
    Call Stack (most recent call first):
      cmake/modules/sysbuild_images.cmake:20 (ExternalZephyrProject_Cmake)
      cmake/modules/sysbuild_default.cmake:20 (include)
      C:/ncs/v2.9.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:75 (include)
      C:/ncs/v2.9.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
      C:/ncs/v2.9.0/zephyr/share/sysbuild-package/cmake/SysbuildConfig.cmake:8 (include)
      template/CMakeLists.txt:10 (find_package)
    
    
    -- Configuring incomplete, errors occurred!
    See also "C:/ncs/v2.9.0/nrf/build/CMakeFiles/CMakeOutput.log".
    ←[91mFATAL ERROR: command exited with status 1: 'C:\ncs\toolchains\b620d30767\opt\bin\cmake.EXE' -DWEST_PYTHON=C:/ncs/toolchains/b620d30767/opt/bin/python.exe '-BC:\ncs\v2.9.0\nrf\build' -GNinja -DBOARD=nrf52840_mdk_usb_dongle -DCONF_FILE=prj_usb.conf '-SC:\ncs\v2.9.0\zephyr\share\sysbuild' '-DAPP_DIR:PATH=C:\ncs\v2.9.0\nrf\samples\zigbee\light_switch'
    ←[0m
    (v2.9.0) C:\ncs\v2.9.0\nrf>

    - For zigbee/shell

    (v2.9.0) C:\ncs\v2.9.0\nrf> west build -p always -b nrf52840_mdk_usb_dongle .\samples\zigbee\shell -- -DCONF_FILE=prj_usb.conf
    -- west build: making build dir C:\ncs\v2.9.0\nrf\build pristine
    -- west build: generating a build system
    Loading Zephyr module(s) (Zephyr base): sysbuild_default
    -- Found Python3: C:/ncs/toolchains/b620d30767/opt/bin/python.exe (found suitable version "3.12.4", minimum required is "3.8") found components: Interpreter
    -- Cache files will be written to: C:/ncs/v2.9.0/zephyr/.cache
    -- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
    -- Board: nrf52840_mdk_usb_dongle, qualifiers: nrf52840
    Parsing C:/ncs/v2.9.0/nrf/samples/zigbee/shell/Kconfig.sysbuild
    Loaded configuration 'C:/ncs/v2.9.0/nrf/build/_sysbuild/empty.conf'
    Merged configuration 'C:/ncs/v2.9.0/nrf/build/_sysbuild/empty.conf'
    Configuration saved to 'C:/ncs/v2.9.0/nrf/build/zephyr/.config'
    Kconfig header saved to 'C:/ncs/v2.9.0/nrf/build/_sysbuild/autoconf.h'
    --
       ***************************
       * Running CMake for shell *
       ***************************
    
    Loading Zephyr default modules (Zephyr base).
    -- Application: C:/ncs/v2.9.0/nrf/samples/zigbee/shell
    -- CMake version: 3.21.0
    -- Using NCS Toolchain 2.8.20241119.782234748775 for building. (C:/ncs/toolchains/b620d30767/cmake)
    -- Found Python3: C:/ncs/toolchains/b620d30767/opt/bin/python.exe (found suitable version "3.12.4", minimum required is "3.8") found components: Interpreter
    -- Cache files will be written to: C:/ncs/v2.9.0/zephyr/.cache
    -- Zephyr version: 3.7.99 (C:/ncs/v2.9.0/zephyr)
    -- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
    -- Board: nrf52840_mdk_usb_dongle, qualifiers: nrf52840
    -- Found host-tools: zephyr 0.17.0 (C:/ncs/toolchains/b620d30767/opt/zephyr-sdk)
    -- Found toolchain: zephyr 0.17.0 (C:/ncs/toolchains/b620d30767/opt/zephyr-sdk)
    -- Found Dtc: C:/ncs/toolchains/b620d30767/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
    -- Found BOARD.dts: C:/ncs/v2.9.0/zephyr/boards/makerdiary/nrf52840_mdk_usb_dongle.makerdiary/nrf52840_mdk_usb_dongle.dts
    -- Generated zephyr.dts: C:/ncs/v2.9.0/nrf/build/shell/zephyr/zephyr.dts
    -- Generated devicetree_generated.h: C:/ncs/v2.9.0/nrf/build/shell/zephyr/include/generated/zephyr/devicetree_generated.h
    -- Including generated dts.cmake file: C:/ncs/v2.9.0/nrf/build/shell/zephyr/dts.cmake
    
    warning: Deprecated symbol ZIGBEE is enabled.
    
    
    warning: Experimental symbol UDC_DRIVER is enabled.
    
    
    warning: Experimental symbol USB_DEVICE_STACK_NEXT is enabled.
    
    
    Parsing C:/ncs/v2.9.0/zephyr/Kconfig
    warning: CDC_ACM_SERIAL_INITIALIZE_AT_BOOT (defined at boards/common/usb/Kconfig.cdc_acm_serial.defconfig:29) defined without a typeLoaded configuration 'C:/ncs/v2.9.0/zephyr/boards/makerdiary/nrf52840_mdk_usb_dongle.makerdiary/nrf52840_mdk_usb_dongle_defconfig'
    Merged configuration 'C:/ncs/v2.9.0/nrf/samples/zigbee/shell/prj_usb.conf'
    Merged configuration 'C:/ncs/v2.9.0/nrf/build/shell/zephyr/.config.sysbuild'
    
    
    error: Aborting due to Kconfig warnings
    
    CMake Error at C:/ncs/v2.9.0/zephyr/cmake/modules/kconfig.cmake:396 (message):
      command failed with return code: 1
    Call Stack (most recent call first):
      C:/ncs/v2.9.0/nrf/cmake/modules/kconfig.cmake:29 (include)
      C:/ncs/v2.9.0/zephyr/cmake/modules/zephyr_default.cmake:133 (include)
      C:/ncs/v2.9.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
      C:/ncs/v2.9.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
      CMakeLists.txt:9 (find_package)
    
    
    -- Configuring incomplete, errors occurred!
    CMake Error at cmake/modules/sysbuild_extensions.cmake:514 (message):
      CMake configure failed for Zephyr project: shell
    
      Location: C:/ncs/v2.9.0/nrf/samples/zigbee/shell
    Call Stack (most recent call first):
      cmake/modules/sysbuild_images.cmake:20 (ExternalZephyrProject_Cmake)
      cmake/modules/sysbuild_default.cmake:20 (include)
      C:/ncs/v2.9.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:75 (include)
      C:/ncs/v2.9.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
      C:/ncs/v2.9.0/zephyr/share/sysbuild-package/cmake/SysbuildConfig.cmake:8 (include)
      template/CMakeLists.txt:10 (find_package)
    
    
    -- Configuring incomplete, errors occurred!
    See also "C:/ncs/v2.9.0/nrf/build/CMakeFiles/CMakeOutput.log".
    ←[91mFATAL ERROR: command exited with status 1: 'C:\ncs\toolchains\b620d30767\opt\bin\cmake.EXE' -DWEST_PYTHON=C:/ncs/toolchains/b620d30767/opt/bin/python.exe '-BC:\ncs\v2.9.0\nrf\build' -GNinja -DBOARD=nrf52840_mdk_usb_dongle -DCONF_FILE=prj_usb.conf '-SC:\ncs\v2.9.0\zephyr\share\sysbuild' '-DAPP_DIR:PATH=C:\ncs\v2.9.0\nrf\samples\zigbee\shell'
    ←[0m
    (v2.9.0) C:\ncs\v2.9.0\nrf>

    Both ave the same prj_usb.conf file:

    #
    # Copyright (c) 2022 Nordic Semiconductor ASA
    #
    # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
    #
    
    CONFIG_NCS_SAMPLES_DEFAULTS=y
    
    # LOG configuration
    CONFIG_LOG_CMDS=y
    CONFIG_LOG_MODE_DEFERRED=y
    CONFIG_LOG_BUFFER_SIZE=4096
    CONFIG_LOG_PROCESS_THREAD_STACK_SIZE=1024
    CONFIG_LOG_PROCESS_THREAD_STARTUP_DELAY_MS=1000
    
    # Configure serial
    CONFIG_UART_INTERRUPT_DRIVEN=y
    CONFIG_SERIAL=y
    CONFIG_GPIO=y
    
    # Make sure printk is not printing to the UART console
    CONFIG_CONSOLE=y
    CONFIG_UART_CONSOLE=y
    
    CONFIG_HEAP_MEM_POOL_SIZE=2048
    CONFIG_MAIN_THREAD_PRIORITY=7
    
    CONFIG_ZIGBEE=y
    CONFIG_ZIGBEE_APP_UTILS=y
    CONFIG_ZIGBEE_ROLE_ROUTER=y
    
    # Enable DK LED and Buttons library
    CONFIG_DK_LIBRARY=y
    
    # This example requires more workqueue stack
    CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
    
    # Enable nRF ECB driver
    CONFIG_CRYPTO=y
    CONFIG_CRYPTO_NRF_ECB=y
    CONFIG_CRYPTO_INIT_PRIORITY=80
    
    # Networking
    CONFIG_NET_IPV6=n
    CONFIG_NET_IP_ADDR_CHECK=n
    CONFIG_NET_UDP=n
    
    # Zigbee shell
    CONFIG_ZIGBEE_SHELL=y
    CONFIG_ZIGBEE_SHELL_DEBUG_CMD=y
    CONFIG_ZIGBEE_SHELL_ENDPOINT=64
    
    # Increase RX serial ring buffer
    CONFIG_SHELL_BACKEND_SERIAL_RX_RING_BUFFER_SIZE=128
    
    # USB subsystem configuration
    CONFIG_USB_DEVICE_STACK=y
    CONFIG_USB_DEVICE_REMOTE_WAKEUP=n
    CONFIG_USB_DEVICE_PRODUCT="Zigbee Shell"
    CONFIG_USB_CDC_ACM=y
    CONFIG_UART_LINE_CTRL=y
    # Initialize USB device as soon as possible as the USB CDC ACM is used
    # as backend for both Shell and Logging subsystems.
    CONFIG_USB_DEVICE_INITIALIZE_AT_BOOT=y
    
    # Enable this to duplicate Zephyr logs to default Logger serial backend,
    # usually connected to on-board JLink device.
    # CONFIG_LOG_BACKEND_UART=y
    
    
    #GREG
    #CONFIG_UART_LINE_CTRL=y
    
    # USB subsystem configuration
    #CONFIG_USB_DEVICE_STACK=y
    #CONFIG_USB_DEVICE_PRODUCT="Zephyr USB Console"
    #CONFIG_USB_DEVICE_INITIALIZE_AT_BOOT=y

    Would you be kind to enlight me please?

    Thnaks again!

Related