nrf connect sdk: MCUBOOT build error

Hi,

So far, we have been using NRF5 SDK for our BLE product using nrf52840. For the next gen product, we would like switch to Nrf Connect SDK. I installed NCS 2.3.0 and tries few BLE demos which seems to work fine. 

We want to enable the OTA update over BLE as first step in our product with possibility to update from nrf connect app:

- MCUBoot is the right option for this? or we better look into Nordic Immutable secure bootloader?

- As first test, i started the MCUBoot tutorial (SMP server sample) from following link

https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/samples/subsys/mgmt/mcumgr/smp_svr/README.html#smp-svr-sample

The SMP server samples builds fine:

amir@CPU047 MINGW64 /c/ncs/v2.3.0/zephyr ((v3.2.99-ncs2))
$ west build --pristine -b nrf52840dk_nrf52840 samples/subsys/mgmt/mcumgr/smp_svr/ -- -DOVERLAY_CONFIG=overlay-bt.conf
.
.
sign the payload
[311/311] Generating zephyr/merged.hex

However, building for MCUBOOT fails:

amir@CPU047 MINGW64 /c/ncs/v2.3.0
$ west build --pristine -b nrf52840dk_nrf52840 -d build_mcuboot bootloader/mcuboot/boot/zephyr/
-- Zephyr version: 3.2.99 (C:/ncs/v2.3.0/zephyr), build: v3.2.99-ncs2
[124/189] Building C object CMakeFiles/app.dir/nrf_cleanup.c.obj
FAILED: CMakeFiles/app.dir/nrf_cleanup.c.obj
C:\ncs\toolchains\v2.3.0\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe -DKERNEL -DMBEDTLS_CONFIG_FILE=\"C:/ncs/v2.3.0/bootloader/mcuboot/boot/zephyr/include/mcuboot-mbedtls-cfg.h\" -DNRF52840_XXAA -DUSE_PARTITION_MANAGER=0 -D__PROGRAM_START -D__ZEPHYR__=1 -IC:/ncs/v2.3.0/bootloader/mcuboot/boot/zephyr/include -IC:/ncs/v2.3.0/bootloader/mcuboot/boot/zephyr/targets -IC:/ncs/v2.3.0/bootloader/mcuboot/boot/bootutil/include -IC:/ncs/v2.3.0/bootloader/mcuboot/ext/mbedtls-asn1/include -IC:/ncs/v2.3.0/bootloader/mcuboot/ext/nrf -IC:/ncs/v2.3.0/zephyr/include -Izephyr/include/generated -IC:/ncs/v2.3.0/zephyr/soc/arm/nordic_nrf/nrf52 -IC:/ncs/v2.3.0/zephyr/soc/arm/nordic_nrf/common/. -IC:/ncs/v2.3.0/nrf/include -IC:/ncs/v2.3.0/nrf/tests/include -IC:/ncs/v2.3.0/modules/hal/cmsis/CMSIS/Core/Include -IC:/ncs/v2.3.0/modules/hal/nordic/nrfx -IC:/ncs/v2.3.0/modules/hal/nordic/nrfx/drivers/include -IC:/ncs/v2.3.0/modules/hal/nordic/nrfx/mdk -IC:/ncs/v2.3.0/zephyr/modules/hal_nordic/nrfx/. -IC:/ncs/v2.3.0/modules/debug/segger/SEGGER -IC:/ncs/v2.3.0/modules/debug/segger/Config -IC:/ncs/v2.3.0/zephyr/modules/segger/. -IC:/ncs/v2.3.0/bootloader/mcuboot/boot/bootutil/zephyr/.. -IC:/ncs/v2.3.0/bootloader/mcuboot/boot/bootutil/zephyr/../include -IC:/ncs/v2.3.0/bootloader/mcuboot/boot/bootutil/zephyr/../../zephyr/include -IC:/ncs/v2.3.0/nrfxlib/crypto/nrf_cc310_bl/include -isystem C:/ncs/v2.3.0/zephyr/lib/libc/minimal/include -isystem c:/ncs/toolchains/v2.3.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/include -isystem c:/ncs/toolchains/v2.3.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/include-fixed -isystem C:/ncs/v2.3.0/nrfxlib/crypto/nrf_cc310_platform/include -fno-strict-aliasing -Os -imacros C:/ncs/v2.3.0/build_mcuboot/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 -mfp16-format=ieee --sysroot=C:/ncs/toolchains/v2.3.0/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi -imacros C:/ncs/v2.3.0/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -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=C:/ncs/v2.3.0/bootloader/mcuboot/boot/zephyr=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/ncs/v2.3.0/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/ncs/v2.3.0=WEST_TOPDIR -ffunction-sections -fdata-sections -std=c99 -nostdinc -MD -MT CMakeFiles/app.dir/nrf_cleanup.c.obj -MF CMakeFiles\app.dir\nrf_cleanup.c.obj.d -o CMakeFiles/app.dir/nrf_cleanup.c.obj -c C:/ncs/v2.3.0/bootloader/mcuboot/boot/zephyr/nrf_cleanup.c
C:/ncs/v2.3.0/bootloader/mcuboot/boot/zephyr/nrf_cleanup.c:24:10: fatal error: pm_config.h: No such file or directory
   24 | #include <pm_config.h>
      |          ^~~~~~~~~~~~~
compilation terminated.
[137/189] Building C object CMakeFiles/app.dir/C_/ncs/v2.3.0/bootloader/mcuboot/boot/bootutil/src/loader.c.obj
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: 'C:\ncs\toolchains\v2.3.0\opt\bin\cmake.EXE' --build 'C:\ncs\v2.3.0\build_mcuboot'

The pm_config.h file is indeed present in C:\ncs\v2.3.0\zephyr\build\mcuboot\zephyr\include\generated folder and build does not find it (neither the 'generated' folder is part of include path directly)

What could be going wrong here?

Thanks for looking into it.

Regards,

Amir

Parents Reply Children
No Data
Related