mcuboot_smp_ble west build failed

I try to build https://github.com/hellesvik-nordic/samples_for_nrf_connect_sdk/tree/main/bootloader_samples/smp/mcuboot_smp_ble. But west build failed with a lot of undefined symbols.

D:\ncs\v2.4.0\bootloader\mcuboot\samples\zephyr\mcuboot_smp_ble>west build -b nrf5340dk_nrf5340_cpuapp
-- west build: generating a build system
Loading Zephyr default modules (Zephyr base).
-- Application: D:/ncs/v2.4.0/bootloader/mcuboot/samples/zephyr/mcuboot_smp_ble
-- CMake version: 3.20.5
-- Using NCS Toolchain 2.4.0 for building. (D:/ncs/toolchains/31f4403e35/cmake)
-- Found Python3: D:/ncs/toolchains/31f4403e35/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter
-- Cache files will be written to: D:/ncs/v2.4.0/zephyr/.cache
-- Zephyr version: 3.3.99 (D:/ncs/v2.4.0/zephyr)
-- Found west (found suitable version "1.0.0", minimum required is "0.7.1")
-- Board: nrf5340dk_nrf5340_cpuapp
-- Found host-tools: zephyr 0.16.0 (D:/ncs/toolchains/31f4403e35/opt/zephyr-sdk)
-- Found toolchain: zephyr 0.16.0 (D:/ncs/toolchains/31f4403e35/opt/zephyr-sdk)
-- Found Dtc: D:/ncs/toolchains/31f4403e35/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
-- Found BOARD.dts: D:/ncs/v2.4.0/zephyr/boards/arm/nrf5340dk_nrf5340/nrf5340dk_nrf5340_cpuapp.dts
-- Generated zephyr.dts: D:/ncs/v2.4.0/bootloader/mcuboot/samples/zephyr/mcuboot_smp_ble/build/zephyr/zephyr.dts
-- Generated devicetree_generated.h: D:/ncs/v2.4.0/bootloader/mcuboot/samples/zephyr/mcuboot_smp_ble/build/zephyr/include/generated/devicetree_generated.h
-- Including generated dts.cmake file: D:/ncs/v2.4.0/bootloader/mcuboot/samples/zephyr/mcuboot_smp_ble/build/zephyr/dts.cmake

warning: BT_CTLR_DATA_LENGTH_MAX (defined at
D:/ncs/v2.4.0/nrf\samples\common\mcumgr_bt_ota_dfu/Kconfig:124,
D:/ncs/v2.4.0/nrf\subsys\bluetooth\services\fast_pair/Kconfig.fast_pair:95,
subsys/bluetooth\controller/Kconfig:439) was assigned the value '251' but got the value ''. Check
these unsatisfied dependencies: (NCS_SAMPLE_MCUMGR_BT_OTA_DFU_SPEEDUP || (BT_FAST_PAIR_GATT_SERVICE
&& BT_FAST_PAIR && BT) || (BT_CTLR_DATA_LENGTH && BT_CONN && BT_CTLR && BT_HCI && BT)) (=n). See
docs.zephyrproject.org/.../kconfig.html and/or look up
BT_CTLR_DATA_LENGTH_MAX 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: MCUMGR (defined at subsys/mgmt/mcumgr/Kconfig:5) was assigned the value 'y' but got the
value 'n'. Check these unsatisfied dependencies: ZCBOR (=n). See
docs.zephyrproject.org/.../kconfig.html D:/ncs/v2.4.0/zephyr/Kconfig
Loaded configuration 'D:/ncs/v2.4.0/zephyr/boards/arm/nrf5340dk_nrf5340/nrf5340dk_nrf5340_cpuapp_defconfig'
Merged configuration 'D:/ncs/v2.4.0/bootloader/mcuboot/samples/zephyr/mcuboot_smp_ble/prj.conf'
_MCUMGR and/or look up MCUMGR 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.


D:/ncs/v2.4.0/bootloader/mcuboot/samples/zephyr/mcuboot_smp_ble/prj.conf:3: warning: attempt to assign the value 'y' to the undefined symbol MCUMGR_SMP_UART

D:/ncs/v2.4.0/bootloader/mcuboot/samples/zephyr/mcuboot_smp_ble/prj.conf:4: warning: attempt to assign the value 'y' to the undefined symbol MCUMGR_CMD_IMG_MGMT

D:/ncs/v2.4.0/bootloader/mcuboot/samples/zephyr/mcuboot_smp_ble/prj.conf:5: warning: attempt to assign the value 'y' to the undefined symbol MCUMGR_CMD_OS_MGMT

D:/ncs/v2.4.0/bootloader/mcuboot/samples/zephyr/mcuboot_smp_ble/prj.conf:13: warning: attempt to assign the value 'y' to the undefined symbol MCUMGR_SMP_BT

D:/ncs/v2.4.0/bootloader/mcuboot/samples/zephyr/mcuboot_smp_ble/prj.conf:14: warning: attempt to assign the value 'n' to the undefined symbol MCUMGR_SMP_BT_AUTHEN

