Hi!
I am trying to do a DFU with external flash, using a nRF54L15-DK development kit.
To evaluate this feature, I use the l9_e3_sol example available on GitHub (I use the qspi project).
The only modification I did, was to add following line in the mcuboot.conf file:
CONFIG_PM_PARTITION_SIZE_MCUBOOT=0xF000
Unfortunately, this doesn't work. I get following logs:
*** Booting MCUboot v2.3.0-dev-3de5b4df5f9f *** *** Using nRF Connect SDK v3.3.1-1d7a0b0e49b8 *** *** Using Zephyr OS v4.3.99-37e6c28576ee *** I: Starting bootloader D: context_boot_go abort()
I tried to understand what is going wrong. So far what I found.
MCUBoot detects an error in the boot_open_all_flash_areas function (mcuboot/boot/bootutil/src/bootutil_loader.c) when it tries call the function flash_area_open for the second slot.
The function flash_area_id_from_multi_image_slot (mcuboot/boot/zephyr/flash_map_extended.c) for the second slot, returns a value fa_id = 1 which does not seem to be wrong.
The flash_area_open function (C:\ncs\v3.3.1\zephyr\subsys\storage\flash_map\flash_map.c) fails when calling the get_flash_area_from_id function (it does not find the second slot with id = 1).
I checked the implementation of the get_flash_area_from_id function (C:\ncs\v3.3.1\zephyr\subsys\storage\flash_map\flash_map_priv.h) and indeed, it does not find an area with ID = 1...
get_flash_area_from_id. i = 0, flash_map[i].fa_id = 0 offset = 0 size = 0xf000 get_flash_area_from_id. i = 1, flash_map[i].fa_id = 2 offset = 61440 size = 0x800 get_flash_area_from_id. i = 2, flash_map[i].fa_id = 3 offset = 61440 size = 0x156000 get_flash_area_from_id. i = 3, flash_map[i].fa_id = 4 offset = 63488 size = 0x155800 get_flash_area_from_id. i = 4, flash_map[i].fa_id = 5 offset = 63488 size = 0x155800
It seems to me, that the get_flash_area_from_id function does not take in account the external flash. My guess so far: something wrong with the configuration (some file is not take in account by the build system), but I cannot solve it.
Any help would be appreciated :-)
Best regards,
Jordan