nRF5340: SMP Server with external XIP sample with image revert possibility

Hi all,

by default, the "nRF5340: SMP Server with external XIP" sample does not support reverting images in case DFU was not successful. In other words, it does not swap slots, it just copies the new image over the old one. This is caused by the config CONFIG_BOOT_UPGRADE_ONLY being set to "y". 

I had no luck building the sample with CONFIG_BOOT_UPGRADE_ONLY=n. I had a look into C:\ncs\v2.6.1\nrf\modules\mcuboot\nrf5340_exip_image.conf and I can see that this config is set to "y" there. Also there is a note stating that this config is needed to make simultaneous multi image update possible. Does this mean that the only way to achieve multi image DFU for nrf5340 with part of code in QSPI flash is to have this config set to y? Or to make the question more generic - is there a way to have the posibility of reverting images after update in this multi image + QSPI XIP scenario? 

Thanks!

Parents Reply
  • Hi,

    again, many thanks for your responses, and your patience :) I understand the limitation regarding the network core image. 

    There is one more idea I have - would it be somehow possible to update all three images (app + net + qspi flash) and make app + qspi flash images reversible? Of course, net image would not be reversible, that's clear. 

    Thanks,

    Ladivin 

Children
  • Happy to help

    Ladivin said:
    There is one more idea I have - would it be somehow possible to update all three images (app + net + qspi flash) and make app + qspi flash images reversible?

    Hmm, I will have to look closer into this, but my initial guess is that it might be possible. You might be aware of this, but I'm stating it anyways: One of the reasons for why we recommend simultaneous DFU of both the app and netcore at the same time is so that you don't break the interface (rpmsg / ipc or other) between them. 

    Lets consider the case of nonsimultaneous of app and netcore (and put xip part on the sideline): If you do this you will first upload the app core image, reboot the device and swap to the new image. The next step is to upload the image to the netcore and repeat the same steps, but if you in the first step has broken the interface between the cores (for instance that the app core is no longer compatible with the previous interface), you can't use the netcore and BLE to upload the new image to the netcore. Let me know if you're still following or not and I'll clear up my explanation.

    But as mentioned, I will look into this and verify if the combination you were asking about and get back to you after the weekend

    Kind regards,
    Andreas

Related