forked from sarfata/kbox-firmware
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
70 lines (49 loc) · 1.31 KB
/
Makefile
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
UNAME := $(shell uname)
ifeq ($(UNAME), Linux)
PORT := /dev/ttyACM0
endif
ifeq ($(UNAME), Darwin)
PORT := $(shell ls -t /dev/tty.usbmodem* |head -n 1 )
endif
.PHONY: test clean validation
all:
platformio run
clean:
platformio -f -c vim run --target clean
esp:
platformio run -e esp -t size
esp-upload:
platformio run -e esp -t upload
esp-uploadfs:
platformio run -e esp -t uploadfs
host:
platformio run -e host -t size
host-upload:
platformio run -e host -t upload
logs:
sh -c "while [ ! -r $(PORT) ]; do sleep 0.01; done"
miniterm.py --rts 0 $(PORT) 115200
logs-n2kanalyzer:
miniterm.py --rts 0 $(PORT) 115200 | grep 'TX: $$PCDIN' |perl -pe 's/.*TX: //' |analyzer -json
nmeainterface:
miniterm.py --rts 0 $(PORT) 38400
reboot:
tools/kbox.py --port $(PORT) reboot
mfg:
platformio run -e mfg
runmfg:
platformio run -e mfg -t upload
# Wait for the serial port to be available
sh -c "while [ ! -r $(PORT) ]; do sleep 0.01; done"
miniterm.py $(PORT) 115200
test:
platformio run -e test -vv
find .pioenvs -name '*.gcda'|xargs rm -f
.pioenvs/test/program
lcov: test
lcov --directory .pioenvs/test/ --base-directory . --capture -o cov.info
genhtml cov.info -o lcov-html
sktool:
platformio run -e sktool
validation: sktool
src/sktool/sktool-test.py --implementation sktool src/sktool/tests/*json