Skip to content

Commit b705ca7

Browse files
committed
Warn when DISABLE_BACKUP is enabled
F/2257
1 parent fc9e7a3 commit b705ca7

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

docs/compile.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,9 @@ To circumvent the compile-time checks on the maximum allowed stack size, use `WO
193193

194194
Optionally, it is possible to disable the backup copy of the current running firmware upon the installation of the
195195
update. This implies that no fall-back mechanism is protecting the target from a faulty firmware installation, but may be useful
196-
in some cases where it is not possible to write on the update partition from the bootloader.
196+
in some cases where it is not possible to write on the update partition from the bootloader. This also removes the
197+
power-fail-safe swap behavior: if power is lost while the update is being copied into the BOOT partition, the original
198+
firmware may already be partially overwritten and the device can be left unrecoverable.
197199
The associated compile-time option is
198200

199201
`DISABLE_BACKUP=1`

options.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -724,6 +724,7 @@ ifeq ($(NVM_FLASH_WRITEONCE),1)
724724
endif
725725

726726
ifeq ($(DISABLE_BACKUP),1)
727+
$(warning DISABLE_BACKUP=1 disables power-fail-safe updates; losing power during an update can leave BOOT partially written and unrecoverable)
727728
CFLAGS+= -D"DISABLE_BACKUP"
728729
endif
729730

0 commit comments

Comments
 (0)