MCUBoot secondary slot in external SPI Flash

I am using NCS v1.9.1  with the nRF52840 and I am not able to move the MCUBoot secondary slot to SPI flash.

I have been able to communicate with the device over the SPI port that is configured as such:

&spi2 {
compatible = "nordic,nrf-spi";
status = "okay";
sck-pin = <36>;
mosi-pin = <34>;
miso-pin = <35>;
cs-gpios = < &gpio1 01 GPIO_ACTIVE_LOW>;

sdhc0: sdhc@0 {
compatible = "jedec,spi-nor";
reg = <0>;
status = "okay";
spi-max-frequency = <2400000>;
label = "EXT_FLASH_SPI";
jedec-id = [c2 28 17];
sfdp-bfp = [
e5 20 f1 ff ff ff ff 03 44 eb 08 6b 08 3b 04 bb
ee ff ff ff ff ff 00 ff ff ff 00 ff 0c 20 0f 52
10 d8 00 ff 23 72 f5 00 82 ed 04 cc 44 83 68 44
30 b0 30 b0 f7 c4 d5 5c 00 be 29 ff f0 d0 ff ff
];
size = <0x100000>;
has-dpd;
t-enter-dpd = <10000>;
t-exit-dpd = <35000>;
};
};


I modified my project structure to reflect the sample 1207.hello_world_spi_nor_ext_flash.zip given in this thread but keep getting this error:

Partition manager failed: Statically defined partitions are not packed at start of region 'external_flash'.
Failed to partition region external_flash, size of region: 131072
Partition Configuration:
external_flash:
size: 1048576
mcuboot_secondary:
placement:
align:
start: 4
size: 991232

 Any help is appreciated in getting the secondary image slot onto the external flash.

Thank you

Related