Not able to build Thread:CLI sample project for nRF5340 DK

Hi Team Nordic,

For setting up a thread network using nRF5340 DK's, I wanted to build and flash Thread: CLI sample from nrf repository. I use nRF Connect for VS Code with NCS version v2.1.2 and Zephyr Version 3.1.99. But when I tried to build the sample Thread: CLI it throws FATAL ERROR. shown below. 

Loading Zephyr default modules (Zephyr base).
-- Application: /Users/das/ncs/nrf/samples/openthread/cli
-- Found Python3: /usr/local/opt/[email protected]/bin/python3.9 (found suitable exact version "3.9.15") found components: Interpreter 
-- Cache files will be written to: /Users/das/Library/Caches/zephyr
-- Zephyr version: 3.1.99 (/Users/das/ncs/zephyr)
-- Found west (found suitable version "0.13.1", minimum required is "0.7.1")
-- Board: nrf5340dk_nrf5340_cpuapp
-- ZEPHYR_TOOLCHAIN_VARIANT not set, trying to locate Zephyr SDK
-- Found host-tools: zephyr 0.15.1 (/Users/das/ncs/toolchains/zephyr-sdk-0.15.1)
-- Found dtc: /usr/local/bin/dtc (found suitable version "1.6.1", minimum required is "1.4.6")
-- Found toolchain: zephyr 0.15.1 (/Users/das/ncs/toolchains/zephyr-sdk-0.15.1)
-- Found BOARD.dts: /Users/das/ncs/zephyr/boards/arm/nrf5340dk_nrf5340/nrf5340dk_nrf5340_cpuapp.dts
-- Generated zephyr.dts: /Users/das/ncs/nrf/samples/openthread/cli/build/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: /Users/das/ncs/nrf/samples/openthread/cli/build/zephyr/include/generated/devicetree_unfixed.h
-- Generated device_extern.h: /Users/das/ncs/nrf/samples/openthread/cli/build/zephyr/include/generated/device_extern.h
-- Including generated dts.cmake file: /Users/das/ncs/nrf/samples/openthread/cli/build/zephyr/dts.cmake
Parsing /Users/das/ncs/nrf/samples/openthread/cli/Kconfig
Loaded configuration '/Users/das/ncs/zephyr/boards/arm/nrf5340dk_nrf5340/nrf5340dk_nrf5340_cpuapp_defconfig'
Merged configuration '/Users/das/ncs/nrf/samples/openthread/cli/prj.conf'
Merged configuration '/Users/das/ncs/nrf/samples/openthread/cli/boards/nrf5340dk_nrf5340_cpuapp.conf'
Configuration saved to '/Users/das/ncs/nrf/samples/openthread/cli/build/zephyr/.config'
Kconfig header saved to '/Users/das/ncs/nrf/samples/openthread/cli/build/zephyr/include/generated/autoconf.h'
-- The C compiler identification is GNU 12.1.0
-- The CXX compiler identification is GNU 12.1.0
-- The ASM compiler identification is GNU
-- Found assembler: /Users/das/ncs/toolchains/zephyr-sdk-0.15.1/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc

=== child image 802154_rpmsg - CPUNET begin ===
loading initial cache file /Users/das/ncs/nrf/samples/openthread/cli/build/802154_rpmsg/child_image_preload.cmake
Loading Zephyr default modules (Zephyr base).
-- Application: /Users/das/ncs/zephyr/samples/boards/nrf/ieee802154/802154_rpmsg
-- Found Python3: /usr/local/bin/python3.10 (found suitable exact version "3.10.8") found components: Interpreter 
-- Cache files will be written to: /Users/das/Library/Caches/zephyr
-- Zephyr version: 3.1.99 (/Users/das/ncs/zephyr)
-- Board: nrf5340dk_nrf5340_cpunet
-- Found host-tools: zephyr 0.15.1 (/Users/das/ncs/toolchains/zephyr-sdk-0.15.1)
-- Found dtc: /usr/local/bin/dtc (found suitable version "1.6.1", minimum required is "1.4.6")
-- Found toolchain: zephyr 0.15.1 (/Users/das/ncs/toolchains/zephyr-sdk-0.15.1)
-- Found BOARD.dts: /Users/das/ncs/zephyr/boards/arm/nrf5340dk_nrf5340/nrf5340dk_nrf5340_cpunet.dts
-- Generated zephyr.dts: /Users/das/ncs/nrf/samples/openthread/cli/build/802154_rpmsg/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: /Users/das/ncs/nrf/samples/openthread/cli/build/802154_rpmsg/zephyr/include/generated/devicetree_unfixed.h
-- Generated device_extern.h: /Users/das/ncs/nrf/samples/openthread/cli/build/802154_rpmsg/zephyr/include/generated/device_extern.h
-- Including generated dts.cmake file: /Users/das/ncs/nrf/samples/openthread/cli/build/802154_rpmsg/zephyr/dts.cmake

warning: NRF_802154_ENCRYPTION (defined at modules/hal_nordic/Kconfig:50) was assigned the value 'y'
but got the value 'n'. Check these unsatisfied dependencies: NRF_802154_RADIO_DRIVER (=n), 0 (=n).
See http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_NRF_802154_ENCRYPTION and/or look up
NRF_802154_ENCRYPTION 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: NRF_802154_SER_RADIO (defined at modules/hal_nordic/Kconfig:161) 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_NRF_802154_SER_RADIO and/or look up
NRF_802154_SER_RADIO 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.


