-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
28 lines (25 loc) · 903 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
FQBN=
CORE=
SERIAL=
SKETCH=
all:
ifeq ($(FQBN),)
@echo "Please visit https://arduino.github.io/arduino-cli/0.21/getting-started/ to continue setup. Then set the FQBN env variable."
@echo "This might take the form of: \`arduino:samd:mkr1000\`"
@exit 1
else ifeq ($(SERIAL,))
@echo "Please visit https://arduino.github.io/arduino-cli/0.21/getting-started/ to continue setup. Then set the SERIAL env variable".
@echo "This might take the form of: \`/dev/ttyWTF\`"
@exit 1
endif
arduino-cli compile --fqbn $(FQBN) $(SKETCH)
arduino-cli upload -p $(SERIAL) --fqbn $(FQBN) $(SKETCH)
setup:
arduino-cli core update-index
arduino-cli board list
ifeq ($(CORE),)
@echo "Please visit https://arduino.github.io/arduino-cli/0.21/getting-started/ to continue setup. Then set the CORE env variable."
@echo "This might take the form of: \`arduino:samd\`"
@exit 1
endif
arduino-cli core install $(CORE)