-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
46 lines (29 loc) · 998 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
40
41
42
43
44
45
46
PLATFORMIO = ~/.platformio/penv/bin/platformio
BOARD = esp32c3
BAND = 115200
PORT1 = /dev/ttyACM0
PORT2 = /dev/ttyACM1
all: build
build:
$(PLATFORMIO) run --environment $(BOARD)
upload: build
$(PLATFORMIO) run --target upload --environment $(BOARD)
upload1: build
$(PLATFORMIO) run --target upload --environment $(BOARD) --upload-port $(PORT1)
upload2: build
$(PLATFORMIO) run --target upload --environment $(BOARD) --upload-port $(PORT2)
monitor:
$(PLATFORMIO) device monitor --environment $(BOARD) --baud $(BAND)
monitor1:
$(PLATFORMIO) device monitor --environment $(BOARD) --baud $(BAND) --port $(PORT1)
monitor2:
$(PLATFORMIO) device monitor --environment $(BOARD) --baud $(BAND) --port $(PORT2)
clean:
$(PLATFORMIO) run --target clean --environment $(BOARD)
flash: upload monitor
flash1: upload1 monitor1
flash2: upload2 monitor2
start: clean flash monitor
start1: clean flash1 monitor1
start2: clean flash2 monitor2
.PHONY: all build upload monitor clean flash start