Skip to content

Commit

Permalink
[nrf noup] sysflash: pm_sysflash: Fix incorrect define exclude for NSIB
Browse files Browse the repository at this point in the history
A mismatch in defines was made for `_image_1_primary_slot_id` resulting
in some configurations not working. This fixes that the linker variable
is exposed for mcuboot so that it knows which slot is running an which
slot a bootloader upgrade is to be put into.

Ref. NCSDK-19223

Signed-off-by: Sigvart Hovland <sigvart.hovland@nordicsemi.no>
  • Loading branch information
sigvartmh authored and cvinayak committed Oct 18, 2023
1 parent c28768e commit 1f38eb8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions boot/zephyr/include/sysflash/pm_sysflash.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@

#ifndef CONFIG_SINGLE_APPLICATION_SLOT

#if (MCUBOOT_IMAGE_NUMBER == 2) && defined(PM_B0_ADDRESS) && \
!defined(CONFIG_NRF53_MULTI_IMAGE_UPDATE)

#if (MCUBOOT_IMAGE_NUMBER == 2) && defined(PM_B0_ADDRESS)
/* If B0 is present then two bootloaders are present, and we must use
* a single secondary slot for both primary slots.
*/
extern uint32_t _image_1_primary_slot_id[];
#endif /* (MCUBOOT_IMAGE_NUMBER == 2 && defined(PM_B0_ADDRESS) */

#if (MCUBOOT_IMAGE_NUMBER == 2) && defined(PM_B0_ADDRESS) && \
!defined(CONFIG_NRF53_MULTI_IMAGE_UPDATE)

#define FLASH_AREA_IMAGE_PRIMARY(x) \
((x == 0) ? \
Expand Down

0 comments on commit 1f38eb8

Please sign in to comment.