Skip to content

Commit 9571f88

Browse files
de-nordicnordicjm
authored andcommitted
[nrf noup] nsib: Use scramble instead of erase in nsib_swap_run
nrf-squash! [nrf noup] treewide: Add support for sysbuild assigned images Fix nsib_swap_run using erase where it should be using scramble, as the intention was to remove image, not to prepare Flash device for write. Signed-off-by: Dominik Ermel <[email protected]>
1 parent 33a4201 commit 9571f88

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

boot/bootutil/src/swap_nsib.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ void nsib_swap_run(struct boot_loader_state *state, struct boot_status *bs)
6262
rc = swap_scramble_trailer_sectors(state, fap_sec);
6363
assert(rc == 0);
6464

65-
rc = boot_erase_region(fap_sec, 0, MIN((fap_pri->fa_size + sector_sz), fap_sec->fa_size), false);
65+
rc = boot_scramble_region(fap_sec, 0, MIN((fap_pri->fa_size + sector_sz), fap_sec->fa_size), false);
6666
assert(rc == 0);
6767

6868
flash_area_close(fap_pri);

0 commit comments

Comments
 (0)