MCUboot with multiple images stored on external flash?

Hello,

Hi I m trying to implement the following using mcuboot and zephyr. I have a nrf52840dk which has a external flash mx25r64 to store multiple images on the external flash lets say 4. And the idea is to select which image to load when you turn on the board, for now I will use just some buttons. So if button 1 is pressed it loads image 1 etc. Can someone give me some guidelines where to start?

Parents Reply Children
  • HI   Thx, I have some knowledge with mcuboot and how it works with dfu. But is it possible to use just the single slot (SLOT 0) and XIP enabled. From slot 0 I would jump to a specific address? My problem with this is I need to change the linker script and vector table?

  • suads said:
    have some knowledge with mcuboot and how it works with dfu.

    Glad to hear that

    suads said:
    But is it possible to use just the single slot (SLOT 0) and XIP enabled.

    The nRF52840 does not support XiP (Execute in place) from an external flash. Do you mean direct-xip mode which is referred to here instead? If so, then all variants of your firmware needs to be on the internal flash, given that the nRF52840 does not support running code from an external flash (XiP).

    Kind regards,
    Andreas

  • Thx I was not aware that there is xip and direct-xip, never worked with it, So if understand XIP supports memory mapping while direct-xip not. I have also an nrf5340dk would that be possible with it? 

  • suads said:
    Thx I was not aware that there is xip and direct-xip, never worked with it, So if understand XIP supports memory mapping while direct-xip not. I have also an nrf5340dk would that be possible with it? 

    It's possible on the nRF5340 to some extent, yes. It is not designed for you to fully run firmware from external flash but rather have "low-priority" parts of your firmware placed on the external flash.

    You can't run timing critical code such as for instance code depending on interrupts from the external flash. You must also design your firmware to be robust enough so that you have control over everything that is to be executed from external flash so you can power up and down the external flash when needed to reduce current consumption.

    Kind regards,
    Andreas

Related