Zigbee Switch sample fails out of the box with "No crypto suite for Zigbee stack has been selected"

I am following these tutorials:

https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/protocols/zigbee/qsg.html

https://nrfconnect.github.io/vscode-nrf-connect/get_started/build_app_ncs.html

I have an nRF52840 Development Kit, so naturally I selected the nrf52840_nrf52840 board as the build project. I added the prj.conf file under Kconfig fragments and left the remaining stock as it was.

Then I hit build, and I get this error:

[142/432] Linking C static library modules/nrf/subsys/mpsl/init/lib..__nrf__subsys__mpsl__init.a
[143/432] Linking C static library zephyr/drivers/flash/libdrivers__flash.a
[144/432] Building C object modules/nrf/subsys/zigbee/CMakeFiles/..__nrf__subsys__zigbee.dir/osif/zb_nrf_pwr_mgmt.c.obj
[145/432] Building C object modules/nrf/subsys/zigbee/CMakeFiles/..__nrf__subsys__zigbee.dir/osif/zb_nrf_crypto.c.obj
FAILED: modules/nrf/subsys/zigbee/CMakeFiles/..__nrf__subsys__zigbee.dir/osif/zb_nrf_crypto.c.obj
ccache /opt/nordic/ncs/toolchains/4ef6631da0/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc -DCUSTOM_IEEE802154_L2=ZIGBEE_L2 -DKERNEL -DLIBZBOSS_CONFIG_FILE=\"/opt/nordic/ncs/v2.4.1/nrfxlib/zboss/production/include/osif/libzboss_config.ed.h\" -DMBEDTLS_CONFIG_FILE=\"nrf-config.h\" -DMBEDTLS_USER_CONFIG_FILE=\"nrf-config-user.h\" -DNRF52840_XXAA -DNRF_802154_ACK_TIMEOUT_ENABLED=1 -DNRF_802154_CARRIER_FUNCTIONS_ENABLED=0 -DNRF_802154_CCA_CORR_LIMIT_DEFAULT=2 -DNRF_802154_CCA_CORR_THRESHOLD_DEFAULT=45 -DNRF_802154_CCA_ED_THRESHOLD_DEFAULT=45 -DNRF_802154_CCA_MODE_DEFAULT=NRF_RADIO_CCA_MODE_ED -DNRF_802154_ECB_PRIORITY=-1 -DNRF_802154_ENCRYPTION_ENABLED=0 -DNRF_802154_IE_WRITER_ENABLED=0 -DNRF_802154_INTERNAL_RADIO_IRQ_HANDLING=0 -DNRF_802154_PENDING_EXTENDED_ADDRESSES=16 -DNRF_802154_PENDING_SHORT_ADDRESSES=16 -DNRF_802154_RX_BUFFERS=16 -DNRF_802154_SECURITY_WRITER_ENABLED=0 -DNRF_802154_SWI_PRIORITY=1 -DNRF_802154_TX_STARTED_NOTIFY_ENABLED=1 -DNRF_802154_USE_RAW_API=1 -DUSE_PARTITION_MANAGER=1 -DZB_ED_ROLE -DZIGBEE_L2=ZIGBEE -D__PROGRAM_START -D__ZEPHYR__=1 -I/opt/nordic/ncs/v2.4.1/nrf/drivers/mpsl/clock_control -I/opt/nordic/ncs/v2.4.1/zephyr/include -Izephyr/include/generated -I/opt/nordic/ncs/v2.4.1/zephyr/soc/arm/nordic_nrf/nrf52 -I/opt/nordic/ncs/v2.4.1/zephyr/soc/arm/nordic_nrf/common/. -I/opt/nordic/ncs/v2.4.1/nrf/include -I/opt/nordic/ncs/v2.4.1/nrf/lib/multithreading_lock/. -I/opt/nordic/ncs/v2.4.1/zephyr/drivers/flash -I/opt/nordic/ncs/v2.4.1/nrf/tests/include -I/opt/nordic/ncs/v2.4.1/modules/hal/cmsis/CMSIS/Core/Include -I/opt/nordic/ncs/v2.4.1/modules/hal/nordic/nrfx -I/opt/nordic/ncs/v2.4.1/modules/hal/nordic/nrfx/drivers/include -I/opt/nordic/ncs/v2.4.1/modules/hal/nordic/nrfx/mdk -I/opt/nordic/ncs/v2.4.1/zephyr/modules/hal_nordic/nrfx/. -I/opt/nordic/ncs/v2.4.1/modules/debug/segger/SEGGER -I/opt/nordic/ncs/v2.4.1/modules/debug/segger/Config -I/opt/nordic/ncs/v2.4.1/zephyr/modules/segger/. -I/opt/nordic/ncs/v2.4.1/nrfxlib/mpsl/include -I/opt/nordic/ncs/v2.4.1/nrfxlib/mpsl/include/protocol -I/opt/nordic/ncs/v2.4.1/nrfxlib/nrf_802154/driver/include -I/opt/nordic/ncs/v2.4.1/nrfxlib/nrf_802154/sl/include -Imodules/nrfxlib/nrfxlib/nrf_security/src/include/generated -I/opt/nordic/ncs/v2.4.1/nrfxlib/nrf_security/include -I/opt/nordic/ncs/v2.4.1/nrfxlib/nrf_security/../crypto/nrf_oberon/core/include -I/opt/nordic/ncs/v2.4.1/nrfxlib/nrf_security/../crypto/nrf_oberon/core/library -I/opt/nordic/ncs/v2.4.1/modules/crypto/mbedtls/include -I/opt/nordic/ncs/v2.4.1/modules/crypto/mbedtls/library -I/opt/nordic/ncs/v2.4.1/nrfxlib/nrf_security/../crypto/nrf_oberon/include -I/opt/nordic/ncs/v2.4.1/nrfxlib/nrf_security/../crypto/nrf_oberon/include/mbedtls -I/opt/nordic/ncs/v2.4.1/nrfxlib/nrf_security/../crypto/nrf_oberon/core/oberon/drivers -I/opt/nordic/ncs/v2.4.1/nrfxlib/crypto/nrf_oberon/include/mbedtls -I/opt/nordic/ncs/v2.4.1/nrfxlib/crypto/nrf_oberon/include -I/opt/nordic/ncs/v2.4.1/nrf/subsys/zigbee/osif -I/opt/nordic/ncs/v2.4.1/nrfxlib/zboss/production/src/zb_error -I/opt/nordic/ncs/v2.4.1/nrfxlib/zboss/production/include/addons -I/opt/nordic/ncs/v2.4.1/nrfxlib/zboss/production/include -I/opt/nordic/ncs/v2.4.1/nrfxlib/zboss/production/include/zcl -I/opt/nordic/ncs/v2.4.1/nrfxlib/zboss/production/include/ha -I/opt/nordic/ncs/v2.4.1/nrfxlib/zboss/production/include/se -I/opt/nordic/ncs/v2.4.1/nrfxlib/zboss/production/include/osif -isystem /opt/nordic/ncs/v2.4.1/zephyr/lib/libc/minimal/include -isystem /opt/nordic/ncs/toolchains/4ef6631da0/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/include -isystem /opt/nordic/ncs/toolchains/4ef6631da0/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/include-fixed -isystem /opt/nordic/ncs/v2.4.1/nrfxlib/crypto/nrf_cc310_platform/include -fno-strict-aliasing -Os -imacros /Users/morten/Desktop/zigbee-switch/light_switch/build/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m4 -mthumb -mabi=aapcs -mfpu=fpv4-sp-d16 -mfloat-abi=hard --sysroot=/opt/nordic/ncs/toolchains/4ef6631da0/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi -imacros /opt/nordic/ncs/v2.4.1/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-pic -fno-pie -fno-asynchronous-unwind-tables -fno-reorder-functions --param=min-pagesize=0 -fno-defer-pop -fmacro-prefix-map=/Users/morten/Desktop/zigbee-switch/light_switch=CMAKE_SOURCE_DIR -fmacro-prefix-map=/opt/nordic/ncs/v2.4.1/zephyr=ZEPHYR_BASE -fmacro-prefix-map=/opt/nordic/ncs/v2.4.1=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 /opt/nordic/ncs/v2.4.1/nrf/subsys/zigbee/osif/zb_nrf_crypto.c
/opt/nordic/ncs/v2.4.1/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
| ^~~~~
/opt/nordic/ncs/v2.4.1/nrf/subsys/zigbee/osif/zb_nrf_crypto.c: In function 'zb_osif_aes128_hw_encrypt':
/opt/nordic/ncs/v2.4.1/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);
| ^~~~~~~~~~~
[146/432] Building C object modules/nrf/subsys/zigbee/CMakeFiles/..__nrf__subsys__zigbee.dir/osif/zb_nrf_led_button.c.obj
[147/432] Building C object modules/nrf/subsys/zigbee/CMakeFiles/..__nrf__subsys__zigbee.dir/osif/zb_nrf_platform.c.obj
[148/432] Building C object modules/nrf/subsys/zigbee/CMakeFiles/..__nrf__subsys__zigbee.dir/osif/zb_nrf_serial.c.obj
[149/432] Building C object zephyr/subsys/net/ip/CMakeFiles/subsys__net__ip.dir/net_pkt.c.obj
[150/432] Building C object modules/nrf/subsys/zigbee/CMakeFiles/..__nrf__subsys__zigbee.dir/osif/zb_nrf_logger.c.obj
[151/432] Building C object zephyr/drivers/ieee802154/CMakeFiles/drivers__ieee802154.dir/ieee802154_nrf5.c.obj
[152/432] Building C object modules/nrf/subsys/zigbee/CMakeFiles/..__nrf__subsys__zigbee.dir/osif/zb_nrf_nvram.c.obj
[153/432] Building C object zephyr/subsys/net/ip/CMakeFiles/subsys__net__ip.dir/net_context.c.obj
[154/432] Building C object modules/nrf/subsys/zigbee/CMakeFiles/..__nrf__subsys__zigbee.dir/osif/zb_nrf_transceiver.c.obj
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: /opt/nordic/ncs/toolchains/4ef6631da0/bin/cmake --build /Users/morten/Desktop/zigbee-switch/light_switch/build

I have not made any other changes to the project.

Any clue how to fix?

Parents
  • Hello Morten, and sorry about the delay. It can be a bit hectic during these summer months here on DevZone due to low staffing, though things are getting better now.

    I have an nRF52840 Development Kit, so naturally I selected the nrf52840_nrf52840 board as the build project. I added the prj.conf file under Kconfig fragments and left the remaining stock as it was.

    In other words, everything is default right?

    So what sample did this error occur from building exactly? I just built the Zigbee light bulb sample in NCS 2.4.1 without issues, just to try one of them. Are you seeing this error when building that one too?

    Regards,

    Elfving

Reply
  • Hello Morten, and sorry about the delay. It can be a bit hectic during these summer months here on DevZone due to low staffing, though things are getting better now.

    I have an nRF52840 Development Kit, so naturally I selected the nrf52840_nrf52840 board as the build project. I added the prj.conf file under Kconfig fragments and left the remaining stock as it was.

    In other words, everything is default right?

    So what sample did this error occur from building exactly? I just built the Zigbee light bulb sample in NCS 2.4.1 without issues, just to try one of them. Are you seeing this error when building that one too?

    Regards,

    Elfving

Children
No Data
Related