From 0be610558d531b6a150e49f7151e8a2de98bbdf1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Harter?= Date: Wed, 19 Dec 2018 19:32:19 +0100 Subject: [PATCH 1/3] boards/openocd: use FLASHFILE for boards using openocd Update to use FLASHFILE as file to be flashed on the board. --- makefiles/tools/openocd.inc.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/makefiles/tools/openocd.inc.mk b/makefiles/tools/openocd.inc.mk index a307d93f46..74709c59e4 100644 --- a/makefiles/tools/openocd.inc.mk +++ b/makefiles/tools/openocd.inc.mk @@ -3,7 +3,8 @@ export DEBUGGER = $(RIOTTOOLS)/openocd/openocd.sh export DEBUGSERVER = $(RIOTTOOLS)/openocd/openocd.sh export RESET ?= $(RIOTTOOLS)/openocd/openocd.sh -export FFLAGS ?= flash $(ELFFILE) +FLASHFILE ?= $(ELFFILE) +export FFLAGS ?= flash $(FLASHFILE) export DEBUGGER_FLAGS ?= debug $(ELFFILE) export DEBUGSERVER_FLAGS ?= debug-server export RESET_FLAGS ?= reset From 5ce0c8f50d868ef58c99ffe7f58e9bee451e958b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Harter?= Date: Wed, 20 Mar 2019 16:44:40 +0100 Subject: [PATCH 2/3] boards/seeeduino_arch-pro: use FLASHFILE variable Update to use FLASHFILE as file to be flashed on the board. openocd.inc.mk now uses FLASHFILE variable so does not need to overwrite FFLAGS anymore. --- boards/seeeduino_arch-pro/Makefile.include | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/boards/seeeduino_arch-pro/Makefile.include b/boards/seeeduino_arch-pro/Makefile.include index aa957e7bcd..3ed4dbf9e0 100644 --- a/boards/seeeduino_arch-pro/Makefile.include +++ b/boards/seeeduino_arch-pro/Makefile.include @@ -10,8 +10,8 @@ include $(RIOTMAKE)/tools/serial.inc.mk DEBUG_ADAPTER ?= dap -# this board uses openocd -FFLAGS ?= flash $(HEXFILE) +# this board uses openocd with an HEXFILE +FLASHFILE ?= $(HEXFILE) include $(RIOTMAKE)/tools/openocd.inc.mk # generate image checksum from hex file From ff13208751500ab627dce3efc2a5695cae6f4423 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Harter?= Date: Wed, 19 Dec 2018 18:22:10 +0100 Subject: [PATCH 3/3] riotboot: remove compatibility for ELFFILE as file to flash Openocd boards are now updated. --- makefiles/boot/riotboot.mk | 10 ++-------- tests/riotboot/Makefile | 4 ---- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/makefiles/boot/riotboot.mk b/makefiles/boot/riotboot.mk index 90ad575cb6..d476cb7e33 100644 --- a/makefiles/boot/riotboot.mk +++ b/makefiles/boot/riotboot.mk @@ -97,30 +97,24 @@ $(RIOTBOOT_EXTENDED_BIN): $(RIOTBOOT_COMBINED_BIN) $(Q)truncate -s $$(($(SLOT0_OFFSET) + $(SLOT0_LEN) + $(RIOTBOOT_HDR_LEN))) $@.tmp $(Q)mv $@.tmp $@ -# Flashing rule for openocd to flash combined/extended binaries -riotboot/flash-combined-slot0: ELFFILE=$(RIOTBOOT_COMBINED_BIN) -riotboot/flash-extended-slot0: ELFFILE=$(RIOTBOOT_EXTENDED_BIN) - +# Flashing rule for combined binaries riotboot/flash-combined-slot0: FLASHFILE=$(RIOTBOOT_COMBINED_BIN) riotboot/flash-combined-slot0: $(RIOTBOOT_COMBINED_BIN) $(FLASHDEPS) $(flash-recipe) +# Flashing rule for extended binaries riotboot/flash-extended-slot0: FLASHFILE=$(RIOTBOOT_EXTENDED_BIN) riotboot/flash-extended-slot0: $(RIOTBOOT_EXTENDED_BIN) $(FLASHDEPS) $(flash-recipe) # Flashing rule for slot 0 riotboot/flash-slot0: export IMAGE_OFFSET=$(SLOT0_OFFSET) -# openocd -riotboot/flash-slot0: ELFFILE=$(SLOT0_RIOT_BIN) riotboot/flash-slot0: FLASHFILE=$(SLOT0_RIOT_BIN) riotboot/flash-slot0: $(SLOT0_RIOT_BIN) $(FLASHDEPS) $(flash-recipe) # Flashing rule for slot 1 riotboot/flash-slot1: export IMAGE_OFFSET=$(SLOT1_OFFSET) -# openocd -riotboot/flash-slot1: ELFFILE=$(SLOT1_RIOT_BIN) riotboot/flash-slot1: FLASHFILE=$(SLOT1_RIOT_BIN) riotboot/flash-slot1: $(SLOT1_RIOT_BIN) $(FLASHDEPS) $(flash-recipe) diff --git a/tests/riotboot/Makefile b/tests/riotboot/Makefile index 9b7fa46e76..6f580a8dae 100644 --- a/tests/riotboot/Makefile +++ b/tests/riotboot/Makefile @@ -24,7 +24,3 @@ FLASHFILE = $(RIOTBOOT_COMBINED_BIN) include ../Makefile.tests_common include $(RIOTBASE)/Makefile.include - -# This is currently hacky as the flasher are not using 'FLASHFILE' -# openocd -ELFFILE = $(FLASHFILE)