Skip to content

Commit

Permalink
set emergency trigger to first sector of boot to work
Browse files Browse the repository at this point in the history
with flags home
  • Loading branch information
jpbland1 committed Jun 28, 2024
1 parent c0f0f94 commit b22b2a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hal/sim.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ void hal_prepare_boot(void)

int hal_flash_write(uintptr_t address, const uint8_t *data, int len)
{
if (forceEmergency == 1 && address < WOLFBOOT_PARTITION_UPDATE_ADDRESS) {
if (forceEmergency == 1 && address == WOLFBOOT_PARTITION_BOOT_ADDRESS) {
/* implicit cast abide compiler warning */
memset((void*)address, 0, len);
/* let the rest of the writes work properly for the emergency update */
Expand Down

0 comments on commit b22b2a2

Please sign in to comment.