Skip to content

Commit 50303b8

Browse files
hakonfamSebastianBoe
authored andcommitted
[nrf noup] linker: add symbol for image 1 primary slot
This symbol is used to ensure that s0 mcuboot points to s1 as image 1 primary slot, and s1 mcuboot points to s0 as image 1 primary slot. Signed-off-by: Håkon Øye Amundsen <[email protected]> (cherry picked from commit 40b430b) (cherry picked from commit ff7db12) Signed-off-by: Robert Lubos <[email protected]>
1 parent 47df92b commit 50303b8

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

include/arch/arm/cortex_m/scripts/linker.ld

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,18 @@
3939
#if USE_PARTITION_MANAGER
4040
#include <pm_config.h>
4141
#ifdef PM_ADDRESS_LOAD_OFFSET
42+
/* We are linking mcuboot against S1, S0 is Image 1 primary */
43+
_image_1_primary_slot_id = PM_S0_ID;
44+
4245
#define ROM_ADDR PM_ADDRESS + PM_ADDRESS_LOAD_OFFSET
4346
#else
47+
#ifdef PM_S1_ID
48+
/* We are linking mcuboot against S0, S1 is Image 1 primary */
49+
_image_1_primary_slot_id = PM_S1_ID;
50+
#endif /* PM_S1_ID */
51+
4452
#define ROM_ADDR PM_ADDRESS
45-
#endif
53+
#endif /* PM_ADDRESS_LOAD_OFFSET */
4654
#define ROM_SIZE PM_SIZE
4755
#else
4856

0 commit comments

Comments
 (0)