The separation of flash memory into a region for the application core and one for the network core on the nRF5340 seems rather cumbersome and error-prone.
I'm especially thinking about robust firmware updates for both cores at the same time, including the possibility to revert an upgrade.
There are two approaches implemented in NCS/Zephyr but both have drawbacks:
- mcuboot tries to detect if the image in the secondary slot is intended for the network core. However that code does not account for the secondary slot being on external flash, or being encrypted. Also this requires more than one cycle of writing to secondary slot and reboot.
- Simultaneous multi-image DFU describes a method of updating multiple images, but that requires setting CONFIG_BOOT_UPGRADE_ONLY, thus a revert is not possible.
Since the application core flash is accessible from the network core, I'm thinking about having the network core firmware image located within the application core image at a fixed address.
The network core flash at 0x01000000 would then only contain a jump instruction to that fixed address in the application core flash region.
Simply by updating the application core image, the network core firmware contained within would thus be up to date as well.
The drawback is having to fit everything in the 1Mbyte of the application core flash.
Would this work or is this a completely bone-headed idea? I'm intending to try it, but would like to hear other ideas from the community or from Nordic.