Commit d8803de
committed
[nrf noup] pm_sysflash: Fix slot mismatch between app and mcuboot
When CONFIG_MCUBOOT_MCUBOOT_IMAGE_NUMBER != -1 there is a
size mismatch of all_slots between mcuboot and application images.
When enabling mcuboot for example with s0 and s1 secure images,
the mcuboot reported size is 6 while the application reported size is 4.
When the application references FLASH_AREA_IMAGE_SECONDARY() it
receives the s0 bootloader slot id instead.
Methods that rely on FLASH_AREA_IMAGE_SECONDARY() to point to
the application secondary slot do not work as expected.
Since MCUBOOT_IMAGE_NUMBER is finite and currently limited to 4
slots, The ALL_AVAILABLE_SLOTS macro definition should check
each combination of CONFIG_MCUBOOT_MCUBOOT_IMAGE_NUMBER
explicitly to verify the combination is correct.
Signed-off-by: Anthony Williams <[email protected]>1 parent 4b5901f commit d8803de
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
0 commit comments