2626#define FLASH_AREA_IMAGE_0_SLOTS slot0_partition, slot1_partition
2727#define FLASH_AREA_IMAGE_1_SLOTS slot2_partition, slot3_partition
2828#define FLASH_AREA_IMAGE_2_SLOTS slot4_partition, slot5_partition
29+ #define FLASH_AREA_IMAGE_3_SLOTS slot6_partition, slot7_partition
30+ #define FLASH_AREA_IMAGE_4_SLOTS slot8_partition, slot9_partition
31+ #define FLASH_AREA_IMAGE_5_SLOTS slot10_partition, slot11_partition
32+ #define FLASH_AREA_IMAGE_6_SLOTS slot12_partition, slot13_partition
33+ #define FLASH_AREA_IMAGE_7_SLOTS slot14_partition, slot15_partition
2934
3035#if (MCUBOOT_IMAGE_NUMBER == 1 )
3136#define ALL_AVAILABLE_SLOTS FLASH_AREA_IMAGE_0_SLOTS
3641#define ALL_AVAILABLE_SLOTS FLASH_AREA_IMAGE_0_SLOTS, \
3742 FLASH_AREA_IMAGE_1_SLOTS, \
3843 FLASH_AREA_IMAGE_2_SLOTS
44+ #elif (MCUBOOT_IMAGE_NUMBER == 4 )
45+ #define ALL_AVAILABLE_SLOTS FLASH_AREA_IMAGE_0_SLOTS, \
46+ FLASH_AREA_IMAGE_1_SLOTS, \
47+ FLASH_AREA_IMAGE_2_SLOTS, \
48+ FLASH_AREA_IMAGE_3_SLOTS
49+ #elif (MCUBOOT_IMAGE_NUMBER == 5 )
50+ #define ALL_AVAILABLE_SLOTS FLASH_AREA_IMAGE_0_SLOTS, \
51+ FLASH_AREA_IMAGE_1_SLOTS, \
52+ FLASH_AREA_IMAGE_2_SLOTS, \
53+ FLASH_AREA_IMAGE_3_SLOTS, \
54+ FLASH_AREA_IMAGE_4_SLOTS
55+ #elif (MCUBOOT_IMAGE_NUMBER == 6 )
56+ #define ALL_AVAILABLE_SLOTS FLASH_AREA_IMAGE_0_SLOTS, \
57+ FLASH_AREA_IMAGE_1_SLOTS, \
58+ FLASH_AREA_IMAGE_2_SLOTS, \
59+ FLASH_AREA_IMAGE_3_SLOTS, \
60+ FLASH_AREA_IMAGE_4_SLOTS, \
61+ FLASH_AREA_IMAGE_5_SLOTS
62+ #elif (MCUBOOT_IMAGE_NUMBER == 7 )
63+ #define ALL_AVAILABLE_SLOTS FLASH_AREA_IMAGE_0_SLOTS, \
64+ FLASH_AREA_IMAGE_1_SLOTS, \
65+ FLASH_AREA_IMAGE_2_SLOTS, \
66+ FLASH_AREA_IMAGE_3_SLOTS, \
67+ FLASH_AREA_IMAGE_4_SLOTS, \
68+ FLASH_AREA_IMAGE_5_SLOTS, \
69+ FLASH_AREA_IMAGE_6_SLOTS
70+ #elif (MCUBOOT_IMAGE_NUMBER == 8 )
71+ #define ALL_AVAILABLE_SLOTS FLASH_AREA_IMAGE_0_SLOTS, \
72+ FLASH_AREA_IMAGE_1_SLOTS, \
73+ FLASH_AREA_IMAGE_2_SLOTS, \
74+ FLASH_AREA_IMAGE_3_SLOTS, \
75+ FLASH_AREA_IMAGE_4_SLOTS, \
76+ FLASH_AREA_IMAGE_5_SLOTS, \
77+ FLASH_AREA_IMAGE_6_SLOTS, \
78+ FLASH_AREA_IMAGE_7_SLOTS
3979#endif
4080
4181static inline uint32_t __flash_area_ids_for_slot (int img , int slot )
@@ -49,6 +89,11 @@ static inline uint32_t __flash_area_ids_for_slot(int img, int slot)
4989#undef FLASH_AREA_IMAGE_0_SLOTS
5090#undef FLASH_AREA_IMAGE_1_SLOTS
5191#undef FLASH_AREA_IMAGE_2_SLOTS
92+ #undef FLASH_AREA_IMAGE_3_SLOTS
93+ #undef FLASH_AREA_IMAGE_4_SLOTS
94+ #undef FLASH_AREA_IMAGE_5_SLOTS
95+ #undef FLASH_AREA_IMAGE_6_SLOTS
96+ #undef FLASH_AREA_IMAGE_7_SLOTS
5297#undef ALL_AVAILABLE_SLOTS
5398
5499#define FLASH_AREA_IMAGE_PRIMARY (x ) __flash_area_ids_for_slot(x, 0)
0 commit comments