I am working on nrf5340dk board with 2.6.1 SDK and toolchains.
So, I took "mesh_shell" project as a starting point, then added external flash and mcuboot with simultaneous update support and then made my partitions static. List of partitions is below, AFAIK it is ok.
Then I configured mcuboot for serial recovery and added shell and mcumgr server (over shell) to the app. Everything seemed ok, mcumgr (go client) talked to mcuboot and the app over the serial port (e.g. "image list").
1. Last thing I want to do is update the board over BLE mesh, but before that (at least as I understand it) I need to be able to do a simultaneous update of app and net images from the secondary partitions through mcuboot. Correct?
2. nrf5340 default behaviour is different here from e.g. nrf52 series because potential revert bricks net core - so I tried to force the same behaviour by setting CONFIG_USE_NRF53_MULTI_IMAGE_WITHOUT_UPGRADE_ONLY=y in prj.conf. This did not work as the option has no prompt. I added one just to be able to set this, but what is the correct way to go here?
3. The first issue: With connecting mcumgr to the app after flashing, I see only "image=0 slot=0" in the image list and after uploading "app_update.bin", I see "image=0 slot=0" and "image=0 slot=1" with uploaded app. If I upload "net_core_app_update.bin", it is ALSO uploaded to "image=0 slot=1". So:
a) Why don't I see the slot for net core in the image list?
b) If I try to upload "dfu_application.zip", the transfer stops at 0 bytes and never moves. Why?
4. The second issue: I can stop in mcuboot (confirmed by led) and image list here shows 3 slots (so, also "image=1 slot=0"). I can upload "dfu_application.zip" here. So:
a) After 60 KB are uploaded, the already slow transfer (3 KB/s) drops to 1 KB/s. Why?
b) After upload of zip and doing image list, the "image=0 slot=0" disappears from the list and "image=1 slot=0" is still empty. If I reboot, the app is bricked, mcuboot still works.
As a reference, I took this link: https://github.com/hellesvik-nordic/samples_for_nrf_connect_sdk/tree/main/bootloader_samples
It contains samples for DFU update over BLE for nrf5340 and separate samples for serial recovery of app in net cores, but there is no sample for simultaneous serial recovery of both cores.
The docs say it should be possible - or am I missunderstanding the docs?
I am attaching the ZIP file that contains .conf files for the app and mcuboot and also a manifest file from the "dfu_application.zip".conf_and_manifest.zip
Regards,
Marko
---------------------------
external_flash (0x800000 - 8192kB):
+----------------------------------------------------+
| 0x0: mcuboot_secondary (0xcc000 - 816kB) |
| 0xcc000: mcuboot_secondary_1 (0x40000 - 256kB) |
| 0x10c000: littlefs_ext_storage (0x6c0000 - 6912kB) |
| 0x7cc000: external_flash (0x34000 - 208kB) |
+----------------------------------------------------+
flash_primary (0x100000 - 1024kB):
+--------------------------------------------------+
| 0x0: mcuboot (0x14000 - 80kB) |
+---0x14000: mcuboot_primary (0xcc000 - 816kB)-----+
| 0x14000: mcuboot_pad (0x200 - 512B) |
+---0x14200: mcuboot_primary_app (0xcbe00 - 815kB)-+
| 0x14200: app (0xcbe00 - 815kB) |
+--------------------------------------------------+
| 0xe0000: littlefs_storage (0x20000 - 128kB) |
+--------------------------------------------------+
otp (0x2fc - 764B):
+------------------------------+
| 0xff8100: otp (0x2fc - 764B) |
+------------------------------+
ram_flash (0x40000 - 256kB):
+------------------------------------------+
| 0x0: mcuboot_primary_1 (0x40000 - 256kB) |
| 0x40000: ram_flash (0x0 - 0B) |
+------------------------------------------+
sram_primary (0x80000 - 512kB):
+-----------------------------------------------+
| 0x20000000: pcd_sram (0x2000 - 8kB) |
| 0x20002000: sram_primary (0x6e000 - 440kB) |
| 0x20070000: rpmsg_nrf53_sram (0x10000 - 64kB) |
+-----------------------------------------------+
CPUNET flash_primary (0x40000 - 256kB):
+--------------------------------------------+
+---0x1000000: b0n_container (0xa000 - 40kB)-+
| 0x1000000: b0n (0x9a00 - 38kB) |
| 0x1009a00: provision (0x600 - 1kB) |
+---0x100a000: app (0x36000 - 216kB)---------+
| 0x100a000: hci_ipc (0x36000 - 216kB) |
+--------------------------------------------+
CPUNET sram_primary (0x10000 - 64kB):
+-------------------------------------------+
| 0x21000000: sram_primary (0x10000 - 64kB) |
+-------------------------------------------+