D:/ncs/v2.4.0/bootloader/mcuboot/samples/zephyr/mcuboot_smp_ble/prj.conf:15: warning: attempt to assign the value 'y' to the undefined symbol MCUMGR_SMP_BT_CONN_PARAM_CONTROL

D:/ncs/v2.4.0/bootloader/mcuboot/samples/zephyr/mcuboot_smp_ble/prj.conf:29: warning: attempt to assign the value 'y' to the undefined symbol MCUMGR_SMP_REASSEMBLY_BT

D:/ncs/v2.4.0/bootloader/mcuboot/samples/zephyr/mcuboot_smp_ble/prj.conf:30: warning: attempt to assign the value '2475' to the undefined symbol MCUMGR_BUF_SIZE

D:/ncs/v2.4.0/bootloader/mcuboot/samples/zephyr/mcuboot_smp_ble/prj.conf:31: warning: attempt to assign the value 'y' to the undefined symbol OS_MGMT_MCUMGR_PARAMS

error: Aborting due to Kconfig warnings

CMake Error at D:/ncs/v2.4.0/zephyr/cmake/modules/kconfig.cmake:339 (message):
command failed with return code: 1
Call Stack (most recent call first):
D:/ncs/v2.4.0/nrf/cmake/modules/kconfig.cmake:29 (include)
D:/ncs/v2.4.0/zephyr/cmake/modules/zephyr_default.cmake:115 (include)
D:/ncs/v2.4.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
D:/ncs/v2.4.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
CMakeLists.txt:5 (find_package)


-- Configuring incomplete, errors occurred!
FATAL ERROR: command exited with status 1: 'D:\ncs\toolchains\31f4403e35\opt\bin\cmake.EXE' '-DWEST_PYTHON=D:\ncs\toolchains\31f f4403e35\opt\bin\python.exe' '-BD:\ncs\v2.4.0\bootloader\mcuboot\samples\zephyr\mcuboot_smp_ble\build' -GNinja -DBOARD=nrf5340dk_nrf5340_cpuapp '-SD:\ncs\v2.4.0\bootloader\mcuboot\samples\zephyr\mcuboot_smp_ble'

Procedures to reproduce this issue is as follows.

1. Unzipping mcuboot_smp_ble.zip to D:\ncs\v2.4.0\bootloader\mcuboot\samples\zephyr folder.

2. cd D:\ncs\v2.4.0\bootloader\mcuboot\samples\zephyr\mcuboot_smp_ble

3. west build -b nrf5340dk_nrf5340_cpuapp

Parents
  • I'm dealing with the exact same error trying to upgrade my custom firmware from version 2.3.0 to 2.4.1 and my firmware includes the functionality of the smp_svr example that that github references. There were significant changes moving from v2.3.0 to v2.4.0. The smp_svr example that that github linked to was for v2.1.0 so the errors you're seeing are likely due to the differences between v2.1.0 and v2.4.0.

    Some of these changes include needing CONFIG_ZCBOR=y. Also, the terminology of other configuration has changed e.g. it looks like

    CONFIG_MCUMGR_CMD_IMG_MGMT=y

    is being replaced by

    CONFIG_IMG_MANAGER=y
    CONFIG_MCUMGR_GRP_IMG=y

    so the changes seem quite drastic.

    If you want to see how different they are, then look at the smp_svr example from v2.3.0 and compare the .conf and src files to the same smp_svr example from v2.4.0. There were also less extreme changes I had to make to get smp_svr to work when moving from 2.1.0->2.2.0->2.3..0.

    I just now ran into this problem, but am confident that this is why you are seeing these errors. I will update you on this thread once I migrate from v2.3.0 -> 2.4.1 to confirm/deny that these are the only problems.

    (in short, the code you're trying to use was written [likely] for v2.1.0 and you're building with v2.4.0)

Reply
  • I'm dealing with the exact same error trying to upgrade my custom firmware from version 2.3.0 to 2.4.1 and my firmware includes the functionality of the smp_svr example that that github references. There were significant changes moving from v2.3.0 to v2.4.0. The smp_svr example that that github linked to was for v2.1.0 so the errors you're seeing are likely due to the differences between v2.1.0 and v2.4.0.

    Some of these changes include needing CONFIG_ZCBOR=y. Also, the terminology of other configuration has changed e.g. it looks like

    CONFIG_MCUMGR_CMD_IMG_MGMT=y

    is being replaced by

    CONFIG_IMG_MANAGER=y
    CONFIG_MCUMGR_GRP_IMG=y

    so the changes seem quite drastic.

    If you want to see how different they are, then look at the smp_svr example from v2.3.0 and compare the .conf and src files to the same smp_svr example from v2.4.0. There were also less extreme changes I had to make to get smp_svr to work when moving from 2.1.0->2.2.0->2.3..0.

    I just now ran into this problem, but am confident that this is why you are seeing these errors. I will update you on this thread once I migrate from v2.3.0 -> 2.4.1 to confirm/deny that these are the only problems.

    (in short, the code you're trying to use was written [likely] for v2.1.0 and you're building with v2.4.0)

Children
Related