forked from contiki-ng/contiki-ng
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.embedded
32 lines (25 loc) · 1.03 KB
/
Makefile.embedded
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# 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.
###
### Targets using the tools/serial-io
###
RLWRAPGOALS = login serialdump serialview
.PHONY: $(RLWRAPGOALS)
BAUDRATE ?= 115200
SERIALDUMP_TIME_FMT ?=
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)
serialdump: $(SERIAL_DUMP_BIN)
$(SERIALDUMP) -b$(BAUDRATE) -T$(SERIALDUMP_TIME_FMT) $(PORT) | tee serialdump-`date +%Y%m%d-%H%M`
serialview: $(SERIAL_DUMP_BIN)
$(SERIALDUMP) -b$(BAUDRATE) -T$(SERIALDUMP_TIME_FMT) $(PORT)
login: $(SERIAL_DUMP_BIN)
$(SERIALDUMP) -b$(BAUDRATE) $(PORT)