From bcf664079c9dcbc30a356d4adf2b2c3d161cd18a Mon Sep 17 00:00:00 2001 From: George Harker Date: Fri, 4 Nov 2016 11:37:10 -0700 Subject: [PATCH] fix mcu --- Teensy.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Teensy.mk b/Teensy.mk index 48dcb9e..edbdbb4 100644 --- a/Teensy.mk +++ b/Teensy.mk @@ -179,6 +179,10 @@ LDFLAGS += -Wl,--gc-sections,--relax LINKER_SCRIPTS = -T${ARDUINO_CORE_PATH}/${AMCU}.ld OTHER_LIBS = $(call PARSE_TEENSY,$(BOARD_TAG),build.flags.libs) +CPUFLAGS = $(call PARSE_TEENSY,$(BOARD_TAG),build.flags.cpu) +# usually defined as per teensy31.build.mcu=mk20dx256 but that isn't valid switch +MCU := $(shell echo ${CPUFLAGS} | sed -n -e 's/.*-mcpu=\([a-zA-Z0-9_-]*\).*/\1/p') + ######################################################################## # some fairly odd settings so that 'make upload' works #