Skip to content
Snippets Groups Projects
Commit 95cebf10 authored by George Oikonomou's avatar George Oikonomou
Browse files

Change platform zoul to use the new motelist

parent 470ac26c
Branches
No related tags found
Loading
...@@ -46,23 +46,8 @@ MODULES += arch/dev/cc1200 arch/dev/rgb-led os/storage/cfs ...@@ -46,23 +46,8 @@ MODULES += arch/dev/cc1200 arch/dev/rgb-led os/storage/cfs
BSL = $(CONTIKI)/tools/cc2538-bsl/cc2538-bsl.py BSL = $(CONTIKI)/tools/cc2538-bsl/cc2538-bsl.py
### Use the specific Zoul subplatform to query for connected devices MOTES := $(shell python $(TOOLS_DIR)/motelist/motelist.py --omit-header \
ifdef MOTELIST_ZOLERTIA | grep $(MOTELIST_ZOLERTIA) | cut -f1 -d " ")
MOTELIST_FLAGS += -b $(MOTELIST_ZOLERTIA)
endif
### Detect if a mote is connected over serial port
ifeq ($(HOST_OS),Darwin)
USBDEVPREFIX=
MOTELIST := $(CONTIKI)/tools/zolertia/motelist-zolertia-macos
MOTES := $(shell $(MOTELIST) -c 2>&- | cut -f 2 -d ,)
else
### If we are not running under Mac, we assume Linux
USBDEVPREFIX=
MOTELIST := $(CONTIKI)/tools/zolertia/motelist-zolertia
MOTES := $(shell $(MOTELIST) -b $(MOTELIST_ZOLERTIA) -c 2>&- | cut -f 2 -d , | \
perl -ne 'print $$1 . " " if(m-(/dev/\w+)-);')
endif
### If PORT is defined, override to keep backward compatibility ### If PORT is defined, override to keep backward compatibility
ifdef PORT ifdef PORT
...@@ -81,7 +66,8 @@ endif ...@@ -81,7 +66,8 @@ endif
### Variable that expands into a pattern rule to upload to a given MOTE. ### Variable that expands into a pattern rule to upload to a given MOTE.
### Requires $(MOTE) to be defined ### Requires $(MOTE) to be defined
### $$$$ Double escapes $s that need to be passed to the shell - once for when make parses UPLOAD_RULE, and once for when the expanded rule is parsed by make. ### $$$$ Double escapes $s that need to be passed to the shell - once for when
### make parses UPLOAD_RULE, and once for when the expanded rule is parsed by make.
define UPLOAD_RULE define UPLOAD_RULE
%.$(MOTE): %.bin %.elf %.$(MOTE): %.bin %.elf
@echo "Flashing $(MOTE)" @echo "Flashing $(MOTE)"
...@@ -94,10 +80,8 @@ endef ...@@ -94,10 +80,8 @@ endef
### Create an upload rule for every MOTE connected ### Create an upload rule for every MOTE connected
$(foreach MOTE,$(MOTES),$(eval $(UPLOAD_RULE))) $(foreach MOTE,$(MOTES),$(eval $(UPLOAD_RULE)))
motelist: .PHONY: zoul-motes
$(MOTELIST)
zoul-motelist:
$(MOTELIST) $(MOTELIST_FLAGS)
zoul-motes: zoul-motes:
@echo $(MOTES) @echo $(MOTES)
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment