I have an nrf5340 device with the following requirements.
- must switch application slots if image becomes corrupt
- can only do OTA updates
- must have the ability to upgrade the network core
In order to enable switching slots, we chose to use Direct XIP mode. This has thrown the unwanted side effect getting caught in a boot loop when updating the network core.
To reproduce,
- bump up CONFIG_MCUBOOT_IMAGE_VERSION and rebuild the project
- use mcumgr to send net_core_app_update.bin
- reset the board
The system ends up getting stuck in a boot loop, which sorta makes sense now that I know how direct XIP mode works.
*** Booting Zephyr OS build v3.3.99-ncs1 *** I: Starting Direct-XIP bootloader I: Primary slot: version=0.0.0+0 I: Secondary slot: version=0.0.1+0 I: Image 0 loaded from the secondary slot I: Bootloader chainload address offset: 0x80000 *** Booting Zephyr OS build v3.3.99-ncs1 *** ... etc etc
I guess the question is it even possible to update the netcore OTA in Direct XIP mode?