Skip to content

Commit f09e5f5

Browse files
committed
Fix erase for non-WRITEONCE usecase
1 parent fdce0bb commit f09e5f5

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/libwolfboot.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -752,7 +752,10 @@ void RAMFUNCTION wolfBoot_update_trigger(void)
752752
* FLAGS_INVERT needs erased flags because the bin-assemble's fill byte may
753753
* not match what's in wolfBoot */
754754
if (FLAGS_UPDATE_EXT()) {
755+
#ifndef NVM_FLASH_WRITEONCE
755756
ext_flash_erase(lastSector, SECTOR_FLAGS_SIZE);
757+
wolfBoot_set_partition_state(PART_UPDATE, st);
758+
#endif
756759
} else {
757760
#ifndef NVM_FLASH_WRITEONCE
758761
hal_flash_erase(lastSector, SECTOR_FLAGS_SIZE);

0 commit comments

Comments
 (0)