2018-01-17 18:12:19 +01:00
|
|
|
# define the cpu used by the Teensy3.1 & 3.2 board
|
|
|
|
CPU = kinetis
|
|
|
|
CPU_MODEL = mk20dx256vlh7
|
|
|
|
|
|
|
|
# custom flasher to use with the bootloader
|
2018-05-15 11:23:44 +02:00
|
|
|
TEENSY_LOADER = $(RIOTTOOLS)/teensy-loader-cli/teensy_loader
|
2018-01-17 18:12:19 +01:00
|
|
|
FLASHER = $(TEENSY_LOADER)
|
|
|
|
|
|
|
|
FFLAGS ?= --mcu=mk20dx256 $(HEXFILE)
|
|
|
|
|
|
|
|
ifeq ($(TEENSY_LOADER),$(FLASHER))
|
|
|
|
FLASHDEPS += $(TEENSY_LOADER)
|
|
|
|
endif
|
|
|
|
|
|
|
|
# define the default port depending on the host OS
|
|
|
|
PORT_LINUX ?= /dev/ttyACM0
|
|
|
|
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbserial-*)))
|
|
|
|
|
|
|
|
$(TEENSY_LOADER):
|
|
|
|
@echo "[INFO] teensy_loader binary not found - building it from source now"
|
2018-05-15 11:23:44 +02:00
|
|
|
CC= CFLAGS= make -C $(RIOTTOOLS)/teensy-loader-cli
|
2018-01-17 18:12:19 +01:00
|
|
|
@echo "[INFO] teensy_loader binary successfully build!"
|
|
|
|
|
|
|
|
# setup serial terminal
|
|
|
|
include $(RIOTMAKE)/tools/serial.inc.mk
|