From 553b91460a28b52c3b1ef6ba759c3a67f81f447f Mon Sep 17 00:00:00 2001 From: Valeriy Koval Date: Fri, 18 Mar 2016 18:50:05 +0200 Subject: [PATCH] Update linker flags for teensy platform --- platformio/boards/teensy.json | 6 +++--- platformio/builder/scripts/teensy.py | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/platformio/boards/teensy.json b/platformio/boards/teensy.json index dd4816ae..eba8eea1 100644 --- a/platformio/boards/teensy.json +++ b/platformio/boards/teensy.json @@ -36,7 +36,7 @@ "teensy30": { "build": { "core": "teensy3", - "extra_flags": "-D__MK20DX128__", + "extra_flags": "-D__MK20DX128__ -larm_cortexM4l_math", "f_cpu": "48000000L", "ldscript": "mk20dx128.ld", "mcu": "mk20dx128", @@ -56,7 +56,7 @@ "teensy31": { "build": { "core": "teensy3", - "extra_flags": "-D__MK20DX256__", + "extra_flags": "-D__MK20DX256__ -larm_cortexM4l_math", "f_cpu": "72000000L", "ldscript": "mk20dx256.ld", "mcu": "mk20dx256", @@ -76,7 +76,7 @@ "teensylc": { "build": { "core": "teensy3", - "extra_flags": "-D__MKL26Z64__", + "extra_flags": "-D__MKL26Z64__ -larm_cortexM0l_math", "f_cpu": "48000000L", "ldscript": "mkl26z64.ld", "mcu": "mkl26z64", diff --git a/platformio/builder/scripts/teensy.py b/platformio/builder/scripts/teensy.py index 310ad8d0..7f9b52c8 100644 --- a/platformio/builder/scripts/teensy.py +++ b/platformio/builder/scripts/teensy.py @@ -29,7 +29,9 @@ elif env.get("BOARD_OPTIONS", {}).get("build", {}).get("core") == "teensy3": SConscript(env.subst(join("$PIOBUILDER_DIR", "scripts", "basearm.py"))) env.Append( LINKFLAGS=[ - "-Wl,--defsym=__rtc_localtime=$UNIX_TIME" + "-Wl,--defsym=__rtc_localtime=$UNIX_TIME", + "-fsingle-precision-constant", + "--specs=nano.specs" ], CCFLAGS=[ "-fsingle-precision-constant"