From aaa187e871812545489fc7afd60af7ec0f967c4f Mon Sep 17 00:00:00 2001 From: Kaspar Schleiser Date: Tue, 18 Jun 2019 11:04:03 +0200 Subject: [PATCH] riotboot: always link both slot .elf when linking This enables "make test" and "make test-murdock" to rely on both images being present and thus execute without re-compiling. --- makefiles/boot/riotboot.mk | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/makefiles/boot/riotboot.mk b/makefiles/boot/riotboot.mk index 49663c5948..89fdd26f7a 100644 --- a/makefiles/boot/riotboot.mk +++ b/makefiles/boot/riotboot.mk @@ -43,9 +43,15 @@ $(BINDIR_APP)-slot0.elf: FW_ROM_LEN=$$((SLOT0_LEN - $(RIOTBOOT_HDR_LEN))) $(BINDIR_APP)-slot0.elf: ROM_OFFSET=$(SLOT0_IMAGE_OFFSET) $(BINDIR_APP)-slot1.elf: FW_ROM_LEN=$$((SLOT1_LEN - $(RIOTBOOT_HDR_LEN))) $(BINDIR_APP)-slot1.elf: ROM_OFFSET=$(SLOT1_IMAGE_OFFSET) - SLOT_RIOT_ELFS = $(BINDIR_APP)-slot0.elf $(BINDIR_APP)-slot1.elf +# ensure both slot elf files are always linked +# this ensures that both "make test" and "make test-murdock" can rely on them +# being present without having to trigger re-compilation. +ifneq (1, $(RIOTNOLINK)) +link: $(SLOT_RIOT_ELFS) +endif + # Create binary target with RIOT header $(SLOT_RIOT_BINS): %.riot.bin: %.hdr %.bin @echo "creating $@..."