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

Merge pull request #3763 from OlegHahm/iotlab_makefile_fix

dist: chose binary format for IoT-LAB Makefile
This commit is contained in:
Oleg Hahm 2015-09-04 15:56:42 +02:00
commit d844bca087

View File

@ -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)