diff --git a/platformio/boards/teensy.json b/platformio/boards/teensy.json index 23e30817..b1882bc9 100644 --- a/platformio/boards/teensy.json +++ b/platformio/boards/teensy.json @@ -1,10 +1,9 @@ { - "teensy2": { + "teensy20": { "build": { "core": "teensy", "f_cpu": "16000000L", - "mcu": "atmega32u4", - "variant": "teensy2" + "mcu": "atmega32u4" }, "name": "Teensy 2.0", "platform": "teensy", @@ -14,14 +13,13 @@ } }, - "teensypp2": { + "teensy20pp": { "build": { "core": "teensy", "f_cpu": "16000000L", - "mcu": "at90usb1286", - "variant": "teensypp2" + "mcu": "at90usb1286" }, - "name": "Teensy 2.0", + "name": "Teensy++ 2.0", "platform": "teensy", "upload": { "maximum_ram_size": 8192, @@ -35,8 +33,7 @@ "extra_flags": "-D__MK20DX128__", "f_cpu": "48000000L", "ldscript": "mk20dx128.ld", - "mcu": "mk20dx128", - "variant": "teensy30" + "mcu": "mk20dx128" }, "name": "Teensy 3.0", "platform": "teensy", @@ -52,8 +49,7 @@ "extra_flags": "-D__MK20DX256__", "f_cpu": "72000000L", "ldscript": "mk20dx256.ld", - "mcu": "mk20dx256", - "variant": "teensy31" + "mcu": "mk20dx256" }, "name": "Teensy 3.1", "platform": "teensy", @@ -62,4 +58,4 @@ "maximum_size": 262144 } } -} \ No newline at end of file +} diff --git a/platformio/builder/scripts/frameworks/arduino.py b/platformio/builder/scripts/frameworks/arduino.py index 2ea76556..c99ae9a6 100644 --- a/platformio/builder/scripts/frameworks/arduino.py +++ b/platformio/builder/scripts/frameworks/arduino.py @@ -2,7 +2,7 @@ # See LICENSE for details. """ - Build script for Android Framework (based on Wiring). + Build script for Arduino Framework (based on Wiring). """ from os import listdir diff --git a/platformio/builder/scripts/teensy.py b/platformio/builder/scripts/teensy.py index 42446526..11d391e5 100644 --- a/platformio/builder/scripts/teensy.py +++ b/platformio/builder/scripts/teensy.py @@ -5,7 +5,9 @@ Builder for Teensy boards """ +import time from os.path import isfile, join +from random import randint from SCons.Script import (COMMAND_LINE_TARGETS, AlwaysBuild, Builder, Default, DefaultEnvironment) @@ -32,7 +34,7 @@ if env.get("BOARD_OPTIONS", {}).get("build", {}).get("core") == "teensy": ], CPPDEFINES=[ - "SERIALNUM=-1164905212" # ????? + "SERIALNUM=-%d" % randint(1000000000, 2000000000) ], LINKFLAGS=[ @@ -71,7 +73,7 @@ elif env.get("BOARD_OPTIONS", {}).get("build", {}).get("core") == "teensy3": ], CPPDEFINES=[ - "TIME_T=1423046159" # @TODO + "TIME_T=%d" % time.time() ], LINKFLAGS=[