Skip to content

Commit

Permalink
fix emergency fallback bug by zeroing sector flags
Browse files Browse the repository at this point in the history
with update trigger
  • Loading branch information
jpbland1 committed Jun 28, 2024
1 parent fe96244 commit 13254d5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/update_flash.c
Original file line number Diff line number Diff line change
Expand Up @@ -736,6 +736,8 @@ void RAMFUNCTION wolfBoot_start(void)
wolfBoot_printf("Boot failed: Hdr %d, Hash %d, Sig %d\n",
boot.hdr_ok, boot.sha_ok, boot.signature_ok);
wolfBoot_printf("Trying emergency update\n");
/* clear out the update sector flags */
wolfBoot_update_trigger();
if (likely(wolfBoot_update(1) < 0)) {
/* panic: no boot option available. */
wolfBoot_printf("Boot failed! No boot option available!\n");
Expand Down

0 comments on commit 13254d5

Please sign in to comment.