Skip to content
This repository was archived by the owner on Oct 27, 2025. It is now read-only.

Commit c49d7c9

Browse files
committed
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: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
1 parent 414f915 commit c49d7c9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

boot/zephyr/flash_map_extended.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ int flash_area_id_from_multi_image_slot(int image_index, int slot)
5959
case 0: return FLASH_AREA_IMAGE_PRIMARY(image_index);
6060
#if !defined(CONFIG_SINGLE_APPLICATION_SLOT)
6161
case 1: return FLASH_AREA_IMAGE_SECONDARY(image_index);
62-
#if !defined(CONFIG_BOOT_SWAP_USING_MOVE)
63-
case 2: return FLASH_AREA_IMAGE_SCRATCH;
6462
#endif
63+
#if defined(CONFIG_BOOT_SWAP_USING_SCRATCH)
64+
case 2: return FLASH_AREA_IMAGE_SCRATCH;
6565
#endif
6666
}
6767

boot/zephyr/include/target.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
!defined(FLASH_ALIGN) || \
3939
!(FLASH_AREA_LABEL_EXISTS(image_0)) || \
4040
!(FLASH_AREA_LABEL_EXISTS(image_1) || CONFIG_SINGLE_APPLICATION_SLOT) || \
41-
(!defined(CONFIG_BOOT_SWAP_USING_MOVE) && !FLASH_AREA_LABEL_EXISTS(image_scratch) && !defined(CONFIG_SINGLE_APPLICATION_SLOT))
41+
(defined(CONFIG_BOOT_SWAP_USING_SCRATCH) && !FLASH_AREA_LABEL_EXISTS(image_scratch))
4242
#error "Target support is incomplete; cannot build mcuboot."
4343
#endif
4444

0 commit comments

Comments
 (0)