|
|
|
|
|
|
|
|
# The name of your project (used to name the compiled .hex file) |
|
|
# The name of your project (used to name the compiled .hex file) |
|
|
TARGET = main |
|
|
TARGET = main |
|
|
|
|
|
|
|
|
|
|
|
# Those that specify a NO_ARDUINO environment variable will |
|
|
|
|
|
# be able to use this Makefile with no Arduino dependency. |
|
|
|
|
|
# Please note that if ARDUINOPATH was set, it will override |
|
|
|
|
|
# the NO_ARDUINO behaviour. |
|
|
|
|
|
ifndef NO_ARDUINO |
|
|
# Path to your arduino installation |
|
|
# Path to your arduino installation |
|
|
ARDUINOPATH ?= ../../../../.. |
|
|
ARDUINOPATH ?= ../../../../.. |
|
|
#ARDUINOPATH ?= ../../../.. |
|
|
#ARDUINOPATH ?= ../../../.. |
|
|
|
|
|
endif |
|
|
|
|
|
|
|
|
# configurable options |
|
|
# configurable options |
|
|
OPTIONS = -DF_CPU=48000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -DUSING_MAKEFILE |
|
|
OPTIONS = -DF_CPU=48000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -DUSING_MAKEFILE |
|
|
|
|
|
|
|
|
# locations and edit the pathnames. The rest of Arduino is not needed. |
|
|
# locations and edit the pathnames. The rest of Arduino is not needed. |
|
|
#************************************************************************ |
|
|
#************************************************************************ |
|
|
|
|
|
|
|
|
|
|
|
ifdef ARDUINOPATH |
|
|
|
|
|
|
|
|
# path location for Teensy Loader, teensy_post_compile and teensy_reboot |
|
|
# path location for Teensy Loader, teensy_post_compile and teensy_reboot |
|
|
TOOLSPATH = $(abspath $(ARDUINOPATH)/hardware/tools) # on Linux |
|
|
TOOLSPATH = $(abspath $(ARDUINOPATH)/hardware/tools) # on Linux |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# path location for the arm-none-eabi compiler |
|
|
# path location for the arm-none-eabi compiler |
|
|
COMPILERPATH = $(abspath $(ARDUINOPATH)/hardware/tools/arm/bin) |
|
|
COMPILERPATH = $(abspath $(ARDUINOPATH)/hardware/tools/arm/bin) |
|
|
|
|
|
|
|
|
|
|
|
else |
|
|
|
|
|
# Default to the normal GNU/Linux compiler path if NO_ARDUINO |
|
|
|
|
|
# and ARDUINOPATH was not set. |
|
|
|
|
|
COMPILERPATH ?= /usr/bin |
|
|
|
|
|
|
|
|
|
|
|
endif |
|
|
|
|
|
|
|
|
#************************************************************************ |
|
|
#************************************************************************ |
|
|
# Settings below this point usually do not need to be edited |
|
|
# Settings below this point usually do not need to be edited |
|
|
#************************************************************************ |
|
|
#************************************************************************ |
|
|
|
|
|
|
|
|
%.hex: %.elf |
|
|
%.hex: %.elf |
|
|
$(SIZE) $< |
|
|
$(SIZE) $< |
|
|
$(OBJCOPY) -O ihex -R .eeprom $< $@ |
|
|
$(OBJCOPY) -O ihex -R .eeprom $< $@ |
|
|
|
|
|
ifneq (,$(wildcard $(TOOLSPATH))) |
|
|
$(TOOLSPATH)/teensy_post_compile -file=$(basename $@) -path=$(shell pwd) -tools=$(TOOLSPATH) |
|
|
$(TOOLSPATH)/teensy_post_compile -file=$(basename $@) -path=$(shell pwd) -tools=$(TOOLSPATH) |
|
|
-$(TOOLSPATH)/teensy_reboot |
|
|
-$(TOOLSPATH)/teensy_reboot |
|
|
|
|
|
|
|
|
|
|
|
endif |
|
|
|
|
|
|
|
|
# compiler generated dependency info |
|
|
# compiler generated dependency info |
|
|
-include $(OBJS:.o=.d) |
|
|
-include $(OBJS:.o=.d) |