-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
55 lines (46 loc) · 953 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
47
48
49
50
51
52
53
54
55
BOARD_TTY = /dev/cu.usbmodem11301
BAUD_RATE = 115200
.PHONY: configure
configure:
@pio init --ide vscode
@make build
.PHONY: build
build: config
@pio run
.PHONY: deploy
flash: config
@pio run -t upload -e release
.PHONY: flash-debug
flash-debug:
@pio run -t upload -e debug
@sleep 1
@make monitor
.PHONY: ota
ota:
@pio run -e release
@python scripts/espota.py \
-i 192.168.1.224 \
-p 2040 \
-f .pio/build/release/firmware.bin
.PHONY: ota-debug
ota-debug:
@pio run -e debug
@python scripts/espota.py \
-i 192.168.1.224 \
-p 2040 \
-f .pio/build/debug/firmware.bin
.PHONY: monitor
monitor:
pio device monitor -p $(BOARD_TTY) --baud $(BAUD_RATE)
.PHONY: format
format:
@astyle --project=.astylerc -n \
-r 'src/*.cc' \
-r 'src/*.h' \
-r 'lib/*.cc' \
-r 'lib/*.h' \
-r 'include/*.h'
config: src/config.yaml
@python .pio/libdeps/release/MyrtIO/tools/configgen/configgen.py \
src/config.yaml \
include/config.h