|
15 | 15 | * running in single image mode. |
16 | 16 | */ |
17 | 17 | #define FLASH_AREA_IMAGE_PRIMARY(x) (((x) == 0) ? \ |
18 | | - FLASH_AREA_ID(image_0) : \ |
19 | | - FLASH_AREA_ID(image_0)) |
| 18 | + FIXED_PARTITION_ID(slot0_partition) : \ |
| 19 | + FIXED_PARTITION_ID(slot0_partition)) |
20 | 20 | #define FLASH_AREA_IMAGE_SECONDARY(x) (((x) == 0) ? \ |
21 | | - FLASH_AREA_ID(image_1) : \ |
22 | | - FLASH_AREA_ID(image_1)) |
| 21 | + FIXED_PARTITION_ID(slot1_partition) : \ |
| 22 | + FIXED_PARTITION_ID(slot1_partition)) |
23 | 23 | #elif (MCUBOOT_IMAGE_NUMBER == 2) |
24 | 24 | /* MCUBoot currently supports only up to 2 updateable firmware images. |
25 | 25 | * If the number of the current image is greater than MCUBOOT_IMAGE_NUMBER - 1 |
26 | 26 | * then a dummy value will be assigned to the flash area macros. |
27 | 27 | */ |
28 | 28 | #define FLASH_AREA_IMAGE_PRIMARY(x) (((x) == 0) ? \ |
29 | | - FLASH_AREA_ID(image_0) : \ |
| 29 | + FIXED_PARTITION_ID(slot0_partition) : \ |
30 | 30 | ((x) == 1) ? \ |
31 | | - FLASH_AREA_ID(image_2) : \ |
| 31 | + FIXED_PARTITION_ID(slot2_partition) : \ |
32 | 32 | 255) |
33 | 33 | #define FLASH_AREA_IMAGE_SECONDARY(x) (((x) == 0) ? \ |
34 | | - FLASH_AREA_ID(image_1) : \ |
| 34 | + FIXED_PARTITION_ID(slot1_partition) : \ |
35 | 35 | ((x) == 1) ? \ |
36 | | - FLASH_AREA_ID(image_3) : \ |
| 36 | + FIXED_PARTITION_ID(slot3_partition) : \ |
37 | 37 | 255) |
38 | 38 | #else |
39 | 39 | #error "Image slot and flash area mapping is not defined" |
40 | 40 | #endif |
41 | 41 |
|
42 | 42 | #if !defined(CONFIG_BOOT_SWAP_USING_MOVE) |
43 | | -#define FLASH_AREA_IMAGE_SCRATCH FLASH_AREA_ID(image_scratch) |
| 43 | +#define FLASH_AREA_IMAGE_SCRATCH FIXED_PARTITION_ID(scratch_partition) |
44 | 44 | #endif |
45 | 45 |
|
46 | 46 | #else /* CONFIG_SINGLE_APPLICATION_SLOT */ |
47 | 47 |
|
48 | | -#define FLASH_AREA_IMAGE_PRIMARY(x) FLASH_AREA_ID(image_0) |
49 | | -#define FLASH_AREA_IMAGE_SECONDARY(x) FLASH_AREA_ID(image_0) |
| 48 | +#define FLASH_AREA_IMAGE_PRIMARY(x) FIXED_PARTITION_ID(slot0_partition) |
| 49 | +#define FLASH_AREA_IMAGE_SECONDARY(x) FIXED_PARTITION_ID(slot0_partition) |
50 | 50 | /* NOTE: Scratch parition is not used by single image DFU but some of |
51 | 51 | * functions in common files reference it, so the definitions has been |
52 | 52 | * provided to allow compilation of common units. |
|
0 commit comments