This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

MCUboot Build issue

Dear Concern,

I am getting MCUboot build errors as shown in the below.

C:\Nordic\v1.5.0>west build -b nrf5340dk_nrf5340_cpuapp -d build_mcuboot bootloader/mcuboot/boot/zephyr
[4/142] Building C object CMakeFiles/app.dir/C_/Nordic/v1.5.0/bootloader/mcuboot/boot/bootutil/src/loader.c.obj
FAILED: CMakeFiles/app.dir/C_/Nordic/v1.5.0/bootloader/mcuboot/boot/bootutil/src/loader.c.obj
C:\Nordic\v1.5.0\toolchain\opt\bin\arm-none-eabi-gcc.exe -DBUILD_VERSION=v2.4.99-ncs1 -DKERNEL -DMBEDTLS_CONFIG_FILE=\"mcuboot-mbedtls-cfg.h\" -DNRF5340_XXAA_APPLICATION -DUSE_PARTITION_MANAGER=0 -D_FORTIFY_SOURCE=2 -D__PROGRAM_START -D__ZEPHYR__=1 -IC:/Nordic/v1.5.0/bootloader/mcuboot/boot/zephyr/include -IC:/Nordic/v1.5.0/bootloader/mcuboot/boot/zephyr/targets -IC:/Nordic/v1.5.0/bootloader/mcuboot/boot/bootutil/include -IC:/Nordic/v1.5.0/zephyr/include -Izephyr/include/generated -IC:/Nordic/v1.5.0/zephyr/soc/arm/nordic_nrf/nrf53 -IC:/Nordic/v1.5.0/nrf/include -IC:/Nordic/v1.5.0/modules/hal/cmsis/CMSIS/Core/Include -IC:/Nordic/v1.5.0/modules/hal/nordic/nrfx -IC:/Nordic/v1.5.0/modules/hal/nordic/nrfx/drivers/include -IC:/Nordic/v1.5.0/modules/hal/nordic/nrfx/mdk -IC:/Nordic/v1.5.0/zephyr/modules/hal_nordic/nrfx/. -IC:/Nordic/v1.5.0/bootloader/mcuboot/boot/bootutil/zephyr/.. -IC:/Nordic/v1.5.0/bootloader/mcuboot/boot/bootutil/zephyr/../include -IC:/Nordic/v1.5.0/bootloader/mcuboot/boot/bootutil/zephyr/../../zephyr/include -IC:/Nordic/v1.5.0/modules/crypto/mbedtls/include -IC:/Nordic/v1.5.0/modules/crypto/mbedtls/configs -isystem C:/Nordic/v1.5.0/zephyr/lib/libc/minimal/include -isystem c:/nordic/v1.5.0/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/include -isystem c:/nordic/v1.5.0/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/include-fixed -isystem C:/Nordic/v1.5.0/nrfxlib/crypto/nrf_cc312_platform/include -Os -imacros C:/Nordic/v1.5.0/build_mcuboot/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -mcpu=cortex-m33 -mthumb -mabi=aapcs -imacros C:/Nordic/v1.5.0/zephyr/include/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Wno-address-of-packed-member -Wno-unused-but-set-variable -Werror=implicit-int -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-strict-overflow -fno-reorder-functions -fno-defer-pop -fmacro-prefix-map=C:/Nordic/v1.5.0/bootloader/mcuboot/boot/zephyr=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/Nordic/v1.5.0/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/Nordic/v1.5.0=WEST_TOPDIR -ffunction-sections -fdata-sections -std=c99 -nostdinc -MD -MT CMakeFiles/app.dir/C_/Nordic/v1.5.0/bootloader/mcuboot/boot/bootutil/src/loader.c.obj -MF CMakeFiles\app.dir\C_\Nordic\v1.5.0\bootloader\mcuboot\boot\bootutil\src\loader.c.obj.d -o CMakeFiles/app.dir/C_/Nordic/v1.5.0/bootloader/mcuboot/boot/bootutil/src/loader.c.obj -c C:/Nordic/v1.5.0/bootloader/mcuboot/boot/bootutil/src/loader.c
In file included from C:/Nordic/v1.5.0/bootloader/mcuboot/boot/bootutil/src/loader.c:49:
C:/Nordic/v1.5.0/nrf/include/dfu/pcd.h:35:10: fatal error: pm_config.h: No such file or directory
35 | #include <pm_config.h>
| ^~~~~~~~~~~~~
compilation terminated.
[7/142] Building C object CMakeFiles/app.dir/main.c.obj
FAILED: CMakeFiles/app.dir/main.c.obj
C:\Nordic\v1.5.0\toolchain\opt\bin\arm-none-eabi-gcc.exe -DBUILD_VERSION=v2.4.99-ncs1 -DKERNEL -DMBEDTLS_CONFIG_FILE=\"mcuboot-mbedtls-cfg.h\" -DNRF5340_XXAA_APPLICATION -DUSE_PARTITION_MANAGER=0 -D_FORTIFY_SOURCE=2 -D__PROGRAM_START -D__ZEPHYR__=1 -IC:/Nordic/v1.5.0/bootloader/mcuboot/boot/zephyr/include -IC:/Nordic/v1.5.0/bootloader/mcuboot/boot/zephyr/targets -IC:/Nordic/v1.5.0/bootloader/mcuboot/boot/bootutil/include -IC:/Nordic/v1.5.0/zephyr/include -Izephyr/include/generated -IC:/Nordic/v1.5.0/zephyr/soc/arm/nordic_nrf/nrf53 -IC:/Nordic/v1.5.0/nrf/include -IC:/Nordic/v1.5.0/modules/hal/cmsis/CMSIS/Core/Include -IC:/Nordic/v1.5.0/modules/hal/nordic/nrfx -IC:/Nordic/v1.5.0/modules/hal/nordic/nrfx/drivers/include -IC:/Nordic/v1.5.0/modules/hal/nordic/nrfx/mdk -IC:/Nordic/v1.5.0/zephyr/modules/hal_nordic/nrfx/. -IC:/Nordic/v1.5.0/bootloader/mcuboot/boot/bootutil/zephyr/.. -IC:/Nordic/v1.5.0/bootloader/mcuboot/boot/bootutil/zephyr/../include -IC:/Nordic/v1.5.0/bootloader/mcuboot/boot/bootutil/zephyr/../../zephyr/include -IC:/Nordic/v1.5.0/modules/crypto/mbedtls/include -IC:/Nordic/v1.5.0/modules/crypto/mbedtls/configs -isystem C:/Nordic/v1.5.0/zephyr/lib/libc/minimal/include -isystem c:/nordic/v1.5.0/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/include -isystem c:/nordic/v1.5.0/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/include-fixed -isystem C:/Nordic/v1.5.0/nrfxlib/crypto/nrf_cc312_platform/include -Os -imacros C:/Nordic/v1.5.0/build_mcuboot/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -mcpu=cortex-m33 -mthumb -mabi=aapcs -imacros C:/Nordic/v1.5.0/zephyr/include/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Wno-address-of-packed-member -Wno-unused-but-set-variable -Werror=implicit-int -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-strict-overflow -fno-reorder-functions -fno-defer-pop -fmacro-prefix-map=C:/Nordic/v1.5.0/bootloader/mcuboot/boot/zephyr=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/Nordic/v1.5.0/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/Nordic/v1.5.0=WEST_TOPDIR -ffunction-sections -fdata-sections -std=c99 -nostdinc -MD -MT CMakeFiles/app.dir/main.c.obj -MF CMakeFiles\app.dir\main.c.obj.d -o CMakeFiles/app.dir/main.c.obj -c C:/Nordic/v1.5.0/bootloader/mcuboot/boot/zephyr/main.c
In file included from C:/Nordic/v1.5.0/bootloader/mcuboot/boot/zephyr/main.c:59:
C:/Nordic/v1.5.0/nrf/include/dfu/pcd.h:35:10: fatal error: pm_config.h: No such file or directory
35 | #include <pm_config.h>
| ^~~~~~~~~~~~~
compilation terminated.
[13/142] Building C object zephyr/CMakeFiles/zephyr.dir/drivers/timer/nrf_rtc_timer.c.obj
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: 'C:\Program Files\CMake\bin\cmake.EXE' --build 'C:\Nordic\v1.5.0\build_mcuboot'

Thanks & Regards,

Srinivas Rao.

Parents
  • Hi Srinivas,

    MCUboot is usually built as a part of a Multi-image build. This happens automatically after you add the CONFIG_BOOTLOADER_MCUBOOT=y setting to your project configuration. Also, if needed, you can include overlay configurations for the mcuboot build in your project directory by creating the 'child_image' directory like the asset_tracker_v2 application does in v1.5.0\nrf\applications\asset_tracker_v2. E.g. \child_image\mcuboot.conf\, where mcuboot.conf is the overlay file you want to apply to the MCUboot "subimage".

    Best regards,

    Vidar

Reply
  • Hi Srinivas,

    MCUboot is usually built as a part of a Multi-image build. This happens automatically after you add the CONFIG_BOOTLOADER_MCUBOOT=y setting to your project configuration. Also, if needed, you can include overlay configurations for the mcuboot build in your project directory by creating the 'child_image' directory like the asset_tracker_v2 application does in v1.5.0\nrf\applications\asset_tracker_v2. E.g. \child_image\mcuboot.conf\, where mcuboot.conf is the overlay file you want to apply to the MCUboot "subimage".

    Best regards,

    Vidar

Children
No Data
Related