OTA DFU on NORA B1

Hello,

I have a project working on Nora B1, which I am testing on nrf5340DK. It is based on the Peripheral UART Sample, programmed with nfr Connect SDK v1.9.1. Now I need to add the OTA DFU to update the program from the nrf Connect mobile app. I changed the prj.conf and main according to this tutorial

https://getwavecake.com/blog/adding-ota-dfu-to-a-nordic-zephyr-project/

It works perfectly, when I am testing it on the Development Kit, but it does not work at all on the Nora B1. The flash is succesful, but the BLE can't get initialised.

I tried a bit and it seems like the problem is caused by the line

CONFIG_BOOTLOADER_MCUBOOT=y
when I add this to the prj. conf, BLE does not work, even when I did not do any changes in the main.
Is there anything special I should take care about while configuring bootloader on the NoraB1?
Thanks a lot for any answer
  • To me, it looks like, you configured the bootloader to read images from the external flash memory, which exists on the eval board, but not on the NORA B1. Thus, the bootloader is not able to access the external flash memory and bails out.

  • Hi Torsten,

    thanks a lot for the hint, could you please give me some advice, how should I fix this, sorry if it is too obvious, but I do not have much experience in this area...

    Kind regards

    Jiri

  • To verify, that this is actually your problem, look into your ./build folder and look up the `partitions.yml` file. If that contains an entry named `external_flash`, then this is probably your problem. Maybe, it happened due to enabling the external flash in one of your .overload files. See if you find the

    / {
        chosen {
            nordic,pm-ext-flash = &mx25r64;
        };
    };

    section or something similar and delete it (if you do not have an external flash memory in your target hardware).

    HTH Torsten

  • Thank you very much for the advice, I think that should be the problem. Going back to the Sample from the DevAcademy, there is the external flash enabled in app.overlay and in child_image/mcuboot.overlay, I disabled (deleted) the external flash for both of them. Now I can't build the programm, getting these error messages: 

    FAILED: CMakeFiles/app.dir/flash_map_extended.c.obj 
    C:\ncs\toolchains\c57af46cb7\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe -DKERNEL -DMBEDTLS_CONFIG_FILE=\"mcuboot-mbedtls-cfg.h\" -DNRF5340_XXAA_APPLICATION -DNRF_SKIP_FICR_NS_COPY_TO_RAM -DUSE_PARTITION_MANAGER=1 -D__PROGRAM_START -D__ZEPHYR__=1 -IC:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include -IC:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/targets -IC:/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/include -IC:/ncs/v2.5.0/zephyr/include -Izephyr/include/generated -IC:/ncs/v2.5.0/zephyr/soc/arm/nordic_nrf/nrf53 -IC:/ncs/v2.5.0/zephyr/soc/arm/nordic_nrf/common/. -IC:/ncs/v2.5.0/nrf/include -IC:/ncs/v2.5.0/nrf/tests/include -IC:/ncs/v2.5.0/modules/hal/cmsis/CMSIS/Core/Include -IC:/ncs/v2.5.0/zephyr/modules/cmsis/. -IC:/ncs/v2.5.0/modules/hal/nordic/nrfx -IC:/ncs/v2.5.0/modules/hal/nordic/nrfx/drivers/include -IC:/ncs/v2.5.0/modules/hal/nordic/nrfx/mdk -IC:/ncs/v2.5.0/zephyr/modules/hal_nordic/nrfx/. -IC:/ncs/v2.5.0/modules/crypto/mbedtls/include -IC:/ncs/v2.5.0/zephyr/modules/mbedtls/configs -IC:/ncs/v2.5.0/zephyr/modules/mbedtls/include -IC:/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/zephyr/.. -IC:/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/zephyr/../include -IC:/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/zephyr/../../zephyr/include -isystem C:/ncs/v2.5.0/zephyr/lib/libc/minimal/include -isystem c:/ncs/toolchains/c57af46cb7/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/include -isystem c:/ncs/toolchains/c57af46cb7/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/include-fixed -isystem C:/ncs/v2.5.0/nrfxlib/crypto/nrf_cc312_platform/include -fno-strict-aliasing -Os -imacros C:/ncs/2.5SDK/less8/build/mcuboot/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m33 -mthumb -mabi=aapcs -mfp16-format=ieee --sysroot=C:/ncs/toolchains/c57af46cb7/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi -imacros C:/ncs/v2.5.0/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=C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/ncs/v2.5.0/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/ncs/v2.5.0=WEST_TOPDIR -ffunction-sections -fdata-sections -std=c99 -nostdinc -MD -MT CMakeFiles/app.dir/flash_map_extended.c.obj -MF CMakeFiles\app.dir\flash_map_extended.c.obj.d -o CMakeFiles/app.dir/flash_map_extended.c.obj -c C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/flash_map_extended.c
    In file included from C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/sysflash.h:10,
                     from C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/flash_map_extended.c:15:
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h: In function '__flash_area_ids_for_slot':
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:48:37: error: 'PM_MCUBOOT_PRIMARY_1_ID' undeclared (first use in this function); did you mean 'PM_MCUBOOT_PRIMARY_ID'?
       48 | #define FLASH_AREA_IMAGE_1_SLOTS    PM_MCUBOOT_PRIMARY_1_ID, PM_MCUBOOT_SECONDARY_1_ID
          |                                     ^~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:55:29: note: in expansion of macro 'FLASH_AREA_IMAGE_1_SLOTS'
       55 |                             FLASH_AREA_IMAGE_1_SLOTS
          |                             ^~~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:67:9: note: in expansion of macro 'ALL_AVAILABLE_SLOTS'
       67 |         ALL_AVAILABLE_SLOTS
          |         ^~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:48:37: note: each undeclared identifier is reported only once for each function it appears in
       48 | #define FLASH_AREA_IMAGE_1_SLOTS    PM_MCUBOOT_PRIMARY_1_ID, PM_MCUBOOT_SECONDARY_1_ID
          |                                     ^~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:55:29: note: in expansion of macro 'FLASH_AREA_IMAGE_1_SLOTS'
       55 |                             FLASH_AREA_IMAGE_1_SLOTS
          |                             ^~~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:67:9: note: in expansion of macro 'ALL_AVAILABLE_SLOTS'
       67 |         ALL_AVAILABLE_SLOTS
          |         ^~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:48:62: error: 'PM_MCUBOOT_SECONDARY_1_ID' undeclared (first use in this function); did you mean 'PM_MCUBOOT_SECONDARY_ID'?
       48 | #define FLASH_AREA_IMAGE_1_SLOTS    PM_MCUBOOT_PRIMARY_1_ID, PM_MCUBOOT_SECONDARY_1_ID
          |                                                              ^~~~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:55:29: note: in expansion of macro 'FLASH_AREA_IMAGE_1_SLOTS'
       55 |                             FLASH_AREA_IMAGE_1_SLOTS
          |                             ^~~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:67:9: note: in expansion of macro 'ALL_AVAILABLE_SLOTS'
       67 |         ALL_AVAILABLE_SLOTS
          |         ^~~~~~~~~~~~~~~~~~~
    [85/279] Building C object CMakeFiles/app.dir/C_/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/src/tlv.c.obj
    FAILED: CMakeFiles/app.dir/C_/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/src/tlv.c.obj 
    C:\ncs\toolchains\c57af46cb7\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe -DKERNEL -DMBEDTLS_CONFIG_FILE=\"mcuboot-mbedtls-cfg.h\" -DNRF5340_XXAA_APPLICATION -DNRF_SKIP_FICR_NS_COPY_TO_RAM -DUSE_PARTITION_MANAGER=1 -D__PROGRAM_START -D__ZEPHYR__=1 -IC:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include -IC:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/targets -IC:/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/include -IC:/ncs/v2.5.0/zephyr/include -Izephyr/include/generated -IC:/ncs/v2.5.0/zephyr/soc/arm/nordic_nrf/nrf53 -IC:/ncs/v2.5.0/zephyr/soc/arm/nordic_nrf/common/. -IC:/ncs/v2.5.0/nrf/include -IC:/ncs/v2.5.0/nrf/tests/include -IC:/ncs/v2.5.0/modules/hal/cmsis/CMSIS/Core/Include -IC:/ncs/v2.5.0/zephyr/modules/cmsis/. -IC:/ncs/v2.5.0/modules/hal/nordic/nrfx -IC:/ncs/v2.5.0/modules/hal/nordic/nrfx/drivers/include -IC:/ncs/v2.5.0/modules/hal/nordic/nrfx/mdk -IC:/ncs/v2.5.0/zephyr/modules/hal_nordic/nrfx/. -IC:/ncs/v2.5.0/modules/crypto/mbedtls/include -IC:/ncs/v2.5.0/zephyr/modules/mbedtls/configs -IC:/ncs/v2.5.0/zephyr/modules/mbedtls/include -IC:/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/zephyr/.. -IC:/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/zephyr/../include -IC:/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/zephyr/../../zephyr/include -isystem C:/ncs/v2.5.0/zephyr/lib/libc/minimal/include -isystem c:/ncs/toolchains/c57af46cb7/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/include -isystem c:/ncs/toolchains/c57af46cb7/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/include-fixed -isystem C:/ncs/v2.5.0/nrfxlib/crypto/nrf_cc312_platform/include -fno-strict-aliasing -Os -imacros C:/ncs/2.5SDK/less8/build/mcuboot/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m33 -mthumb -mabi=aapcs -mfp16-format=ieee --sysroot=C:/ncs/toolchains/c57af46cb7/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi -imacros C:/ncs/v2.5.0/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=C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/ncs/v2.5.0/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/ncs/v2.5.0=WEST_TOPDIR -ffunction-sections -fdata-sections -std=c99 -nostdinc -MD -MT CMakeFiles/app.dir/C_/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/src/tlv.c.obj -MF CMakeFiles\app.dir\C_\ncs\v2.5.0\bootloader\mcuboot\boot\bootutil\src\tlv.c.obj.d -o CMakeFiles/app.dir/C_/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/src/tlv.c.obj -c C:/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/src/tlv.c
    In file included from C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/sysflash.h:10,
                     from C:/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/src/bootutil_priv.h:33,
                     from C:/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/src/tlv.c:24:
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h: In function '__flash_area_ids_for_slot':
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:48:37: error: 'PM_MCUBOOT_PRIMARY_1_ID' undeclared (first use in this function); did you mean 'PM_MCUBOOT_PRIMARY_ID'?
       48 | #define FLASH_AREA_IMAGE_1_SLOTS    PM_MCUBOOT_PRIMARY_1_ID, PM_MCUBOOT_SECONDARY_1_ID
          |                                     ^~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:55:29: note: in expansion of macro 'FLASH_AREA_IMAGE_1_SLOTS'
       55 |                             FLASH_AREA_IMAGE_1_SLOTS
          |                             ^~~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:67:9: note: in expansion of macro 'ALL_AVAILABLE_SLOTS'
       67 |         ALL_AVAILABLE_SLOTS
          |         ^~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:48:37: note: each undeclared identifier is reported only once for each function it appears in
       48 | #define FLASH_AREA_IMAGE_1_SLOTS    PM_MCUBOOT_PRIMARY_1_ID, PM_MCUBOOT_SECONDARY_1_ID
          |                                     ^~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:55:29: note: in expansion of macro 'FLASH_AREA_IMAGE_1_SLOTS'
       55 |                             FLASH_AREA_IMAGE_1_SLOTS
          |                             ^~~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:67:9: note: in expansion of macro 'ALL_AVAILABLE_SLOTS'
       67 |         ALL_AVAILABLE_SLOTS
          |         ^~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:48:62: error: 'PM_MCUBOOT_SECONDARY_1_ID' undeclared (first use in this function); did you mean 'PM_MCUBOOT_SECONDARY_ID'?
       48 | #define FLASH_AREA_IMAGE_1_SLOTS    PM_MCUBOOT_PRIMARY_1_ID, PM_MCUBOOT_SECONDARY_1_ID
          |                                                              ^~~~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:55:29: note: in expansion of macro 'FLASH_AREA_IMAGE_1_SLOTS'
       55 |                             FLASH_AREA_IMAGE_1_SLOTS
          |                             ^~~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:67:9: note: in expansion of macro 'ALL_AVAILABLE_SLOTS'
       67 |         ALL_AVAILABLE_SLOTS
          |         ^~~~~~~~~~~~~~~~~~~
    [88/279] Building C object CMakeFiles/app.dir/C_/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/src/image_rsa.c.obj
    FAILED: CMakeFiles/app.dir/C_/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/src/image_rsa.c.obj 
    C:\ncs\toolchains\c57af46cb7\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe -DKERNEL -DMBEDTLS_CONFIG_FILE=\"mcuboot-mbedtls-cfg.h\" -DNRF5340_XXAA_APPLICATION -DNRF_SKIP_FICR_NS_COPY_TO_RAM -DUSE_PARTITION_MANAGER=1 -D__PROGRAM_START -D__ZEPHYR__=1 -IC:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include -IC:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/targets -IC:/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/include -IC:/ncs/v2.5.0/zephyr/include -Izephyr/include/generated -IC:/ncs/v2.5.0/zephyr/soc/arm/nordic_nrf/nrf53 -IC:/ncs/v2.5.0/zephyr/soc/arm/nordic_nrf/common/. -IC:/ncs/v2.5.0/nrf/include -IC:/ncs/v2.5.0/nrf/tests/include -IC:/ncs/v2.5.0/modules/hal/cmsis/CMSIS/Core/Include -IC:/ncs/v2.5.0/zephyr/modules/cmsis/. -IC:/ncs/v2.5.0/modules/hal/nordic/nrfx -IC:/ncs/v2.5.0/modules/hal/nordic/nrfx/drivers/include -IC:/ncs/v2.5.0/modules/hal/nordic/nrfx/mdk -IC:/ncs/v2.5.0/zephyr/modules/hal_nordic/nrfx/. -IC:/ncs/v2.5.0/modules/crypto/mbedtls/include -IC:/ncs/v2.5.0/zephyr/modules/mbedtls/configs -IC:/ncs/v2.5.0/zephyr/modules/mbedtls/include -IC:/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/zephyr/.. -IC:/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/zephyr/../include -IC:/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/zephyr/../../zephyr/include -isystem C:/ncs/v2.5.0/zephyr/lib/libc/minimal/include -isystem c:/ncs/toolchains/c57af46cb7/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/include -isystem c:/ncs/toolchains/c57af46cb7/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/include-fixed -isystem C:/ncs/v2.5.0/nrfxlib/crypto/nrf_cc312_platform/include -fno-strict-aliasing -Os -imacros C:/ncs/2.5SDK/less8/build/mcuboot/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m33 -mthumb -mabi=aapcs -mfp16-format=ieee --sysroot=C:/ncs/toolchains/c57af46cb7/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi -imacros C:/ncs/v2.5.0/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=C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/ncs/v2.5.0/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/ncs/v2.5.0=WEST_TOPDIR -ffunction-sections -fdata-sections -std=c99 -nostdinc -MD -MT CMakeFiles/app.dir/C_/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/src/image_rsa.c.obj -MF CMakeFiles\app.dir\C_\ncs\v2.5.0\bootloader\mcuboot\boot\bootutil\src\image_rsa.c.obj.d -o CMakeFiles/app.dir/C_/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/src/image_rsa.c.obj -c C:/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/src/image_rsa.c
    In file included from C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/sysflash.h:10,
                     from C:/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/src/bootutil_priv.h:33,
                     from C:/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/src/image_rsa.c:33:
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h: In function '__flash_area_ids_for_slot':
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:48:37: error: 'PM_MCUBOOT_PRIMARY_1_ID' undeclared (first use in this function); did you mean 'PM_MCUBOOT_PRIMARY_ID'?
       48 | #define FLASH_AREA_IMAGE_1_SLOTS    PM_MCUBOOT_PRIMARY_1_ID, PM_MCUBOOT_SECONDARY_1_ID
          |                                     ^~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:55:29: note: in expansion of macro 'FLASH_AREA_IMAGE_1_SLOTS'
       55 |                             FLASH_AREA_IMAGE_1_SLOTS
          |                             ^~~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:67:9: note: in expansion of macro 'ALL_AVAILABLE_SLOTS'
       67 |         ALL_AVAILABLE_SLOTS
          |         ^~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:48:37: note: each undeclared identifier is reported only once for each function it appears in
       48 | #define FLASH_AREA_IMAGE_1_SLOTS    PM_MCUBOOT_PRIMARY_1_ID, PM_MCUBOOT_SECONDARY_1_ID
          |                                     ^~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:55:29: note: in expansion of macro 'FLASH_AREA_IMAGE_1_SLOTS'
       55 |                             FLASH_AREA_IMAGE_1_SLOTS
          |                             ^~~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:67:9: note: in expansion of macro 'ALL_AVAILABLE_SLOTS'
       67 |         ALL_AVAILABLE_SLOTS
          |         ^~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:48:62: error: 'PM_MCUBOOT_SECONDARY_1_ID' undeclared (first use in this function); did you mean 'PM_MCUBOOT_SECONDARY_ID'?
       48 | #define FLASH_AREA_IMAGE_1_SLOTS    PM_MCUBOOT_PRIMARY_1_ID, PM_MCUBOOT_SECONDARY_1_ID
          |                                                              ^~~~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:55:29: note: in expansion of macro 'FLASH_AREA_IMAGE_1_SLOTS'
       55 |                             FLASH_AREA_IMAGE_1_SLOTS
          |                             ^~~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:67:9: note: in expansion of macro 'ALL_AVAILABLE_SLOTS'
       67 |         ALL_AVAILABLE_SLOTS
          |         ^~~~~~~~~~~~~~~~~~~
    [89/279] Building C object CMakeFiles/app.dir/C_/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/src/image_validate.c.obj
    FAILED: CMakeFiles/app.dir/C_/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/src/image_validate.c.obj 
    C:\ncs\toolchains\c57af46cb7\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe -DKERNEL -DMBEDTLS_CONFIG_FILE=\"mcuboot-mbedtls-cfg.h\" -DNRF5340_XXAA_APPLICATION -DNRF_SKIP_FICR_NS_COPY_TO_RAM -DUSE_PARTITION_MANAGER=1 -D__PROGRAM_START -D__ZEPHYR__=1 -IC:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include -IC:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/targets -IC:/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/include -IC:/ncs/v2.5.0/zephyr/include -Izephyr/include/generated -IC:/ncs/v2.5.0/zephyr/soc/arm/nordic_nrf/nrf53 -IC:/ncs/v2.5.0/zephyr/soc/arm/nordic_nrf/common/. -IC:/ncs/v2.5.0/nrf/include -IC:/ncs/v2.5.0/nrf/tests/include -IC:/ncs/v2.5.0/modules/hal/cmsis/CMSIS/Core/Include -IC:/ncs/v2.5.0/zephyr/modules/cmsis/. -IC:/ncs/v2.5.0/modules/hal/nordic/nrfx -IC:/ncs/v2.5.0/modules/hal/nordic/nrfx/drivers/include -IC:/ncs/v2.5.0/modules/hal/nordic/nrfx/mdk -IC:/ncs/v2.5.0/zephyr/modules/hal_nordic/nrfx/. -IC:/ncs/v2.5.0/modules/crypto/mbedtls/include -IC:/ncs/v2.5.0/zephyr/modules/mbedtls/configs -IC:/ncs/v2.5.0/zephyr/modules/mbedtls/include -IC:/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/zephyr/.. -IC:/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/zephyr/../include -IC:/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/zephyr/../../zephyr/include -isystem C:/ncs/v2.5.0/zephyr/lib/libc/minimal/include -isystem c:/ncs/toolchains/c57af46cb7/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/include -isystem c:/ncs/toolchains/c57af46cb7/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/include-fixed -isystem C:/ncs/v2.5.0/nrfxlib/crypto/nrf_cc312_platform/include -fno-strict-aliasing -Os -imacros C:/ncs/2.5SDK/less8/build/mcuboot/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m33 -mthumb -mabi=aapcs -mfp16-format=ieee --sysroot=C:/ncs/toolchains/c57af46cb7/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi -imacros C:/ncs/v2.5.0/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=C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/ncs/v2.5.0/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/ncs/v2.5.0=WEST_TOPDIR -ffunction-sections -fdata-sections -std=c99 -nostdinc -MD -MT CMakeFiles/app.dir/C_/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/src/image_validate.c.obj -MF CMakeFiles\app.dir\C_\ncs\v2.5.0\bootloader\mcuboot\boot\bootutil\src\image_validate.c.obj.d -o CMakeFiles/app.dir/C_/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/src/image_validate.c.obj -c C:/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/src/image_validate.c
    In file included from C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/sysflash.h:10,
                     from C:/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/src/bootutil_priv.h:33,
                     from C:/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/src/image_validate.c:57:
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h: In function '__flash_area_ids_for_slot':
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:48:37: error: 'PM_MCUBOOT_PRIMARY_1_ID' undeclared (first use in this function); did you mean 'PM_MCUBOOT_PRIMARY_ID'?
       48 | #define FLASH_AREA_IMAGE_1_SLOTS    PM_MCUBOOT_PRIMARY_1_ID, PM_MCUBOOT_SECONDARY_1_ID
          |                                     ^~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:55:29: note: in expansion of macro 'FLASH_AREA_IMAGE_1_SLOTS'
       55 |                             FLASH_AREA_IMAGE_1_SLOTS
          |                             ^~~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:67:9: note: in expansion of macro 'ALL_AVAILABLE_SLOTS'
       67 |         ALL_AVAILABLE_SLOTS
          |         ^~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:48:37: note: each undeclared identifier is reported only once for each function it appears in
       48 | #define FLASH_AREA_IMAGE_1_SLOTS    PM_MCUBOOT_PRIMARY_1_ID, PM_MCUBOOT_SECONDARY_1_ID
          |                                     ^~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:55:29: note: in expansion of macro 'FLASH_AREA_IMAGE_1_SLOTS'
       55 |                             FLASH_AREA_IMAGE_1_SLOTS
          |                             ^~~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:67:9: note: in expansion of macro 'ALL_AVAILABLE_SLOTS'
       67 |         ALL_AVAILABLE_SLOTS
          |         ^~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:48:62: error: 'PM_MCUBOOT_SECONDARY_1_ID' undeclared (first use in this function); did you mean 'PM_MCUBOOT_SECONDARY_ID'?
       48 | #define FLASH_AREA_IMAGE_1_SLOTS    PM_MCUBOOT_PRIMARY_1_ID, PM_MCUBOOT_SECONDARY_1_ID
          |                                                              ^~~~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:55:29: note: in expansion of macro 'FLASH_AREA_IMAGE_1_SLOTS'
       55 |                             FLASH_AREA_IMAGE_1_SLOTS
          |                             ^~~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:67:9: note: in expansion of macro 'ALL_AVAILABLE_SLOTS'
       67 |         ALL_AVAILABLE_SLOTS
          |         ^~~~~~~~~~~~~~~~~~~

    [94/279] Building C object CMakeFiles/app.dir/C_/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/src/bootutil_misc.c.obj
    FAILED: CMakeFiles/app.dir/C_/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/src/bootutil_misc.c.obj 
    C:\ncs\toolchains\c57af46cb7\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe -DKERNEL -DMBEDTLS_CONFIG_FILE=\"mcuboot-mbedtls-cfg.h\" -DNRF5340_XXAA_APPLICATION -DNRF_SKIP_FICR_NS_COPY_TO_RAM -DUSE_PARTITION_MANAGER=1 -D__PROGRAM_START -D__ZEPHYR__=1 -IC:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include -IC:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/targets -IC:/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/include -IC:/ncs/v2.5.0/zephyr/include -Izephyr/include/generated -IC:/ncs/v2.5.0/zephyr/soc/arm/nordic_nrf/nrf53 -IC:/ncs/v2.5.0/zephyr/soc/arm/nordic_nrf/common/. -IC:/ncs/v2.5.0/nrf/include -IC:/ncs/v2.5.0/nrf/tests/include -IC:/ncs/v2.5.0/modules/hal/cmsis/CMSIS/Core/Include -IC:/ncs/v2.5.0/zephyr/modules/cmsis/. -IC:/ncs/v2.5.0/modules/hal/nordic/nrfx -IC:/ncs/v2.5.0/modules/hal/nordic/nrfx/drivers/include -IC:/ncs/v2.5.0/modules/hal/nordic/nrfx/mdk -IC:/ncs/v2.5.0/zephyr/modules/hal_nordic/nrfx/. -IC:/ncs/v2.5.0/modules/crypto/mbedtls/include -IC:/ncs/v2.5.0/zephyr/modules/mbedtls/configs -IC:/ncs/v2.5.0/zephyr/modules/mbedtls/include -IC:/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/zephyr/.. -IC:/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/zephyr/../include -IC:/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/zephyr/../../zephyr/include -isystem C:/ncs/v2.5.0/zephyr/lib/libc/minimal/include -isystem c:/ncs/toolchains/c57af46cb7/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/include -isystem c:/ncs/toolchains/c57af46cb7/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/include-fixed -isystem C:/ncs/v2.5.0/nrfxlib/crypto/nrf_cc312_platform/include -fno-strict-aliasing -Os -imacros C:/ncs/2.5SDK/less8/build/mcuboot/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m33 -mthumb -mabi=aapcs -mfp16-format=ieee --sysroot=C:/ncs/toolchains/c57af46cb7/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi -imacros C:/ncs/v2.5.0/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=C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/ncs/v2.5.0/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/ncs/v2.5.0=WEST_TOPDIR -ffunction-sections -fdata-sections -std=c99 -nostdinc -MD -MT CMakeFiles/app.dir/C_/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/src/bootutil_misc.c.obj -MF CMakeFiles\app.dir\C_\ncs\v2.5.0\bootloader\mcuboot\boot\bootutil\src\bootutil_misc.c.obj.d -o CMakeFiles/app.dir/C_/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/src/bootutil_misc.c.obj -c C:/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/src/bootutil_misc.c
    In file included from C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/sysflash.h:10,
                     from C:/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/src/bootutil_misc.c:32:
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h: In function '__flash_area_ids_for_slot':
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:48:37: error: 'PM_MCUBOOT_PRIMARY_1_ID' undeclared (first use in this function); did you mean 'PM_MCUBOOT_PRIMARY_ID'?
       48 | #define FLASH_AREA_IMAGE_1_SLOTS    PM_MCUBOOT_PRIMARY_1_ID, PM_MCUBOOT_SECONDARY_1_ID
          |                                     ^~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:55:29: note: in expansion of macro 'FLASH_AREA_IMAGE_1_SLOTS'
       55 |                             FLASH_AREA_IMAGE_1_SLOTS
          |                             ^~~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:67:9: note: in expansion of macro 'ALL_AVAILABLE_SLOTS'
       67 |         ALL_AVAILABLE_SLOTS
          |         ^~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:48:37: note: each undeclared identifier is reported only once for each function it appears in
       48 | #define FLASH_AREA_IMAGE_1_SLOTS    PM_MCUBOOT_PRIMARY_1_ID, PM_MCUBOOT_SECONDARY_1_ID
          |                                     ^~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:55:29: note: in expansion of macro 'FLASH_AREA_IMAGE_1_SLOTS'
       55 |                             FLASH_AREA_IMAGE_1_SLOTS
          |                             ^~~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:67:9: note: in expansion of macro 'ALL_AVAILABLE_SLOTS'
       67 |         ALL_AVAILABLE_SLOTS
          |         ^~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:48:62: error: 'PM_MCUBOOT_SECONDARY_1_ID' undeclared (first use in this function); did you mean 'PM_MCUBOOT_SECONDARY_ID'?
       48 | #define FLASH_AREA_IMAGE_1_SLOTS    PM_MCUBOOT_PRIMARY_1_ID, PM_MCUBOOT_SECONDARY_1_ID
          |                                                              ^~~~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:55:29: note: in expansion of macro 'FLASH_AREA_IMAGE_1_SLOTS'
       55 |                             FLASH_AREA_IMAGE_1_SLOTS
          |                             ^~~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:67:9: note: in expansion of macro 'ALL_AVAILABLE_SLOTS'
       67 |         ALL_AVAILABLE_SLOTS
          |         ^~~~~~~~~~~~~~~~~~~
    [95/279] Building C object CMakeFiles/app.dir/C_/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/src/swap_move.c.obj
    FAILED: CMakeFiles/app.dir/C_/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/src/swap_move.c.obj 
    C:\ncs\toolchains\c57af46cb7\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe -DKERNEL -DMBEDTLS_CONFIG_FILE=\"mcuboot-mbedtls-cfg.h\" -DNRF5340_XXAA_APPLICATION -DNRF_SKIP_FICR_NS_COPY_TO_RAM -DUSE_PARTITION_MANAGER=1 -D__PROGRAM_START -D__ZEPHYR__=1 -IC:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include -IC:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/targets -IC:/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/include -IC:/ncs/v2.5.0/zephyr/include -Izephyr/include/generated -IC:/ncs/v2.5.0/zephyr/soc/arm/nordic_nrf/nrf53 -IC:/ncs/v2.5.0/zephyr/soc/arm/nordic_nrf/common/. -IC:/ncs/v2.5.0/nrf/include -IC:/ncs/v2.5.0/nrf/tests/include -IC:/ncs/v2.5.0/modules/hal/cmsis/CMSIS/Core/Include -IC:/ncs/v2.5.0/zephyr/modules/cmsis/. -IC:/ncs/v2.5.0/modules/hal/nordic/nrfx -IC:/ncs/v2.5.0/modules/hal/nordic/nrfx/drivers/include -IC:/ncs/v2.5.0/modules/hal/nordic/nrfx/mdk -IC:/ncs/v2.5.0/zephyr/modules/hal_nordic/nrfx/. -IC:/ncs/v2.5.0/modules/crypto/mbedtls/include -IC:/ncs/v2.5.0/zephyr/modules/mbedtls/configs -IC:/ncs/v2.5.0/zephyr/modules/mbedtls/include -IC:/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/zephyr/.. -IC:/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/zephyr/../include -IC:/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/zephyr/../../zephyr/include -isystem C:/ncs/v2.5.0/zephyr/lib/libc/minimal/include -isystem c:/ncs/toolchains/c57af46cb7/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/include -isystem c:/ncs/toolchains/c57af46cb7/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/include-fixed -isystem C:/ncs/v2.5.0/nrfxlib/crypto/nrf_cc312_platform/include -fno-strict-aliasing -Os -imacros C:/ncs/2.5SDK/less8/build/mcuboot/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m33 -mthumb -mabi=aapcs -mfp16-format=ieee --sysroot=C:/ncs/toolchains/c57af46cb7/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi -imacros C:/ncs/v2.5.0/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=C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/ncs/v2.5.0/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/ncs/v2.5.0=WEST_TOPDIR -ffunction-sections -fdata-sections -std=c99 -nostdinc -MD -MT CMakeFiles/app.dir/C_/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/src/swap_move.c.obj -MF CMakeFiles\app.dir\C_\ncs\v2.5.0\bootloader\mcuboot\boot\bootutil\src\swap_move.c.obj.d -o CMakeFiles/app.dir/C_/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/src/swap_move.c.obj -c C:/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/src/swap_move.c
    In file included from C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/sysflash.h:10,
                     from C:/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/src/bootutil_priv.h:33,
                     from C:/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/src/swap_move.c:25:
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h: In function '__flash_area_ids_for_slot':
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:48:37: error: 'PM_MCUBOOT_PRIMARY_1_ID' undeclared (first use in this function); did you mean 'PM_MCUBOOT_PRIMARY_ID'?
       48 | #define FLASH_AREA_IMAGE_1_SLOTS    PM_MCUBOOT_PRIMARY_1_ID, PM_MCUBOOT_SECONDARY_1_ID
          |                                     ^~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:55:29: note: in expansion of macro 'FLASH_AREA_IMAGE_1_SLOTS'
       55 |                             FLASH_AREA_IMAGE_1_SLOTS
          |                             ^~~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:67:9: note: in expansion of macro 'ALL_AVAILABLE_SLOTS'
       67 |         ALL_AVAILABLE_SLOTS
          |         ^~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:48:37: note: each undeclared identifier is reported only once for each function it appears in
       48 | #define FLASH_AREA_IMAGE_1_SLOTS    PM_MCUBOOT_PRIMARY_1_ID, PM_MCUBOOT_SECONDARY_1_ID
          |                                     ^~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:55:29: note: in expansion of macro 'FLASH_AREA_IMAGE_1_SLOTS'
       55 |                             FLASH_AREA_IMAGE_1_SLOTS
          |                             ^~~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:67:9: note: in expansion of macro 'ALL_AVAILABLE_SLOTS'
       67 |         ALL_AVAILABLE_SLOTS
          |         ^~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:48:62: error: 'PM_MCUBOOT_SECONDARY_1_ID' undeclared (first use in this function); did you mean 'PM_MCUBOOT_SECONDARY_ID'?
       48 | #define FLASH_AREA_IMAGE_1_SLOTS    PM_MCUBOOT_PRIMARY_1_ID, PM_MCUBOOT_SECONDARY_1_ID
          |                                                              ^~~~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:55:29: note: in expansion of macro 'FLASH_AREA_IMAGE_1_SLOTS'
       55 |                             FLASH_AREA_IMAGE_1_SLOTS
          |                             ^~~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:67:9: note: in expansion of macro 'ALL_AVAILABLE_SLOTS'
       67 |         ALL_AVAILABLE_SLOTS
          |         ^~~~~~~~~~~~~~~~~~~

    [96/279] Building C object CMakeFiles/app.dir/C_/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/src/swap_misc.c.obj
    FAILED: CMakeFiles/app.dir/C_/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/src/swap_misc.c.obj 
    C:\ncs\toolchains\c57af46cb7\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe -DKERNEL -DMBEDTLS_CONFIG_FILE=\"mcuboot-mbedtls-cfg.h\" -DNRF5340_XXAA_APPLICATION -DNRF_SKIP_FICR_NS_COPY_TO_RAM -DUSE_PARTITION_MANAGER=1 -D__PROGRAM_START -D__ZEPHYR__=1 -IC:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include -IC:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/targets -IC:/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/include -IC:/ncs/v2.5.0/zephyr/include -Izephyr/include/generated -IC:/ncs/v2.5.0/zephyr/soc/arm/nordic_nrf/nrf53 -IC:/ncs/v2.5.0/zephyr/soc/arm/nordic_nrf/common/. -IC:/ncs/v2.5.0/nrf/include -IC:/ncs/v2.5.0/nrf/tests/include -IC:/ncs/v2.5.0/modules/hal/cmsis/CMSIS/Core/Include -IC:/ncs/v2.5.0/zephyr/modules/cmsis/. -IC:/ncs/v2.5.0/modules/hal/nordic/nrfx -IC:/ncs/v2.5.0/modules/hal/nordic/nrfx/drivers/include -IC:/ncs/v2.5.0/modules/hal/nordic/nrfx/mdk -IC:/ncs/v2.5.0/zephyr/modules/hal_nordic/nrfx/. -IC:/ncs/v2.5.0/modules/crypto/mbedtls/include -IC:/ncs/v2.5.0/zephyr/modules/mbedtls/configs -IC:/ncs/v2.5.0/zephyr/modules/mbedtls/include -IC:/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/zephyr/.. -IC:/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/zephyr/../include -IC:/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/zephyr/../../zephyr/include -isystem C:/ncs/v2.5.0/zephyr/lib/libc/minimal/include -isystem c:/ncs/toolchains/c57af46cb7/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/include -isystem c:/ncs/toolchains/c57af46cb7/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/include-fixed -isystem C:/ncs/v2.5.0/nrfxlib/crypto/nrf_cc312_platform/include -fno-strict-aliasing -Os -imacros C:/ncs/2.5SDK/less8/build/mcuboot/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m33 -mthumb -mabi=aapcs -mfp16-format=ieee --sysroot=C:/ncs/toolchains/c57af46cb7/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi -imacros C:/ncs/v2.5.0/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=C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/ncs/v2.5.0/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/ncs/v2.5.0=WEST_TOPDIR -ffunction-sections -fdata-sections -std=c99 -nostdinc -MD -MT CMakeFiles/app.dir/C_/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/src/swap_misc.c.obj -MF CMakeFiles\app.dir\C_\ncs\v2.5.0\bootloader\mcuboot\boot\bootutil\src\swap_misc.c.obj.d -o CMakeFiles/app.dir/C_/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/src/swap_misc.c.obj -c C:/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/src/swap_misc.c
    In file included from C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/sysflash.h:10,
                     from C:/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/src/bootutil_priv.h:33,
                     from C:/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/src/swap_misc.c:25:
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h: In function '__flash_area_ids_for_slot':
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:48:37: error: 'PM_MCUBOOT_PRIMARY_1_ID' undeclared (first use in this function); did you mean 'PM_MCUBOOT_PRIMARY_ID'?
       48 | #define FLASH_AREA_IMAGE_1_SLOTS    PM_MCUBOOT_PRIMARY_1_ID, PM_MCUBOOT_SECONDARY_1_ID
          |                                     ^~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:55:29: note: in expansion of macro 'FLASH_AREA_IMAGE_1_SLOTS'
       55 |                             FLASH_AREA_IMAGE_1_SLOTS
          |                             ^~~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:67:9: note: in expansion of macro 'ALL_AVAILABLE_SLOTS'
       67 |         ALL_AVAILABLE_SLOTS
          |         ^~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:48:37: note: each undeclared identifier is reported only once for each function it appears in
       48 | #define FLASH_AREA_IMAGE_1_SLOTS    PM_MCUBOOT_PRIMARY_1_ID, PM_MCUBOOT_SECONDARY_1_ID
          |                                     ^~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:55:29: note: in expansion of macro 'FLASH_AREA_IMAGE_1_SLOTS'
       55 |                             FLASH_AREA_IMAGE_1_SLOTS
          |                             ^~~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:67:9: note: in expansion of macro 'ALL_AVAILABLE_SLOTS'
       67 |         ALL_AVAILABLE_SLOTS
          |         ^~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:48:62: error: 'PM_MCUBOOT_SECONDARY_1_ID' undeclared (first use in this function); did you mean 'PM_MCUBOOT_SECONDARY_ID'?
       48 | #define FLASH_AREA_IMAGE_1_SLOTS    PM_MCUBOOT_PRIMARY_1_ID, PM_MCUBOOT_SECONDARY_1_ID
          |                                                              ^~~~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:55:29: note: in expansion of macro 'FLASH_AREA_IMAGE_1_SLOTS'
       55 |                             FLASH_AREA_IMAGE_1_SLOTS
          |                             ^~~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:67:9: note: in expansion of macro 'ALL_AVAILABLE_SLOTS'
       67 |         ALL_AVAILABLE_SLOTS
          |         ^~~~~~~~~~~~~~~~~~~
    [97/279] Building C object CMakeFiles/app.dir/C_/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/src/loader.c.obj
    FAILED: CMakeFiles/app.dir/C_/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/src/loader.c.obj 
    C:\ncs\toolchains\c57af46cb7\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe -DKERNEL -DMBEDTLS_CONFIG_FILE=\"mcuboot-mbedtls-cfg.h\" -DNRF5340_XXAA_APPLICATION -DNRF_SKIP_FICR_NS_COPY_TO_RAM -DUSE_PARTITION_MANAGER=1 -D__PROGRAM_START -D__ZEPHYR__=1 -IC:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include -IC:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/targets -IC:/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/include -IC:/ncs/v2.5.0/zephyr/include -Izephyr/include/generated -IC:/ncs/v2.5.0/zephyr/soc/arm/nordic_nrf/nrf53 -IC:/ncs/v2.5.0/zephyr/soc/arm/nordic_nrf/common/. -IC:/ncs/v2.5.0/nrf/include -IC:/ncs/v2.5.0/nrf/tests/include -IC:/ncs/v2.5.0/modules/hal/cmsis/CMSIS/Core/Include -IC:/ncs/v2.5.0/zephyr/modules/cmsis/. -IC:/ncs/v2.5.0/modules/hal/nordic/nrfx -IC:/ncs/v2.5.0/modules/hal/nordic/nrfx/drivers/include -IC:/ncs/v2.5.0/modules/hal/nordic/nrfx/mdk -IC:/ncs/v2.5.0/zephyr/modules/hal_nordic/nrfx/. -IC:/ncs/v2.5.0/modules/crypto/mbedtls/include -IC:/ncs/v2.5.0/zephyr/modules/mbedtls/configs -IC:/ncs/v2.5.0/zephyr/modules/mbedtls/include -IC:/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/zephyr/.. -IC:/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/zephyr/../include -IC:/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/zephyr/../../zephyr/include -isystem C:/ncs/v2.5.0/zephyr/lib/libc/minimal/include -isystem c:/ncs/toolchains/c57af46cb7/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/include -isystem c:/ncs/toolchains/c57af46cb7/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/include-fixed -isystem C:/ncs/v2.5.0/nrfxlib/crypto/nrf_cc312_platform/include -fno-strict-aliasing -Os -imacros C:/ncs/2.5SDK/less8/build/mcuboot/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m33 -mthumb -mabi=aapcs -mfp16-format=ieee --sysroot=C:/ncs/toolchains/c57af46cb7/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi -imacros C:/ncs/v2.5.0/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=C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/ncs/v2.5.0/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/ncs/v2.5.0=WEST_TOPDIR -ffunction-sections -fdata-sections -std=c99 -nostdinc -MD -MT CMakeFiles/app.dir/C_/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/src/loader.c.obj -MF CMakeFiles\app.dir\C_\ncs\v2.5.0\bootloader\mcuboot\boot\bootutil\src\loader.c.obj.d -o CMakeFiles/app.dir/C_/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/src/loader.c.obj -c C:/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/src/loader.c
    In file included from C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/sysflash.h:10,
                     from C:/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/src/bootutil_priv.h:33,
                     from C:/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/src/loader.c:41:
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h: In function '__flash_area_ids_for_slot':
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:48:37: error: 'PM_MCUBOOT_PRIMARY_1_ID' undeclared (first use in this function); did you mean 'PM_MCUBOOT_PRIMARY_ID'?
       48 | #define FLASH_AREA_IMAGE_1_SLOTS    PM_MCUBOOT_PRIMARY_1_ID, PM_MCUBOOT_SECONDARY_1_ID
          |                                     ^~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:55:29: note: in expansion of macro 'FLASH_AREA_IMAGE_1_SLOTS'
       55 |                             FLASH_AREA_IMAGE_1_SLOTS
          |                             ^~~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:67:9: note: in expansion of macro 'ALL_AVAILABLE_SLOTS'
       67 |         ALL_AVAILABLE_SLOTS
          |         ^~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:48:37: note: each undeclared identifier is reported only once for each function it appears in
       48 | #define FLASH_AREA_IMAGE_1_SLOTS    PM_MCUBOOT_PRIMARY_1_ID, PM_MCUBOOT_SECONDARY_1_ID
          |                                     ^~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:55:29: note: in expansion of macro 'FLASH_AREA_IMAGE_1_SLOTS'
       55 |                             FLASH_AREA_IMAGE_1_SLOTS
          |                             ^~~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:67:9: note: in expansion of macro 'ALL_AVAILABLE_SLOTS'
       67 |         ALL_AVAILABLE_SLOTS
          |         ^~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:48:62: error: 'PM_MCUBOOT_SECONDARY_1_ID' undeclared (first use in this function); did you mean 'PM_MCUBOOT_SECONDARY_ID'?
       48 | #define FLASH_AREA_IMAGE_1_SLOTS    PM_MCUBOOT_PRIMARY_1_ID, PM_MCUBOOT_SECONDARY_1_ID
          |                                                              ^~~~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:55:29: note: in expansion of macro 'FLASH_AREA_IMAGE_1_SLOTS'
       55 |                             FLASH_AREA_IMAGE_1_SLOTS
          |                             ^~~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:67:9: note: in expansion of macro 'ALL_AVAILABLE_SLOTS'
       67 |         ALL_AVAILABLE_SLOTS
          |         ^~~~~~~~~~~~~~~~~~~
    ninja: build stopped: subcommand failed.
    [20/178] Building C object modules/mcuboot/boot/bootutil/zephyr/CMakeFiles/mcuboot_util.dir/C_/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/src/bootutil_public.c.obj
    FAILED: modules/mcuboot/boot/bootutil/zephyr/CMakeFiles/mcuboot_util.dir/C_/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/src/bootutil_public.c.obj 
    C:\ncs\toolchains\c57af46cb7\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe -DKERNEL -DNRF5340_XXAA_APPLICATION -DNRF_SKIP_FICR_NS_COPY_TO_RAM -DPICOLIBC_INTEGER_PRINTF_SCANF -DUSE_PARTITION_MANAGER=1 -DZCBOR_ASSERTS -D_FORTIFY_SOURCE=1 -D_POSIX_C_SOURCE=200809 -D__LINUX_ERRNO_EXTENSIONS__ -D__PROGRAM_START -D__ZEPHYR__=1 -IC:/ncs/v2.5.0/zephyr/include -Izephyr/include/generated -IC:/ncs/v2.5.0/zephyr/soc/arm/nordic_nrf/nrf53 -IC:/ncs/v2.5.0/zephyr/soc/arm/nordic_nrf/common/. -IC:/ncs/v2.5.0/zephyr/subsys/mgmt/mcumgr/util/include -IC:/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/include -IC:/ncs/v2.5.0/zephyr/subsys/mgmt/mcumgr/transport/include -IC:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include -IC:/ncs/v2.5.0/zephyr/subsys/bluetooth -IC:/ncs/v2.5.0/zephyr/subsys/settings/include -IC:/ncs/v2.5.0/nrf/include -IC:/ncs/v2.5.0/nrf/tests/include -IC:/ncs/v2.5.0/modules/hal/cmsis/CMSIS/Core/Include -IC:/ncs/v2.5.0/zephyr/modules/cmsis/. -IC:/ncs/v2.5.0/modules/hal/nordic/nrfx -IC:/ncs/v2.5.0/modules/hal/nordic/nrfx/drivers/include -IC:/ncs/v2.5.0/modules/hal/nordic/nrfx/mdk -IC:/ncs/v2.5.0/zephyr/modules/hal_nordic/nrfx/. -Imodules/libmetal/libmetal/lib/include -IC:/ncs/v2.5.0/modules/lib/open-amp/open-amp/lib/include -IC:/ncs/v2.5.0/modules/crypto/tinycrypt/lib/include -IC:/ncs/v2.5.0/modules/lib/zcbor/include -IC:/ncs/v2.5.0/nrfxlib/softdevice_controller/include -IC:/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/zephyr/.. -IC:/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/zephyr/../include -IC:/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/zephyr/../../zephyr/include -isystem C:/ncs/v2.5.0/nrfxlib/crypto/nrf_cc312_platform/include -fno-strict-aliasing -Os -imacros C:/ncs/2.5SDK/less8/build/zephyr/include/generated/autoconf.h -fno-printf-return-value -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m33 -mthumb -mabi=aapcs -mfp16-format=ieee --sysroot=C:/ncs/toolchains/c57af46cb7/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi -imacros C:/ncs/v2.5.0/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 -ftls-model=local-exec -fno-reorder-functions --param=min-pagesize=0 -fno-defer-pop -fmacro-prefix-map=C:/ncs/2.5SDK/less8=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/ncs/v2.5.0/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/ncs/v2.5.0=WEST_TOPDIR -ffunction-sections -fdata-sections --specs=picolibc.specs -std=c99 -MD -MT modules/mcuboot/boot/bootutil/zephyr/CMakeFiles/mcuboot_util.dir/C_/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/src/bootutil_public.c.obj -MF modules\mcuboot\boot\bootutil\zephyr\CMakeFiles\mcuboot_util.dir\C_\ncs\v2.5.0\bootloader\mcuboot\boot\bootutil\src\bootutil_public.c.obj.d -o modules/mcuboot/boot/bootutil/zephyr/CMakeFiles/mcuboot_util.dir/C_/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/src/bootutil_public.c.obj -c C:/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/src/bootutil_public.c
    In file included from C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/sysflash.h:10,
                     from C:/ncs/v2.5.0/bootloader/mcuboot/boot/bootutil/src/bootutil_public.c:43:

    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h: In function '__flash_area_ids_for_slot':
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:48:37: error: 'PM_MCUBOOT_PRIMARY_1_ID' undeclared (first use in this function); did you mean 'PM_MCUBOOT_PRIMARY_ID'?
       48 | #define FLASH_AREA_IMAGE_1_SLOTS    PM_MCUBOOT_PRIMARY_1_ID, PM_MCUBOOT_SECONDARY_1_ID
          |                                     ^~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:55:29: note: in expansion of macro 'FLASH_AREA_IMAGE_1_SLOTS'
       55 |                             FLASH_AREA_IMAGE_1_SLOTS
          |                             ^~~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:67:9: note: in expansion of macro 'ALL_AVAILABLE_SLOTS'
       67 |         ALL_AVAILABLE_SLOTS
          |         ^~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:48:37: note: each undeclared identifier is reported only once for each function it appears in
       48 | #define FLASH_AREA_IMAGE_1_SLOTS    PM_MCUBOOT_PRIMARY_1_ID, PM_MCUBOOT_SECONDARY_1_ID
          |                                     ^~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:55:29: note: in expansion of macro 'FLASH_AREA_IMAGE_1_SLOTS'
       55 |                             FLASH_AREA_IMAGE_1_SLOTS
          |                             ^~~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:67:9: note: in expansion of macro 'ALL_AVAILABLE_SLOTS'
       67 |         ALL_AVAILABLE_SLOTS
          |         ^~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:48:62: error: 'PM_MCUBOOT_SECONDARY_1_ID' undeclared (first use in this function); did you mean 'PM_MCUBOOT_SECONDARY_ID'?
       48 | #define FLASH_AREA_IMAGE_1_SLOTS    PM_MCUBOOT_PRIMARY_1_ID, PM_MCUBOOT_SECONDARY_1_ID
          |                                                              ^~~~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:55:29: note: in expansion of macro 'FLASH_AREA_IMAGE_1_SLOTS'
       55 |                             FLASH_AREA_IMAGE_1_SLOTS
          |                             ^~~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.5.0/bootloader/mcuboot/boot/zephyr/include/sysflash/pm_sysflash.h:67:9: note: in expansion of macro 'ALL_AVAILABLE_SLOTS'
       67 |         ALL_AVAILABLE_SLOTS
          |         ^~~~~~~~~~~~~~~~~~~

    ...

    It looks to me that after deleting the external flash partitions, there are partitions missing for the multiimage flash. Also the DevAcademy says, that "some partitions" have to be created

    6.2 From the documentation, we must create some partitions. If we enable external flash in the project, these partitions will be automatically created. For simultaneous updates, we most often want to use external flash either way, to give the application more flash to work with, so we will enable external flash here. We will use the partition manager to enable external flash. There are several ways to set devicetree overlays. You can choose whatever fits you best, but for this exercise we will just use app.overlay, added directly to the project directory.

    But there is just how to do it with the external flash. 

    To do it without external flash, I have to create pm.ylm file in the project folder I guess, but I do not realy know, what is to be defined there.

    I guess there is a lot of information here, but I am not sure, which I should use in my case

    https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/scripts/partition_manager/partition_manager.html#external-flash-memory-partitions

    Are there maybe some other samples showing how could I implement it?

    Thanks a lot for the support

    Jiri

  • Hi Abhijith,

    After a lot of trying and searching (thanks a lot to Torsten Robitzki for the hint), is my question:

    Is it possible to use FOTA on nRF5340 devices without external flash? And if yes, how should I change the sample from the DevAcademy to do so?

    Thanks a lot in advance

    Kind Regards

    Jiri

Related