Multi-image or non-simultaneous network core update example with BOOT_SWAP_USING_SCRATCH?

Hi,

We are trying to enable Multi-Image DFU on the nRF5340 so we may update the network core on its own (no app core update). We realized that to be able to update just the network core on its own we basically had to pull most of Kconfig options used for multi-image updates.

Our question now is if there's an example of a multi-image update configuration (using external flash ideally) where CONFIG_BOOT_SWAP_USING_SCRATCH is used? Not CONFIG_BOOT_UPGRADE_ONLY...We are stuck on an error where the network core update won't go through without CONFIG_BOOT_UPGRADE_ONLY. It just gets stuck in a do/while loop in pcd.c (as mentioned in other tickets).

Also, how does USE_NRF53_MULTI_IMAGE_WITHOUT_UPGRADE_ONLY work? I don't see it used anywhere in the SDK (v.2.6.1). And how to enable it? I tried defining in Kconfig and enabling but it gave error of "no prompt". Then I tried defaulting it to `y` in the nrf/modules/mcuboot/Kconfig but no luck either and can't find examples for that as well. 

We are nearing production and need to establish revertible non-simultaneous updates for network core.

Appreciate the help.

Thanks

  • Hi, 

    We recommend CONFIG_BOOT_UPGRADE_ONLY when using an external flash chip. Please see my colleague's explanation in this post

    how does USE_NRF53_MULTI_IMAGE_WITHOUT_UPGRADE_ONLY work? I don't see it used anywhere in the SDK (v.2.6.1). And how to enable it?

    See this note from Working with the nRF5340:

    The application core can be reverted, but doing so bricks the network core upon revertion, as the reversion process fills the network core with the content currently in the RAM that pcd uses. To enable this, define the USE_NRF53_MULTI_IMAGE_WITHOUT_UPGRADE_ONLY Kconfig option in the project-level Kconfig file. When this is option is defined, you can enable it by setting :kconfig:option`CONFIG_USE_NRF53_MULTI_IMAGE_WITHOUT_UPGRADE_ONLY`.

    We are nearing production and need to establish revertible non-simultaneous updates for network core.

    Check out my colleague's unofficial example mcuboot_smp_ble or mcuboot_smp_uart.

    Regards,
    Amanda H.

  • Hi Amanda, 

    Appreciate the response

    We tried defining CONFIG_USE_NRF53_MULTI_IMAGE_WITHOUT_UPGRADE_ONLY in the Kconfig and then enabling it but had no luck having it appear in our .config.

    But what you are saying is we should not use CONFIG_USE_NRF53_MULTI_IMAGE_WITHOUT_UPGRADE_ONLY since we should only use CONFIG_BOOT_UPGRADE_ONLY.

  • responsible_duck said:
    We tried defining CONFIG_USE_NRF53_MULTI_IMAGE_WITHOUT_UPGRADE_ONLY in the Kconfig and then enabling it but had no luck having it appear in our .config.

    It doesn't need to define CONFIG_USE_NRF53_MULTI_IMAGE_WITHOUT_UPGRADE_ONLY in the Kconfig for NCS v2.6.1. If you get the config is undefined, try to update SDK via ToolChain Manager. 

    Did you see any build warnings regarding CONFIG_USE_NRF53_MULTI_IMAGE_WITHOUT_UPGRADE_ONLY got n?

    Just add CONFIG_USE_NRF53_MULTI_IMAGE_WITHOUT_UPGRADE_ONLY=y to prj.conf. That should be enough. 

    responsible_duck said:
    But what you are saying is we should not use CONFIG_USE_NRF53_MULTI_IMAGE_WITHOUT_UPGRADE_ONLY since we should only use CONFIG_BOOT_UPGRADE_ONLY.

    I mean you should use CONFIG_BOOT_UPGRADE_ONLY instead of CONFIG_BOOT_SWAP_USING_SCRATCH.

  • But CONFIG_USE_NRF53_MULTI_IMAGE_WITHOUT_UPGRADE_ONLY is only for when not using CONFIG_BOOT_UPGRADE_ONLY?

  • Yes we use 2.6.1 :) 

    This is the error:

    error: USE_NRF53_MULTI_IMAGE_WITHOUT_UPGRADE_ONLY (defined at
    /opt/nordic/ncs/v2.6.1/nrf/modules/mcuboot/Kconfig:93) is assigned in a configuration file, but is
    not directly user-configurable (has no prompt). It gets its value indirectly from other symbols. See
    docs.zephyrproject.org/.../kconfig.html
    and/or look up USE_NRF53_MULTI_IMAGE_WITHOUT_UPGRADE_ONLY in the menuconfig/guiconfig interface.

Related