Partition Manager Error w/ Direct XIP and MCUboot enabled

Hello,

I am looking to utilize direct xip w/ MCUboot and am observing an error from the partition manager relating to placement of the mcuboot_secondary_pad. I am able to reproduce this error w/ the zephyr hello_world sample by adding the following configurations:

prj.conf

CONFIG_BOOTLOADER_MCUBOOT=y
CONFIG_BOOT_BUILD_DIRECT_XIP_VARIANT=y

child_image/mcuboot.conf

CONFIG_BOOT_DIRECT_XIP=y

Running $ west build -b nrf5340dk_nrf5340_cpuapp --pristine

yields the following error:


Partition manager failed: Error when inspecting mcuboot_secondary_pad, invalid address 0x84000, expected 0x84001,
Failed to partition region flash_primary, size of region: 1048576
Partition Configuration:
mcuboot:
placement:
before:
- mcuboot_primary
size: 49152
mcuboot_pad:
placement:
align:
start: 16384
before:
- mcuboot_primary_app
size: 512
mcuboot_secondary_app:
placement:
after:
- mcuboot_secondary_pad
size: 491009
mcuboot_secondary_pad:
placement:
after:
- mcuboot_primary
align:
start: 16384
size: 512

If I comment out the alignment directive in the mcuboot_secondary_pad partition from $NCS_DIR/bootloader/mcuboot/boot/zephyr/pm.yml I am able to build successfully.

Related