I am using nRF Connect SDK v2.2.0 with nRF52810 on a custom board.
We have included OTA updates in our project, and it works successfully and downloads the firmware via MQTT and writes it using developer.nordicsemi.com/.../dfu_target.html.
Because the internal flash nRF52810 is not enough for us, we want to use the external flash AT45DB0 to store the firmware image.
As an example I used tests\modules\mcuboot\external_flash.
As a result of the build, I get an error:

I made a child_image\boards .overlay file:
/ {
led {
compatible = "gpio-leds";
but_led_1: but_led {
gpios = <&gpio0 12 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
label = "Permission to turn off the device";
};
};
aliases {
mcuboot-led0 = &but_led_1;
};
chosen {
nordic,pm-ext-flash = &at45db0;
};
};
&gpio0 {
status = "okay";
};
&spi2 {
status = "okay";
pinctrl-0 = <&spi2_default>;
pinctrl-1 = <&spi2_sleep>;
pinctrl-names = "default", "sleep";
cs-gpios = < &gpio0 29 GPIO_ACTIVE_LOW >;
at45db0: at45db161d@0 {
compatible = "atmel,at45";
reg = <0>;
spi-max-frequency = <15000000>;
label = "AT45DB0";
jedec-id = [1f 26 00];
size = <16777216>;
sector-size = <131072>;
block-size = <4096>;
page-size = <512>;
use-udpd;
enter-dpd-delay = <2000>;
exit-dpd-delay = <35000>;
status = "okay";
};
};
I made a child mcuboot.config file:# # Copyright (c) 2021 Nordic Semiconductor ASA # # SPDX-License-Identifier: LicenseRef-BSD-5-Clause-Nordic # CONFIG_MAIN_STACK_SIZE=10240 #CONFIG_PM_PARTITION_SIZE_MCUBOOT=0x10000 #CONFIG_MBEDTLS_CFG_FILE="mcuboot-mbedtls-cfg.h" CONFIG_MCUBOOT_INDICATION_LED=y CONFIG_FLASH=y CONFIG_FPROTECT=y CONFIG_PM=n CONFIG_FW_INFO=y #CONFIG_BOOT_ENCRYPT_EC256=n #CONFIG_BOOT_ENCRYPT_RSA=n #CONFIG_BOOT_ENCRYPT_X25519=n #CONFIG_BOOT_SWAP_SAVE_ENCTLV=n #CONFIG_BOOT_BOOTSTRAP=n #CONFIG_BOOT_UPGRADE_ONLY=n ### Minimal Configurations ### #CONFIG_ASSERT=n #CONFIG_BOOT_BANNER=n #CONFIG_CLOCK_CONTROL=n #CONFIG_KERNEL_MEM_POOL=n #CONFIG_MINIMAL_LIBC_CALLOC=n #CONFIG_MINIMAL_LIBC_MALLOC=n #CONFIG_MINIMAL_LIBC_REALLOCARRAY=n #CONFIG_NCS_SAMPLES_DEFAULTS=n #CONFIG_NO_RUNTIME_CHECKS=y #CONFIG_REBOOT=n #CONFIG_RESET_ON_FATAL_ERROR=n #CONFIG_SIZE_OPTIMIZATIONS=y #CONFIG_SYS_CLOCK_EXISTS=n # Config logger CONFIG_LOG=y CONFIG_LOG_MODE_MINIMAL=y # former CONFIG_MODE_MINIMAL ### Ensure Zephyr logging changes don't use more resources CONFIG_LOG_DEFAULT_LEVEL=3 ### Decrease footprint by ~4 KB in comparison to CBPRINTF_COMPLETE=y CONFIG_CBPRINTF_NANO=y CONFIG_CONSOLE=y CONFIG_RTT_CONSOLE=y CONFIG_USE_SEGGER_RTT=y
Added pm_static.yml file static partition to the root of the project:
app:
address: 0xc200
end_address: 0xfa000
region: flash_primary
size: 0xede00
external_flash:
address: 0xee000
end_address: 0x800000
region: external_flash
size: 0x712000
littlefs_storage:
address: 0xfa000
end_address: 0x100000
placement:
before:
- end
region: flash_primary
size: 0x6000
mcuboot:
address: 0x0
end_address: 0xc000
placement:
before:
- mcuboot_primary
region: flash_primary
size: 0xc000
mcuboot_pad:
address: 0xc000
end_address: 0xc200
placement:
before:
- mcuboot_primary_app
region: flash_primary
size: 0x200
mcuboot_primary:
address: 0xc000
end_address: 0xfa000
orig_span: &id001
- mcuboot_pad
- app
region: flash_primary
size: 0xee000
span: *id001
mcuboot_primary_app:
address: 0xc200
end_address: 0xfa000
orig_span: &id002
- app
region: flash_primary
size: 0xede00
span: *id002
mcuboot_secondary:
address: 0x0
device: AT45DB0
end_address: 0xee000
placement:
align:
start: 0x4
region: external_flash
size: 0xee000
sram_primary:
address: 0x20000000
end_address: 0x20040000
region: sram_primary
size: 0x40000
I spent a lot of time to understand why it doesn't work. I hope you can help me.
I can provide you with the source files of my project if you need them.