Skip to content

Commit 2b8dc36

Browse files
committed
Modify Makefile
1 parent 0de419a commit 2b8dc36

File tree

1 file changed

+20
-4
lines changed

1 file changed

+20
-4
lines changed

Makefile

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,30 @@
22
clean:
33
rm -rf .pio
44

5-
.PHONY: pico-firmware
6-
pico-firmware: clean
5+
.PHONY: firmware
6+
firmware:
77
pio run -e pico
88

9-
.PHONY: pico-upload
10-
pico-upload: clean
9+
.PHONY: firmware-clean
10+
firmware-clean: clean
11+
pio run -e pico
12+
13+
.PHONY: upload
14+
upload:
1115
pio run -e pico --target upload
1216

17+
.PHONY: upload-clean
18+
upload-clean: clean
19+
pio run -e pico --target upload
20+
21+
PORTS := $(wildcard /dev/ttyACM*)
22+
.PHONY: upload-all
23+
upload-all:
24+
@for port in $(PORTS); do \
25+
echo "Uploading to $$port"; \
26+
pio run -e pico --target upload; \
27+
done
28+
1329
.PHONY: monitor
1430
monitor:
1531
pio device monitor

0 commit comments

Comments
 (0)