/Users/das/ncs/nrf/subsys/partition_manager/partition_manager_enabled.conf:7: warning: attempt to assign the value 'y' to the undefined symbol PARTITION_MANAGER_ENABLED

warning: HAS_NORDIC_DRIVERS (defined at modules/hal_nordic/Kconfig:11) has direct dependencies 0 with value n, but is currently being y-selected by the following symbols:
 - SOC_SERIES_NRF53X (defined at soc/arm/nordic_nrf/nrf53/Kconfig.series:6), with value y, direct dependencies <choice> (value: y), and select condition <choice> (value: y)

warning: HAS_NRFX (defined at modules/hal_nordic/nrfx/Kconfig:4) has direct dependencies 0 with value n, but is currently being y-selected by the following symbols:
 - SOC_SERIES_NRF53X (defined at soc/arm/nordic_nrf/nrf53/Kconfig.series:6), with value y, direct dependencies <choice> (value: y), and select condition <choice> (value: y)

warning: NRFX_CLOCK (defined at modules/hal_nordic/nrfx/Kconfig:14) has direct dependencies HAS_NRFX && 0 with value n, but is currently being y-selected by the following symbols:
 - CLOCK_CONTROL_NRF (defined at drivers/clock_control/Kconfig.nrf:13), with value y, direct dependencies DT_HAS_NORDIC_NRF_CLOCK_ENABLED && CLOCK_CONTROL (value: y), and select condition !CLOCK_CONTROL_NRF_FORCE_ALT && DT_HAS_NORDIC_NRF_CLOCK_ENABLED && CLOCK_CONTROL (value: y)

warning: NRFX_CLOCK_LFXO_TWO_STAGE_ENABLED (defined at modules/hal_nordic/nrfx/Kconfig:18) has direct dependencies NRFX_CLOCK && HAS_NRFX && 0 with value n, but is currently being y-selected by the following symbols:
 - CLOCK_CONTROL_NRF_K32SRC_XTAL (defined at drivers/clock_control/Kconfig.nrf:36), with value y, direct dependencies <choice CLOCK_CONTROL_NRF_SOURCE> (value: y), and select condition !SOC_SERIES_BSIM_NRFXX && !CLOCK_CONTROL_NRF_FORCE_ALT && <choice CLOCK_CONTROL_NRF_SOURCE> (value: y)

warning: NRFX_GPIOTE (defined at modules/hal_nordic/nrfx/Kconfig:63) has direct dependencies HAS_NRFX && 0 with value n, but is currently being y-selected by the following symbols:
 - GPIO_NRFX (defined at drivers/gpio/KconfigParsing /Users/das/ncs/zephyr/Kconfig
Loaded configuration '/Users/das/ncs/zephyr/boards/arm/nrf5340dk_nrf5340/nrf5340dk_nrf5340_cpunet_defconfig'
Merged configuration '/Users/das/ncs/zephyr/samples/boards/nrf/ieee802154/802154_rpmsg/prj.conf'
Merged configuration '/Users/das/ncs/nrf/subsys/partition_manager/partition_manager_enabled.conf'
Merged configuration '/Users/das/ncs/nrf/samples/openthread/cli/child_image/802154_rpmsg.conf'
.nrfx:4), with value y, direct dependencies DT_HAS_NORDIC_NRF_GPIO_ENABLED && GPIO (value: y), and select condition DT_HAS_NORDIC_NRF_GPIO_ENABLED && GPIO (value: y)

error: Aborting due to Kconfig warnings

CMake Error at /Users/das/ncs/zephyr/cmake/modules/kconfig.cmake:293 (message):
  command failed with return code: 1
Call Stack (most recent call first):
  /Users/das/ncs/zephyr/cmake/modules/zephyr_default.cmake:121 (include)
  /Users/das/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
  /Users/das/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
  CMakeLists.txt:5 (find_package)


-- Configuring incomplete, errors occurred!
CMake Error at /Users/das/ncs/nrf/cmake/multi_image.cmake:409 (message):
  CMake generation for 802154_rpmsg failed, aborting.  Command: 1
Call Stack (most recent call first):
  /Users/das/ncs/nrf/cmake/multi_image.cmake:150 (add_child_image_from_source)
  /Users/das/ncs/nrf/samples/CMakeLists.txt:151 (add_child_image)


-- Configuring incomplete, errors occurred!
See also "/Users/das/ncs/nrf/samples/openthread/cli/build/CMakeFiles/CMakeOutput.log".
See also "/Users/das/ncs/nrf/samples/openthread/cli/build/CMakeFiles/CMakeError.log".
FATAL ERROR: command exited with status 1: /usr/local/bin/cmake -DWEST_PYTHON=/usr/local/opt/[email protected]/bin/python3.9 -B/Users/das/ncs/nrf/samples/openthread/cli/build -GNinja -DBOARD=nrf5340dk_nrf5340_cpuapp -DOVERLAY_FILE=overlay-usb.conf -S/Users/das/ncs/nrf/samples/openthread/cli

I followed the following pages for build the sample. 

https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.1.2/nrf/samples/openthread/cli/README.html

https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.1.2/nrf/ug_multi_image.html#

Can someone tell me, whether I miss some configuration to build the example. I don't have any clue why it suddenly starts failing. The only thing I did was upgraded the NCS from v2.0.0 to v2.1.2. 

Note: The sample builds for nrf52840dk_nrf52840 & nrf52840dongle_nrf52840 

Thanks in advance

Vipin Das

Related