Skip to content

Commit d131ce2

Browse files
committed
Debug: add debug print to show swap progess:
I-Swap sector 3 @ 0x00060000 -> I-Swap sector 1 of 4
1 parent 3d38fb0 commit d131ce2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

boot/bootutil/src/swap_scratch.c

+6
Original file line numberDiff line numberDiff line change
@@ -717,7 +717,13 @@ swap_run(struct boot_loader_state *state, struct boot_status *bs,
717717
}
718718

719719
swap_idx = 0;
720+
#if MCUBOOT_APPLICATION_HOOKS
721+
int last_sector_idx_cp = last_sector_idx;
722+
#endif
720723
while (last_sector_idx >= 0) {
724+
#if MCUBOOT_APPLICATION_HOOKS
725+
BOOT_LOG_INF("Swap sector %d of %d", swap_idx + 1, last_sector_idx_cp + 1 );
726+
#endif
721727
sz = boot_copy_sz(state, last_sector_idx, &first_sector_idx);
722728
if (swap_idx >= (bs->idx - BOOT_STATUS_IDX_0)) {
723729
boot_swap_sectors(first_sector_idx, sz, state, bs);

0 commit comments

Comments
 (0)