Still working on nRF5340 with external QSPI NOR Flash model EN25QH64 (building environment: NCS 2.6.1, Zephyr 3.5.99).
I use it for slot-1 partition during DFU.
At build time the linker reports a FLASH region overflow by 15120 bytes
...
[153/158] Linking C executable zephyr/zephyr_pre0.elf
[154/158] Generating linker.cmd
[155/158] Generating isr_tables.c, isr_tables_vt.ld, isr_tables_swi.ld
[156/158] Building C object zephyr/CMakeFiles/zephyr_final.dir/misc/empty_file.c.obj
[157/158] Building C object zephyr/CMakeFiles/zephyr_final.dir/isr_tables.c.obj
[158/158] Linking C executable zephyr/zephyr.elf
Memory region Used Size Region Size %age Used
FLASH: 24538 B 34176 B 71.80%
RAM: 3488 B 64 KB 5.32%
SRAM1: 0 GB 64 KB 0.00%
IDT_LIST: 0 GB 32 KB 0.00%
[232/243] Building C object zephyr/CMakeFiles/zephyr_final.dir/isr_tables.c.obj
[233/243] Creating public key from private key used for signing
[235/243] Completed 'b0n_subimage'
[236/243] Creating data to be provisioned to the Bootloader, storing to provision.hex
[238/243] Generating zephyr/b0n_container.hex
[239/243] Linking C executable zephyr/zephyr.elf
Memory region Used Size Region Size %age Used
FLASH: 177528 B 222 KB 78.09%
RAM: 47604 B 64 KB 72.64%
SRAM1: 0 GB 64 KB 0.00%
IDT_LIST: 0 GB 32 KB 0.00%
[240/243] Generating zephyr/app.hex
[240/243] Creating signature of application
[241/243] Creating validation for zephyr.hex, storing to
[243/243] Generating zephyr/merged_CPUNET.hex
[535/559] Linking C executable zephyr/zephyr_pre0.elf
FAILED: zephyr/zephyr_pre0.elf zephyr/zephyr_pre0.map /home/gabriele/spiro-dev/apps/spiro/build/zephyr/zephyr_pre0.map
: && ccache /home/gabriele/spiro-dev/nrf53sdk/sdk/gnu-arm-emb-toolchain/bin/arm-none-eabi-gcc -gdwarf-4 zephyr/CMakeFiles/zephyr_pre0.dir/misc/empty_file.c.obj -o zephyr/zephyr_pre0.elf zephyr/CMakeFiles/offsets.dir/./arch/arm/core/offsets/offsets.c.obj -fuse-ld=bfd -T zephyr/linker_zephyr_pre0.cmd -Wl,-Map=/home/gabriele/spiro-dev/apps/spiro/build/zephyr/zephyr_pre0.map -Wl,--whole-archive app/libapp.a zephyr/libzephyr.a zephyr/arch/common/libarch__common.a zephyr/arch/arch/arm/core/libarch__arm__core.a zephyr/arch/arch/arm/core/cortex_m/libarch__arm__core__cortex_m.a zephyr/arch/arch/arm/core/cortex_m/cmse/libarch__arm__core__cortex_m__cmse.a zephyr/arch/arch/arm/core/mpu/libarch__arm__core__mpu.a zephyr/lib/libc/newlib/liblib__libc__newlib.a zephyr/lib/libc/common/liblib__libc__common.a zephyr/soc/soc/arm/nordic_nrf/libsoc__arm__nordic_nrf.a zephyr/boards/boards/arm/nrf5340_spiro_cpuapp/lib..__..__..__board-support__boards__arm__nrf5340_spiro.a zephyr/subsys/fs/libsubsys__fs.a zephyr/subsys/random/libsubsys__random.a zephyr/subsys/bluetooth/common/libsubsys__bluetooth__common.a zephyr/subsys/bluetooth/host/libsubsys__bluetooth__host.a zephyr/subsys/bluetooth/crypto/libsubsys__bluetooth__crypto.a zephyr/subsys/dfu/boot/libsubsys__dfu__boot.a zephyr/subsys/net/libsubsys__net.a zephyr/drivers/adc/libdrivers__adc.a zephyr/drivers/bluetooth/libdrivers__bluetooth.a zephyr/drivers/clock_control/libdrivers__clock_control.a zephyr/drivers/console/libdrivers__console.a zephyr/drivers/display/libdrivers__display.a zephyr/drivers/entropy/libdrivers__entropy.a zephyr/drivers/flash/libdrivers__flash.a zephyr/drivers/gpio/libdrivers__gpio.a zephyr/drivers/i2c/libdrivers__i2c.a zephyr/drivers/mbox/libdrivers__mbox.a zephyr/drivers/pinctrl/libdrivers__pinctrl.a zephyr/drivers/pwm/libdrivers__pwm.a zephyr/drivers/sensor/dps310/libdrivers__sensor__dps310.a zephyr/drivers/sensor/max30101/libdrivers__sensor__max30101.a zephyr/drivers/sensor/sht4x/libdrivers__sensor__sht4x.a zephyr/drivers/serial/libdrivers__serial.a zephyr/drivers/timer/libdrivers__timer.a modules/hal_nordic/nrfx/libmodules__hal_nordic__nrfx.a modules/libmetal/libmetal/lib/libmetal.a modules/littlefs/libmodules__littlefs.a modules/lvgl/libmodules__lvgl.a modules/open-amp/open-amp/lib/libopen_amp.a modules/nrf/lib/dk_buttons_and_leds/lib..__nrf__lib__dk_buttons_and_leds.a modules/nrf/subsys/pcd/lib..__nrf__subsys__pcd.a modules/nrf/drivers/hw_cc3xx/lib..__nrf__drivers__hw_cc3xx.a modules/mcuboot/boot/bootutil/zephyr/libmcuboot_util.a -Wl,--no-whole-archive zephyr/kernel/libkernel.a -L"/home/gabriele/spiro-dev/nrf53sdk/sdk/gcc-arm-none-eabi-10-2020-q4-major/bin/../lib/gcc/arm-none-eabi/10.2.1/thumb/v8-m.main+fp/hard" -L/home/gabriele/spiro-dev/apps/spiro/build/zephyr -lgcc zephyr/arch/common/libisr_tables.a -mcpu=cortex-m33 -mthumb -mabi=aapcs -mfpu=fpv5-sp-d16 -mfloat-abi=hard -mfp16-format=ieee -Wl,--gc-sections -Wl,--build-id=none -Wl,--sort-common=descending -Wl,--sort-section=alignment -Wl,-u,_OffsetAbsSyms -Wl,-u,_ConfigAbsSyms -nostdlib -static -Wl,-X -Wl,-N -Wl,--orphan-handling=warn -lm -Wl,-lc -L"/home/gabriele/spiro-dev/nrf53sdk/sdk/gnu-arm-emb-toolchain/arm-none-eabi"/lib/thumb/v8-m.main+fp/hard -Wl,-lgcc -lc -specs=nano.specs /home/gabriele/spiro-dev/nrf53sdk/ncs/nrfxlib/crypto/nrf_cc312_platform/lib/cortex-m33/hard-float/no-interrupts/libnrf_cc312_platform_0.9.19.a -lc && cd /home/gabriele/spiro-dev/apps/spiro/build/zephyr && /home/gabriele/spiro-dev/nrf53sdk/zephyr/sdk/bin/cmake -E true
/home/gabriele/spiro-dev/nrf53sdk/sdk/gcc-arm-none-eabi-10-2020-q4-major/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld.bfd: zephyr/zephyr_pre0.elf section `rodata' will not fit in region `FLASH'
/home/gabriele/spiro-dev/nrf53sdk/sdk/gcc-arm-none-eabi-10-2020-q4-major/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld.bfd: region `FLASH' overflowed by 15120 bytes
I'm not sure this is related with the external or internal flash.
This is the DTS descriptor for the external flash
&qspi {
/delete-node/ mx25r6435f@0;
en25qh64: en25qh64@0 {
compatible = "nordic,qspi-nor";
reg = <0>;
sck-frequency = <8000000>;
jedec-id = [1c 70 17];
size = <0x800000>; // 8MB
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
data_partition: partition@0 {
label = "data";
reg = <0x000000000 0x000100000>;
};
slot1_partition: partition@100000 {
label = "image-1";
reg = <0x000100000 0x0001ac000>;
};
};
};
};