-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
30 lines (23 loc) · 969 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
setup:
ifeq ("$(wildcard $(.port.txt))","")
touch .port.txt
echo "Type serial port into .port.txt"
endif
file := .port.txt
variable := $(shell cat ${file})
%:
@:
compile:
arduino-cli compile -b esp32:esp32:esp32c3 $(filter-out $@,$(MAKECMDGOALS))
upload:
arduino-cli upload -b esp32:esp32:esp32c3 -p $(variable) $(filter-out $@,$(MAKECMDGOALS))
monitor:
arduino-cli monitor -p $(variable) -c baudrate=115200
compupmon:
arduino-cli compile -b esp32:esp32:esp32c3 $(filter-out $@,$(MAKECMDGOALS))
arduino-cli upload -b esp32:esp32:esp32c3 -p $(variable) $(filter-out $@,$(MAKECMDGOALS))
arduino-cli monitor -p $(variable) -c baudrate=115200
prod:
arduino-cli compile --build-property compiler.cpp.extra_flags=-DDEPLOY -b esp32:esp32:esp32c3 $(filter-out $@,$(MAKECMDGOALS))
arduino-cli upload -b esp32:esp32:esp32c3 -p $(variable) $(filter-out $@,$(MAKECMDGOALS))
arduino-cli monitor -p $(variable) -c baudrate=115200