diff --git a/dist/testbed-support/Makefile.iotlab b/dist/testbed-support/Makefile.iotlab index acdf9be79e..4a4791aab1 100644 --- a/dist/testbed-support/Makefile.iotlab +++ b/dist/testbed-support/Makefile.iotlab @@ -9,6 +9,12 @@ IOTLAB_USER ?= $(shell cut -f1 -d: $(IOTLAB_AUTH)) IOTLAB_EXP_ID ?= $(shell experiment-cli get -l --state Running | grep -m 1 '"id"' | grep -Eo '[[:digit:]]+') IOTLAB_EXP_NAME ?= RIOT_EXP +ifneq (,$(findstring m3,$(IOTLAB_TYPE))) + BINARY := $(ELFFILE) +else + BINARY := $(HEXFILE) +endif + $(IOTLAB_AUTH): auth-cli -u $(IOTLAB_USER) @@ -17,13 +23,13 @@ iotlab-exp: $(IOTLAB_AUTH) all $(eval IOTLAB_EXP_NAME := RIOT_EXP_$(IOTLAB_EXP_NAME)) endif ifeq (,$(AD)) - @echo "experiment-cli submit -d $(IOTLAB_DURATION) -l $(IOTLAB_NODES),archi=$(IOTLAB_TYPE)+site=$(IOTLAB_SITE),$(ELFFILE),$(IOTLAB_PROFILE) -n $(IOTLAB_EXP_NAME)" + @echo "experiment-cli submit -d $(IOTLAB_DURATION) -l $(IOTLAB_NODES),archi=$(IOTLAB_TYPE)+site=$(IOTLAB_SITE),$(BINARY),$(IOTLAB_PROFILE) -n $(IOTLAB_EXP_NAME)" endif - $(eval NEW_ID := $(shell experiment-cli submit -d $(IOTLAB_DURATION) -l $(IOTLAB_NODES),archi=$(IOTLAB_TYPE)+site=$(IOTLAB_SITE),$(ELFFILE),$(IOTLAB_PROFILE) -n $(IOTLAB_EXP_NAME) | grep -Eo '[[:digit:]]+')) + $(eval NEW_ID := $(shell experiment-cli submit -d $(IOTLAB_DURATION) -l $(IOTLAB_NODES),archi=$(IOTLAB_TYPE)+site=$(IOTLAB_SITE),$(BINARY),$(IOTLAB_PROFILE) -n $(IOTLAB_EXP_NAME) | grep -Eo '[[:digit:]]+')) $(AD)experiment-cli wait -i $(NEW_ID) iotlab-flash: $(IOTLAB_AUTH) all - $(AD)node-cli --update $(ELFFILE) -i $(IOTLAB_EXP_ID) + $(AD)node-cli --update $(BINARY) -i $(IOTLAB_EXP_ID) iotlab-reset: $(IOTLAB_AUTH) $(AD)node-cli --reset -i $(IOTLAB_EXP_ID)