Quellcode durchsuchen

Made the teensy3/Makefile completely Arduino independent.

Those that specify a NO_ARDUINO environment variable before using
the teensy3/Makefile, will be completely Arduino independent. Note
however that if ARDUINOPATH is set, the NO_ARDUINO behaviour will
be overridden. With NO_ARDUINO set and ARDUINOPATH unset, the
cross-compiler tool path (COMPILERPATH) will be set to /usr/bin.
Setting the COMPILERPATH environment variable before using the
teensy3/Makefile, will override the default.
teensy4-core
Pieter du Preez vor 9 Jahren
Ursprung
Commit
0d26e6a30e
1 geänderte Dateien mit 17 neuen und 1 gelöschten Zeilen
  1. +17
    -1
      teensy3/Makefile

+ 17
- 1
teensy3/Makefile Datei anzeigen

@@ -8,9 +8,15 @@ MCU_LD = $(LOWER_MCU).ld
# The name of your project (used to name the compiled .hex file)
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
ARDUINOPATH ?= ../../../../..
#ARDUINOPATH ?= ../../../..
endif

# configurable options
OPTIONS = -DF_CPU=48000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -DUSING_MAKEFILE
@@ -32,6 +38,8 @@ OPTIONS += -D__$(MCU)__ -DARDUINO=10600 -DTEENSYDUINO=121
# 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
TOOLSPATH = $(abspath $(ARDUINOPATH)/hardware/tools) # on Linux

@@ -41,6 +49,13 @@ LIBRARYPATH = $(abspath $(ARDUINOPATH)/libraries)
# path location for the arm-none-eabi compiler
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
#************************************************************************
@@ -84,9 +99,10 @@ $(TARGET).elf: $(OBJS) $(MCU_LD)
%.hex: %.elf
$(SIZE) $<
$(OBJCOPY) -O ihex -R .eeprom $< $@
ifneq (,$(wildcard $(TOOLSPATH)))
$(TOOLSPATH)/teensy_post_compile -file=$(basename $@) -path=$(shell pwd) -tools=$(TOOLSPATH)
-$(TOOLSPATH)/teensy_reboot
endif

# compiler generated dependency info
-include $(OBJS:.o=.d)

Laden…
Abbrechen
Speichern