Skip to content

Commit

Permalink
riotboot: set FLASHFILE to RIOTBOOT_EXTENDED_BIN
Browse files Browse the repository at this point in the history
... if the riotboot feature is used.

Previously, even an application that had "FEATURES_REQUIRED += riotboot"
set would still flash the non-riotboot binary on "make flash".
This is usualy not what the user wants.

This commit set's the FLASHFILE variable to the combined "riotboot
bootloader + slot0 + empty slot1" binary. This has the effect that make
all, flash and flash-only will compile and/or flash a working riotboot
setup.

tests/riotboot and tests/riotboot_flashwrite now default to flashing the
riotboot-extended binary. tests/riotboot was previously configured to
use the riotboot-combined binary. This has been changed in order to not
behave differently than how usual riotboot applications do.
  • Loading branch information
kaspar030 committed Jul 8, 2019
1 parent f92297b commit bb71e97
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 5 additions & 0 deletions makefiles/boot/riotboot.mk
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,11 @@ riotboot/slot1: $(SLOT1_RIOT_BIN)
# Default flashing rule for bootloader + slot 0
riotboot/flash: riotboot/flash-slot0 riotboot/flash-bootloader

# make applications that use the riotboot feature default to actually using it
# Target 'all' will generate the combined file directly.
# It also makes 'flash' and 'flash-only' work without specific command.
FLASHFILE = $(RIOTBOOT_EXTENDED_BIN)

else
riotboot:
$(Q)echo "error: riotboot feature not selected! (try FEATURES_REQUIRED += riotboot)"
Expand Down
4 changes: 0 additions & 4 deletions tests/riotboot/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,5 @@ DEVELHELP ?= 1
# Change this to 0 show compiler invocation lines by default:
QUIET ?= 1

# Target 'all' will generate the combined file directly.
# It also makes 'flash' and 'flash-only' work without specific command.
FLASHFILE = $(RIOTBOOT_COMBINED_BIN)

include ../Makefile.tests_common
include $(RIOTBASE)/Makefile.include

0 comments on commit bb71e97

Please sign in to comment.