2018-05-14 15:58:40 +00:00
|
|
|
RLWRAPGOALS = login serialdump serialview
|
|
|
|
|
|
|
|
.PHONY: $(RLWRAPGOALS)
|
2018-05-12 16:35:51 +00:00
|
|
|
|
|
|
|
BAUDRATE ?= 115200
|
|
|
|
TIMESTAMP = $(CONTIKI)/tools/timestamp
|
|
|
|
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)
|
|
|
|
$(SERIALDUMP) -b$(BAUDRATE) $(PORT) | $(TIMESTAMP) | tee serialdump-`date +%Y%m%d-%H%M`
|
|
|
|
|
|
|
|
serialview: $(SERIAL_DUMP_BIN)
|
|
|
|
$(SERIALDUMP) -b$(BAUDRATE) $(PORT) | $(TIMESTAMP)
|
|
|
|
|
|
|
|
login: $(SERIAL_DUMP_BIN)
|
|
|
|
$(SERIALDUMP) -b$(BAUDRATE) $(PORT)
|