diff --git a/examples/teensy/teensy-internal-libs/platformio.ini b/examples/teensy/teensy-internal-libs/platformio.ini index ced3cf02..18ce5b16 100644 --- a/examples/teensy/teensy-internal-libs/platformio.ini +++ b/examples/teensy/teensy-internal-libs/platformio.ini @@ -40,3 +40,9 @@ platform = teensy framework = arduino board = teensy31 build_flags = -DTEENSY31 + +[env:teensylc] +platform = teensy +framework = arduino +board = teensylc +build_flags = -DTEENSYLC diff --git a/platformio/boards/teensy.json b/platformio/boards/teensy.json index bb3b4a88..c0e39961 100644 --- a/platformio/boards/teensy.json +++ b/platformio/boards/teensy.json @@ -71,5 +71,25 @@ }, "url": "https://www.pjrc.com/store/teensy31.html", "vendor": "Teensy" + }, + + "teensylc": { + "build": { + "core": "teensy3", + "extra_flags": "-D__MKL26Z64__", + "f_cpu": "48000000L", + "ldscript": "mkl26z64.ld", + "mcu": "mkl26z64", + "cpu": "cortex-m0plus" + }, + "frameworks": ["arduino"], + "name": "Teensy LC", + "platform": "teensy", + "upload": { + "maximum_ram_size": 8192, + "maximum_size": 63488 + }, + "url": "http://www.pjrc.com/teensy/teensyLC.html", + "vendor": "Teensy" } } diff --git a/platformio/builder/scripts/teensy.py b/platformio/builder/scripts/teensy.py index 140fa8fd..4d97a54e 100644 --- a/platformio/builder/scripts/teensy.py +++ b/platformio/builder/scripts/teensy.py @@ -26,7 +26,14 @@ env.Append( CXXFLAGS=[ "-std=gnu++0x", "-felide-constructors" - ] + ], + + LINKFLAGS=[ + "-Wl,--gc-sections,--relax,--defsym=__rtc_localtime=$UNIX_TIME", + "--specs=nano.specs" + ], + + LIBS=["m"] ) if isfile(env.subst(join(