Skip to content

Commit 6108352

Browse files
de-nordicjukkar
authored andcommitted
[nrf noup] loader: Use BOOT_SLOT_PRIMARY and BOOT_SLOT_SECONDARY
nrf-squash! [nrf noup] loader: Do not check reset vector for XIP image The commit replaces BOOT_PRIMARY_SLOT and BOOT_SECONDARY_SLOT with BOOT_SLOT_PRIMARY and BOOT_SLOT_SECONDARY respectively. Signed-off-by: Dominik Ermel <[email protected]>
1 parent 72179c9 commit 6108352

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

boot/bootutil/src/loader.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1167,12 +1167,12 @@ boot_validate_slot(struct boot_loader_state *state, int slot,
11671167
* 0. This part of image is not bootable, as the XIP setup is done by the app in
11681168
* image 0 slot, and it does not carry the reset vector.
11691169
*/
1170-
if (fap == state->imgs[2][BOOT_SECONDARY_SLOT].area) {
1170+
if (fap == state->imgs[2][BOOT_SLOT_SECONDARY].area) {
11711171
goto out;
11721172
}
11731173
#endif
1174-
if (fap == BOOT_IMG_AREA(state, BOOT_SECONDARY_SLOT)) {
1175-
const struct flash_area *pri_fa = BOOT_IMG_AREA(state, BOOT_PRIMARY_SLOT);
1174+
if (fap == BOOT_IMG_AREA(state, BOOT_SLOT_SECONDARY)) {
1175+
const struct flash_area *pri_fa = BOOT_IMG_AREA(state, BOOT_SLOT_PRIMARY);
11761176
struct image_header *secondary_hdr = boot_img_hdr(state, slot);
11771177
uint32_t reset_value = 0;
11781178
uint32_t reset_addr = secondary_hdr->ih_hdr_size + sizeof(reset_value);

0 commit comments

Comments
 (0)