diff --git a/Makefile.include b/Makefile.include index 3c2862297d..02f5d81f07 100644 --- a/Makefile.include +++ b/Makefile.include @@ -286,6 +286,10 @@ export PREFIX ?= $(if $(TARGET_ARCH),$(TARGET_ARCH)-) # be done in makefile.iotlab.single.inc.mk which is included after. ifneq (,$(IOTLAB_NODE)) PROGRAMMER ?= iotlab + # iotlab uses ELFFILE by default for flashing boards, except for WSN430. + ifeq (,$(filter wsn430-%,$(BOARD))) + FLASHFILE ?= $(ELFFILE) + endif endif # Add standard include directories @@ -445,6 +449,11 @@ include $(RIOTMAKE)/modules.inc.mk # https://www.gnu.org/software/make/manual/html_node/Force-Targets.html .PHONY: FORCE +ifneq (,$(IOTLAB_NODE)) + # iot-lab serial and flasher + include $(RIOTBASE)/dist/testbed-support/makefile.iotlab.single.inc.mk +endif + ELFFILE ?= $(BINDIR)/$(APPLICATION).elf HEXFILE ?= $(ELFFILE:.elf=.hex) BINFILE ?= $(ELFFILE:.elf=.bin) @@ -813,10 +822,6 @@ ifneq (,$(filter iotlab-m3 wsn430-v1_3b wsn430-v1_4,$(BOARD))) include $(RIOTBASE)/dist/testbed-support/Makefile.iotlab endif endif -ifneq (,$(IOTLAB_NODE)) - # iot-lab serial and flasher - include $(RIOTBASE)/dist/testbed-support/makefile.iotlab.single.inc.mk -endif # Include desvirt Makefile include $(RIOTTOOLS)/desvirt/Makefile.desvirt diff --git a/boards/common/wsn430/Makefile.include b/boards/common/wsn430/Makefile.include index 8fa4aa992c..b87e3af0ee 100644 --- a/boards/common/wsn430/Makefile.include +++ b/boards/common/wsn430/Makefile.include @@ -12,6 +12,3 @@ include $(RIOTMAKE)/tools/serial.inc.mk FLASHER = mspdebug FLASHFILE ?= $(HEXFILE) FFLAGS = -d $(PORT) -j uif "prog $(FLASHFILE)" - -# Use the HEXFILE when using iot-lab.single.inc.mk -IOTLAB_FLASHFILE = $(FLASHFILE) diff --git a/dist/testbed-support/makefile.iotlab.single.inc.mk b/dist/testbed-support/makefile.iotlab.single.inc.mk index 8e45aa3acc..51176e2b6f 100644 --- a/dist/testbed-support/makefile.iotlab.single.inc.mk +++ b/dist/testbed-support/makefile.iotlab.single.inc.mk @@ -54,9 +54,6 @@ IOTLAB_USER ?= $(shell cut -f1 -d: $(IOTLAB_AUTH)) # Optional Experiment id. Required when having multiple experiments IOTLAB_EXP_ID ?= -# File to use for flashing -IOTLAB_FLASHFILE ?= $(ELFFILE) - # Specify experiment-id option if provided _IOTLAB_EXP_ID := $(if $(IOTLAB_EXP_ID),--id $(IOTLAB_EXP_ID)) @@ -163,7 +160,7 @@ ifneq (iotlab-a8-m3,$(BOARD)) FLASHER = iotlab-node RESET = iotlab-node _NODE_FMT = --jmespath='keys(@)[0]' --format='int' - FFLAGS = $(_NODE_FMT) $(_IOTLAB_EXP_ID) $(_IOTLAB_NODELIST) --update $(IOTLAB_FLASHFILE) | $(_STDIN_EQ_0) + FFLAGS = $(_NODE_FMT) $(_IOTLAB_EXP_ID) $(_IOTLAB_NODELIST) --update $(FLASHFILE) | $(_STDIN_EQ_0) RESET_FLAGS = $(_NODE_FMT) $(_IOTLAB_EXP_ID) $(_IOTLAB_NODELIST) --reset | $(_STDIN_EQ_0) ifeq (,$(_IOTLAB_ON_FRONTEND)) @@ -180,7 +177,7 @@ else FLASHER = iotlab-ssh RESET = iotlab-ssh _NODE_FMT = --jmespath='keys(values(@)[0])[0]' --fmt='int' - FFLAGS = $(_NODE_FMT) $(_IOTLAB_EXP_ID) flash-m3 $(_IOTLAB_NODELIST) $(IOTLAB_FLASHFILE) | $(_STDIN_EQ_0) + FFLAGS = $(_NODE_FMT) $(_IOTLAB_EXP_ID) flash-m3 $(_IOTLAB_NODELIST) $(FLASHFILE) | $(_STDIN_EQ_0) RESET_FLAGS = $(_NODE_FMT) $(_IOTLAB_EXP_ID) reset-m3 $(_IOTLAB_NODELIST) | $(_STDIN_EQ_0) TERMPROG = ssh