-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
39 lines (27 loc) · 833 Bytes
/
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
.EXPORT_ALL_VARIABLES:
MONITOR_BAUD = 115200
SERIAL_DEVICE = /dev/ttyUSB*
.PHONY: all upload clean program uploadfs find-serial find-monitor-baud
all:
platformio -f -c vim run
upload:
pio run --target upload
clean:
platformio -f -c vim run --target clean
program:
platformio -f -c vim run --target program
uploadfs:
platformio -f -c vim run --target uploadfs
update:
pio run -t update
inotify-watch-upload:
-tools/inotify-upload.sh src/
find-serial:
ls -1 $(SERIAL_DEVICE)
$(eval USBTTY=$(shell ls -1 $(SERIAL_DEVICE) 2>/dev/null | head -n1 ))
find-monitor-baud:
$(eval MONITOR_BAUD=$(shell tools/config-value.sh SERIAL_BAUD ))
monitor: find-monitor-baud
@pio device monitor --baud $(MONITOR_BAUD) --raw --quiet --no-reconnect
screen-monitor: find-serial find-monitor-baud
screen $(USBTTY) $(MONITOR_BAUD)