From bb71e979f3a425f18b36334d794d47634ddd9f9a Mon Sep 17 00:00:00 2001 From: Kaspar Schleiser Date: Thu, 13 Jun 2019 12:14:59 +0200 Subject: [PATCH] riotboot: set FLASHFILE to RIOTBOOT_EXTENDED_BIN ... 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. --- makefiles/boot/riotboot.mk | 5 +++++ tests/riotboot/Makefile | 4 ---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/makefiles/boot/riotboot.mk b/makefiles/boot/riotboot.mk index d476cb7e33..6b43c064f9 100644 --- a/makefiles/boot/riotboot.mk +++ b/makefiles/boot/riotboot.mk @@ -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)" diff --git a/tests/riotboot/Makefile b/tests/riotboot/Makefile index 6f580a8dae..9ad94ca5b2 100644 --- a/tests/riotboot/Makefile +++ b/tests/riotboot/Makefile @@ -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