|
13 | 13 | * running in single image mode.
|
14 | 14 | */
|
15 | 15 | #define FLASH_AREA_IMAGE_PRIMARY(x) (((x) == 0) ? \
|
16 |
| - DT_FLASH_AREA_IMAGE_0_ID : \ |
17 |
| - DT_FLASH_AREA_IMAGE_0_ID) |
| 16 | + FLASH_AREA_ID(image_0) : \ |
| 17 | + FLASH_AREA_ID(image_0)) |
18 | 18 | #define FLASH_AREA_IMAGE_SECONDARY(x) (((x) == 0) ? \
|
19 |
| - DT_FLASH_AREA_IMAGE_1_ID : \ |
20 |
| - DT_FLASH_AREA_IMAGE_1_ID) |
| 19 | + FLASH_AREA_ID(image_1) : \ |
| 20 | + FLASH_AREA_ID(image_1)) |
21 | 21 | #elif (MCUBOOT_IMAGE_NUMBER == 2)
|
22 | 22 | /* MCUBoot currently supports only up to 2 updateable firmware images.
|
23 | 23 | * If the number of the current image is greater than MCUBOOT_IMAGE_NUMBER - 1
|
24 | 24 | * then a dummy value will be assigned to the flash area macros.
|
25 | 25 | */
|
26 | 26 | #define FLASH_AREA_IMAGE_PRIMARY(x) (((x) == 0) ? \
|
27 |
| - DT_FLASH_AREA_IMAGE_0_ID : \ |
| 27 | + FLASH_AREA_ID(image_0) : \ |
28 | 28 | ((x) == 1) ? \
|
29 |
| - DT_FLASH_AREA_IMAGE_2_ID : \ |
| 29 | + FLASH_AREA_ID(image_2) : \ |
30 | 30 | 255)
|
31 | 31 | #define FLASH_AREA_IMAGE_SECONDARY(x) (((x) == 0) ? \
|
32 |
| - DT_FLASH_AREA_IMAGE_1_ID : \ |
| 32 | + FLASH_AREA_ID(image_1) : \ |
33 | 33 | ((x) == 1) ? \
|
34 |
| - DT_FLASH_AREA_IMAGE_3_ID : \ |
| 34 | + FLASH_AREA_ID(image_3) : \ |
35 | 35 | 255)
|
36 | 36 | #else
|
37 | 37 | #error "Image slot and flash area mapping is not defined"
|
38 | 38 | #endif
|
39 | 39 |
|
40 | 40 | #if !defined(CONFIG_BOOT_SWAP_USING_MOVE)
|
41 |
| -#define FLASH_AREA_IMAGE_SCRATCH DT_FLASH_AREA_IMAGE_SCRATCH_ID |
| 41 | +#define FLASH_AREA_IMAGE_SCRATCH FLASH_AREA_ID(image_scratch) |
42 | 42 | #endif
|
43 | 43 |
|
44 | 44 | #endif /* __SYSFLASH_H__ */
|
0 commit comments