2018-05-26 12:59:12 +00:00
|
|
|
# This Makefile contains make variables and rules that are only applicable
|
|
|
|
# to builds for embedded devices (i.e. excluding platforms native and cooja).
|
|
|
|
# Future extensions to the build system that are of a similar nature (for
|
|
|
|
# embedded devices only), can be achieved by extending this Makefile here.
|
|
|
|
|
2018-10-14 16:03:55 +00:00
|
|
|
###
|
|
|
|
### Targets using the tools/serial-io
|
|
|
|
###
|
2018-05-14 15:58:40 +00:00
|
|
|
RLWRAPGOALS = login serialdump serialview
|
|
|
|
|
|
|
|
.PHONY: $(RLWRAPGOALS)
|
2018-05-12 16:35:51 +00:00
|
|
|
|
|
|
|
BAUDRATE ?= 115200
|
2018-05-15 21:24:22 +00:00
|
|
|
SERIALDUMP_TIME_FMT ?=
|
2018-05-15 16:49:32 +00:00
|
|
|
|
2018-05-12 16:35:51 +00:00
|
|
|
ifeq ($(HOST_OS),Windows)
|
|
|
|
SERIALDUMP = $(SERIAL_DUMP_BIN)
|
|
|
|
else
|
2018-05-14 15:58:40 +00:00
|
|
|
RLWRAP = $(notdir $(shell which rlwrap))
|
|
|
|
ifeq ($(RLWRAP),)
|
|
|
|
ifneq ($(filter $(RLWRAPGOALS),$(MAKECMDGOALS)),)
|
|
|
|
$(info Running serialdump without rlwrap support.)
|
|
|
|
$(info Consider installing rlwarp in order to be able to use command history)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
SERIALDUMP = $(RLWRAP) $(SERIAL_DUMP_BIN)
|
2018-05-12 16:35:51 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
serialdump: $(SERIAL_DUMP_BIN)
|
2018-05-15 21:24:22 +00:00
|
|
|
$(SERIALDUMP) -b$(BAUDRATE) -T$(SERIALDUMP_TIME_FMT) $(PORT) | tee serialdump-`date +%Y%m%d-%H%M`
|
2018-05-12 16:35:51 +00:00
|
|
|
|
|
|
|
serialview: $(SERIAL_DUMP_BIN)
|
2018-05-15 21:24:22 +00:00
|
|
|
$(SERIALDUMP) -b$(BAUDRATE) -T$(SERIALDUMP_TIME_FMT) $(PORT)
|
2018-05-12 16:35:51 +00:00
|
|
|
|
|
|
|
login: $(SERIAL_DUMP_BIN)
|
|
|
|
$(SERIALDUMP) -b$(BAUDRATE) $(PORT)
|
2018-10-14 16:03:55 +00:00
|
|
|
|
|
|
|
###
|
|
|
|
### Targets using tools/motelist
|
|
|
|
###
|
|
|
|
CONTIKI_NG_MOTELIST_DIR = $(TOOLS_DIR)/motelist
|
|
|
|
CONTIKI_NG_MOTELIST = python $(CONTIKI_NG_MOTELIST_DIR)/motelist.py
|
|
|
|
|
|
|
|
.PHONY: motelist-all
|
|
|
|
|
|
|
|
motelist-all:
|
|
|
|
$(CONTIKI_NG_MOTELIST)
|