Skip to content

Commit bcf6640

Browse files
committed
fix mcu
1 parent 0c55418 commit bcf6640

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Teensy.mk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,10 @@ LDFLAGS += -Wl,--gc-sections,--relax
179179
LINKER_SCRIPTS = -T${ARDUINO_CORE_PATH}/${AMCU}.ld
180180
OTHER_LIBS = $(call PARSE_TEENSY,$(BOARD_TAG),build.flags.libs)
181181

182+
CPUFLAGS = $(call PARSE_TEENSY,$(BOARD_TAG),build.flags.cpu)
183+
# usually defined as per teensy31.build.mcu=mk20dx256 but that isn't valid switch
184+
MCU := $(shell echo ${CPUFLAGS} | sed -n -e 's/.*-mcpu=\([a-zA-Z0-9_-]*\).*/\1/p')
185+
182186
########################################################################
183187
# some fairly odd settings so that 'make upload' works
184188
#

0 commit comments

Comments
 (0)