mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-23 01:29:33 +00:00
enable serial line tools using the same commands as the sky platform's Makefile
This commit is contained in:
parent
7e329ab467
commit
b9ef907690
@ -44,3 +44,39 @@ else
|
|||||||
-include $(CONTIKI)/platform/$(TARGET)/buildscripts/Makefile.win
|
-include $(CONTIKI)/platform/$(TARGET)/buildscripts/Makefile.win
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# If we are not running under Windows, we assume Linux
|
||||||
|
ifndef MOTELIST
|
||||||
|
USBDEVPREFIX=
|
||||||
|
SERIALDUMP = $(CONTIKI)/tools/sky/serialdump-linux
|
||||||
|
MOTELIST = $(CONTIKI)/tools/sky/motelist-linux
|
||||||
|
MOTES = $(shell $(MOTELIST) 2>&- | grep USB | \
|
||||||
|
cut -f 4 -d \ | \
|
||||||
|
perl -ne 'print $$1 . " " if(m-(/dev/\w+)-);')
|
||||||
|
CMOTES=$(MOTES)
|
||||||
|
endif
|
||||||
|
|
||||||
|
msb-motelist:
|
||||||
|
$(MOTELIST)
|
||||||
|
msb-motes:
|
||||||
|
@echo $(MOTES)
|
||||||
|
|
||||||
|
ifdef MOTE
|
||||||
|
serialdump:
|
||||||
|
$(SERIALDUMP) -b115200 $(USBDEVPREFIX)$(word $(MOTE), $(CMOTES)) | $(CONTIKI)/tools/timestamp | tee serialdump-`date +%Y%m%d-%H%M`
|
||||||
|
|
||||||
|
serialview:
|
||||||
|
$(SERIALDUMP) -b115200 $(USBDEVPREFIX)$(word $(MOTE), $(CMOTES)) | $(CONTIKI)/tools/timestamp
|
||||||
|
|
||||||
|
login:
|
||||||
|
$(SERIALDUMP) -b115200 $(USBDEVPREFIX)$(word $(MOTE), $(CMOTES))
|
||||||
|
else
|
||||||
|
serialdump:
|
||||||
|
$(SERIALDUMP) -b115200 $(USBDEVPREFIX)$(firstword $(CMOTES)) | $(CONTIKI)/tools/timestamp | tee serialdump-`date +%Y%m%d-%H%M`
|
||||||
|
|
||||||
|
serialview:
|
||||||
|
$(SERIALDUMP) -b115200 $(USBDEVPREFIX)$(firstword $(CMOTES)) | $(CONTIKI)/tools/timestamp
|
||||||
|
|
||||||
|
login:
|
||||||
|
$(SERIALDUMP) -b115200 $(USBDEVPREFIX)$(firstword $(CMOTES))
|
||||||
|
endif
|
||||||
|
Loading…
Reference in New Issue
Block a user