Skip to content

Commit 8a41782

Browse files
committed
[nrf noup] zephyr: Fix compilation error with address verification
Fix compilation error with missing definitions of SECOND_STAGE_MCUBOOT_INACTIVE_OFFSET/SIZE when MCUBOOT_VERIFY_IMG_ADDRESS is enabled. Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
1 parent 0626610 commit 8a41782

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

boot/bootutil/src/loader.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -825,11 +825,14 @@ boot_validate_slot(struct boot_loader_state *state, int slot,
825825
check_addresses = true;
826826
} else
827827
#endif
828+
#ifdef MCUBOOT_IS_SECOND_STAGE
828829
if (IMAGE_IS_SECOND_STAGE_MCUBOOT(state)) {
829830
min_addr = SECOND_STAGE_INACTIVE_MCUBOOT_OFFSET;
830831
max_addr = (SECOND_STAGE_INACTIVE_MCUBOOT_OFFSET + SECOND_STAGE_INACTIVE_MCUBOOT_SIZE);
831832
check_addresses = true;
832-
} else if (BOOT_CURR_IMG(state) == CONFIG_MCUBOOT_APPLICATION_IMAGE_NUMBER) {
833+
} else
834+
#endif
835+
if (BOOT_CURR_IMG(state) == CONFIG_MCUBOOT_APPLICATION_IMAGE_NUMBER) {
833836
min_addr = flash_area_get_off(BOOT_IMG_AREA(state, BOOT_SLOT_PRIMARY));
834837
max_addr = flash_area_get_size(BOOT_IMG_AREA(state, BOOT_SLOT_PRIMARY)) + min_addr;
835838

0 commit comments

Comments
 (0)