Commit c49d7c93 authored by Andrzej Puzdrowski's avatar Andrzej Puzdrowski
Browse files

zephyr: allow to not defined scratch area in upgrade-only mode



Scratch area is unneeded if CONFIG_BOOT_SWAP_USING_SCRATCH=n.
This was not reflected so fare which causes build faliure.

Signed-off-by: default avatarAndrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
parent 414f9155
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -59,9 +59,9 @@ int flash_area_id_from_multi_image_slot(int image_index, int slot)
    case 0: return FLASH_AREA_IMAGE_PRIMARY(image_index);
#if !defined(CONFIG_SINGLE_APPLICATION_SLOT)
    case 1: return FLASH_AREA_IMAGE_SECONDARY(image_index);
#if !defined(CONFIG_BOOT_SWAP_USING_MOVE)
    case 2: return FLASH_AREA_IMAGE_SCRATCH;
#endif
#if defined(CONFIG_BOOT_SWAP_USING_SCRATCH)
    case 2: return FLASH_AREA_IMAGE_SCRATCH;
#endif
    }

+1 −1
Original line number Diff line number Diff line
@@ -38,7 +38,7 @@
    !defined(FLASH_ALIGN) ||                  \
    !(FLASH_AREA_LABEL_EXISTS(image_0)) || \
    !(FLASH_AREA_LABEL_EXISTS(image_1) || CONFIG_SINGLE_APPLICATION_SLOT) || \
    (!defined(CONFIG_BOOT_SWAP_USING_MOVE) && !FLASH_AREA_LABEL_EXISTS(image_scratch) && !defined(CONFIG_SINGLE_APPLICATION_SLOT))
    (defined(CONFIG_BOOT_SWAP_USING_SCRATCH) && !FLASH_AREA_LABEL_EXISTS(image_scratch))
#error "Target support is incomplete; cannot build mcuboot."
#endif