Skip to content

Commit a88e229

Browse files
committed
zephyr: sysflash: Fix if condition for zephyr applications
Fixes an issue when sysflash is included by zephyr (non-mcuboot) applications Signed-off-by: Jamie McCrae <[email protected]>
1 parent 2a74a2b commit a88e229

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

boot/zephyr/include/sysflash/sysflash.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#include <zephyr/storage/flash_map.h>
1313
#include <zephyr/sys/util_macro.h>
1414

15-
#ifndef CONFIG_SINGLE_APPLICATION_SLOT
15+
#if !defined(CONFIG_SINGLE_APPLICATION_SLOT) && !defined(CONFIG_MCUBOOT_BOOTLOADER_MODE_SINGLE_APP)
1616

1717
/* Each pair of slots is separated by , and there is no terminating character */
1818
#define FLASH_AREA_IMAGE_0_SLOTS slot0_partition, slot1_partition
@@ -50,7 +50,7 @@ static inline uint32_t __flash_area_ids_for_slot(int img, int slot)
5050
#define FLASH_AREA_IMAGE_SCRATCH FIXED_PARTITION_ID(scratch_partition)
5151
#endif
5252

53-
#else /* CONFIG_SINGLE_APPLICATION_SLOT */
53+
#else /* !CONFIG_SINGLE_APPLICATION_SLOT && !CONFIG_MCUBOOT_BOOTLOADER_MODE_SINGLE_APP */
5454

5555
#define FLASH_AREA_IMAGE_PRIMARY(x) FIXED_PARTITION_ID(slot0_partition)
5656
#define FLASH_AREA_IMAGE_SECONDARY(x) FIXED_PARTITION_ID(slot0_partition)

0 commit comments

Comments
 (0)