1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

makefiles/boot/riotboot: set DEBUG_ELFFILE to slot0.elf

When doing a `make debug` on a board with riotboot bootloader, the original
(non-offset) elf file gets selected.

This causes all ROM addresses to be at the wrong offset, leading to strange
debug behavior.

Set `DEBUG_ELFFILE` to the .elf file that already accounts for the bootloader
offset so the debugger gets the correct addresses.
This commit is contained in:
Benjamin Valentin 2022-05-25 15:06:16 +02:00
parent 31b8518d20
commit 1925c99436

View File

@ -45,6 +45,7 @@ $(BINDIR_RIOTBOOT)/slot0.elf: ROM_OFFSET=$(SLOT0_IMAGE_OFFSET)
$(BINDIR_RIOTBOOT)/slot1.elf: FW_ROM_LEN=$$((SLOT1_LEN - $(RIOTBOOT_HDR_LEN)))
$(BINDIR_RIOTBOOT)/slot1.elf: ROM_OFFSET=$(SLOT1_IMAGE_OFFSET)
SLOT_RIOT_ELFS = $(BINDIR_RIOTBOOT)/slot0.elf $(BINDIR_RIOTBOOT)/slot1.elf
DEBUG_ELFFILE ?= $(BINDIR_RIOTBOOT)/slot0.elf
# ensure both slot elf files are always linked
# this ensures that both "make test" and "make test-murdock" can rely on them