CONFIG_BOOT_SWAP_USING_MOVE mcuboot operation

Hi,

Much like the poster below, I have ran into some issues during FOTA when my flash usage gets VERY CLOSE TO 100% (Much less than a page left), disabling some features in my FW (getting close to 80% flash usage) I can do FOTA just fine, so It seems like the problem is w/ my flash usage.

https://devzone.nordicsemi.com/f/nordic-q-a/78984/big-primary-image-prevents-fota

In the above thread, it was mentioned that the last page needs to be persevered for FOTA, does this mean the final page in the FLASH or final page per image?

furthermore, can the difference between

CONFIG_BOOT_SWAP_USING_MOVE and CONFIG_BOOT_SWAP_USING_SCRATCH be explained?

I will be running some continues integration for FOTA, from the documentation that I read, CONFIG_BOOT_SWAP_USING_SCRATCH hammers the swap block with write/erase cycles - but I can't find any details on CONFIG_BOOT_SWAP_USING_MOVE. Is there some numbers for how many times FOTA can be ran before the blocks wear out using CONFIG_BOOT_SWAP_USING_MOVE?

Parents
  • Hi,

    does this mean the final page in the FLASH or final page per image?

    It's the last page in the Flash.

    can the difference between

    CONFIG_BOOT_SWAP_USING_MOVE and CONFIG_BOOT_SWAP_USING_SCRATCH be explained?

    The K-config option has good explanations for that. 

    config BOOT_SWAP_USING_MOVE
    bool "Swap mode that can run without a scratch partition" help If y, the swap upgrade is done in two steps, where first every sector of the primary slot is moved up one sector, then for each sector X in the secondary slot, it is moved to index X in the primary slot, then the sector at X+1 in the primary is moved to index X in the secondary. This allows a swap upgrade without using a scratch partition, but is currently limited to all sectors in both slots being of the same size.

    config BOOT_SWAP_USING_SCRATCH
    bool "Swap mode that run with the scratch partition"
    help
    This is the most conservative swap mode but it can work even on
    devices with heterogeneous flash page layout.

    config BOOT_UPGRADE_ONLY
    bool "Overwrite image updates instead of swapping"
    help
    If y, overwrite the primary slot with the upgrade image instead
    of swapping them. This prevents the fallback recovery, but
    uses a much simpler code path.

    See https://github.com/nrfconnect/sdk-mcuboot/blob/7606d9cad32c95a0d6fb7e872b070c71e85f931d/boot/zephyr/Kconfig#L251

Reply
  • Hi,

    does this mean the final page in the FLASH or final page per image?

    It's the last page in the Flash.

    can the difference between

    CONFIG_BOOT_SWAP_USING_MOVE and CONFIG_BOOT_SWAP_USING_SCRATCH be explained?

    The K-config option has good explanations for that. 

    config BOOT_SWAP_USING_MOVE
    bool "Swap mode that can run without a scratch partition" help If y, the swap upgrade is done in two steps, where first every sector of the primary slot is moved up one sector, then for each sector X in the secondary slot, it is moved to index X in the primary slot, then the sector at X+1 in the primary is moved to index X in the secondary. This allows a swap upgrade without using a scratch partition, but is currently limited to all sectors in both slots being of the same size.

    config BOOT_SWAP_USING_SCRATCH
    bool "Swap mode that run with the scratch partition"
    help
    This is the most conservative swap mode but it can work even on
    devices with heterogeneous flash page layout.

    config BOOT_UPGRADE_ONLY
    bool "Overwrite image updates instead of swapping"
    help
    If y, overwrite the primary slot with the upgrade image instead
    of swapping them. This prevents the fallback recovery, but
    uses a much simpler code path.

    See https://github.com/nrfconnect/sdk-mcuboot/blob/7606d9cad32c95a0d6fb7e872b070c71e85f931d/boot/zephyr/Kconfig#L251

Children
No Data
Related