Skip to content

Commit 9ca3dd0

Browse files
committed
[nrf noup] loader: Fix multi image netcore updates
The netcore image uses the flash1 address instead of the flash sim (pseudo) base. Signed-off-by: Tomasz Chyrowicz <tomasz.chyrowicz@nordicsemi.no>
1 parent f263a70 commit 9ca3dd0

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

boot/bootutil/src/loader.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1197,6 +1197,14 @@ boot_validated_swap_type(struct boot_loader_state *state,
11971197

11981198
get_image_perspective_flash_area_bounds(primary_fa, &pri_off, &pri_end);
11991199

1200+
#if !defined(INCLUDE_NETWORK_CORE_IMAGE_CHECK) && (CONFIG_MCUBOOT_NETWORK_CORE_IMAGE_NUMBER != -1) && defined(CONFIG_NRF53_MULTI_IMAGE_UPDATE)
1201+
if (BOOT_CURR_IMG(state) == CONFIG_MCUBOOT_NETWORK_CORE_IMAGE_NUMBER) {
1202+
/* Return PCD offset and size instead of the flash_sim area bounds */
1203+
pri_off = NETCPU_APP_SLOT_OFFSET;
1204+
pri_end = NETCPU_APP_SLOT_END;
1205+
}
1206+
#endif
1207+
12001208
/* Check start and end of primary slot for current image */
12011209
if (internal_img_addr >= SECOND_STAGE_INACTIVE_MCUBOOT_OFFSET &&
12021210
internal_img_addr < (SECOND_STAGE_INACTIVE_MCUBOOT_OFFSET +

0 commit comments

Comments
 (0)