-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile.arduino
45 lines (38 loc) · 1.2 KB
/
Makefile.arduino
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
#
#
#
ARDUINO := /Applications/Arduino.app/Contents/MacOS/Arduino --verbose --preserve-temp-files
ifndef board
$(error Usage: make board=<teensy31|teensyLC|feather>)
endif
ifeq ($(board),teensy31)
# Teensy 3.1/3.2 target
# Teensy options hardware/teensy/avr/boards.txt
BOARD = teensy:avr:teensy31:usb=serial,keys=en-us,speed=72
PORT = /dev/ttyACM0
endif
ifeq ($(board),teensyLC)
# Teensy LC target
# Teensy options hardware/teensy/avr/boards.txt
BOARD = teensy:avr:teensyLC:usb=serial,keys=en-us,speed=48
PORT = /dev/ttyACM0
endif
ifeq ($(board),feather)
# Adafruit Feather M0
# must be installed with arduino --install-boards "adafruit:samd"
# ~/.arduino15/packages/adafruit/hardware/samd/1.0.13/boards.txt
BOARD = adafruit:samd:adafruit_feather_m0
PORT = /dev/ttyACM0
endif
ifeq ($(board),uno)
# Arduino UNO target
# arduino options hardware/arduino/avr/boards.txt
BOARD = arduino:avr:uno
PORT = /dev/ttyUSB0
endif
TMPDIR := /tmp/pano-controller-build
LIB_SOURCES = src/*.cpp src/*.h
panocontroller: examples/PanoController/PanoController.ino $(LIB_SOURCES) $(TMPDIR)
$(ARDUINO) --upload $< --board $(BOARD) --port $(PORT) --pref build.path=$(TMPDIR)
$(TMPDIR):
mkdir -p $(TMPDIR)