From 4724fc6f16a54ddb4e7655eabe4c414e20c26647 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Sat, 27 Oct 2018 01:13:11 +0300 Subject: [PATCH 1/7] Update Atmel AVR toolchain to 5.4.0 --- platform.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform.json b/platform.json index f0b4b6e..33d8c6e 100644 --- a/platform.json +++ b/platform.json @@ -31,7 +31,7 @@ "toolchain-atmelavr": { "type": "toolchain", "optional": false, - "version": "~1.40902.0" + "version": "~1.50400.0" }, "toolchain-gccarmnoneeabi": { "type": "toolchain", From 5941b9d65413d7307787b6f9772936f49b1f0482 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 19 Dec 2018 21:46:30 +0200 Subject: [PATCH 2/7] Fix invalid board identifiers for examples --- boards/teensy20.json | 23 ------------------- boards/teensy20pp.json | 23 ------------------- examples/arduino-blink/platformio.ini | 2 +- examples/arduino-hid-usb-mouse/platformio.ini | 2 +- examples/arduino-internal-libs/platformio.ini | 2 +- 5 files changed, 3 insertions(+), 49 deletions(-) delete mode 100644 boards/teensy20.json delete mode 100644 boards/teensy20pp.json diff --git a/boards/teensy20.json b/boards/teensy20.json deleted file mode 100644 index d8a137c..0000000 --- a/boards/teensy20.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "build": { - "core": "teensy", - "extra_flags": "-DARDUINO_ARCH_AVR -TEENSY2", - "f_cpu": "16000000L", - "mcu": "atmega32u4" - }, - "frameworks": [ - "arduino" - ], - "name": "Teensy 2.0", - "upload": { - "maximum_ram_size": 2560, - "maximum_size": 32256, - "protocol": "teensy-gui", - "protocols": [ - "teensy-cli", - "teensy-gui" - ] - }, - "url": "https://www.pjrc.com/store/teensy.html", - "vendor": "Teensy" -} diff --git a/boards/teensy20pp.json b/boards/teensy20pp.json deleted file mode 100644 index 51738d5..0000000 --- a/boards/teensy20pp.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "build": { - "core": "teensy", - "extra_flags": "-DTEENSY2PP", - "f_cpu": "16000000L", - "mcu": "at90usb1286" - }, - "frameworks": [ - "arduino" - ], - "name": "Teensy++ 2.0", - "upload": { - "maximum_ram_size": 8192, - "maximum_size": 130048, - "protocol": "teensy-gui", - "protocols": [ - "teensy-cli", - "teensy-gui" - ] - }, - "url": "https://www.pjrc.com/store/teensypp.html", - "vendor": "Teensy" -} diff --git a/examples/arduino-blink/platformio.ini b/examples/arduino-blink/platformio.ini index 34dae3c..cec4fcf 100644 --- a/examples/arduino-blink/platformio.ini +++ b/examples/arduino-blink/platformio.ini @@ -40,4 +40,4 @@ board = teensy35 [env:teensy36] platform = teensy framework = arduino -board = teensy35 +board = teensy36 diff --git a/examples/arduino-hid-usb-mouse/platformio.ini b/examples/arduino-hid-usb-mouse/platformio.ini index 4e584e9..1448187 100644 --- a/examples/arduino-hid-usb-mouse/platformio.ini +++ b/examples/arduino-hid-usb-mouse/platformio.ini @@ -46,5 +46,5 @@ build_flags = -DUSB_SERIAL_HID [env:teensy36] platform = teensy framework = arduino -board = teensy35 +board = teensy36 build_flags = -DUSB_SERIAL_HID diff --git a/examples/arduino-internal-libs/platformio.ini b/examples/arduino-internal-libs/platformio.ini index 274b091..c295f48 100644 --- a/examples/arduino-internal-libs/platformio.ini +++ b/examples/arduino-internal-libs/platformio.ini @@ -40,4 +40,4 @@ board = teensy35 [env:teensy36] platform = teensy framework = arduino -board = teensy35 +board = teensy36 From c46cfe2b0396f17d95677cf105d5327e4dac4e36 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 19 Dec 2018 21:47:11 +0200 Subject: [PATCH 3/7] Rename IDs for Teensy 2 --- boards/teensy2.json | 23 +++++++++++++++++++++++ boards/teensy2pp.json | 23 +++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 boards/teensy2.json create mode 100644 boards/teensy2pp.json diff --git a/boards/teensy2.json b/boards/teensy2.json new file mode 100644 index 0000000..d8a137c --- /dev/null +++ b/boards/teensy2.json @@ -0,0 +1,23 @@ +{ + "build": { + "core": "teensy", + "extra_flags": "-DARDUINO_ARCH_AVR -TEENSY2", + "f_cpu": "16000000L", + "mcu": "atmega32u4" + }, + "frameworks": [ + "arduino" + ], + "name": "Teensy 2.0", + "upload": { + "maximum_ram_size": 2560, + "maximum_size": 32256, + "protocol": "teensy-gui", + "protocols": [ + "teensy-cli", + "teensy-gui" + ] + }, + "url": "https://www.pjrc.com/store/teensy.html", + "vendor": "Teensy" +} diff --git a/boards/teensy2pp.json b/boards/teensy2pp.json new file mode 100644 index 0000000..51738d5 --- /dev/null +++ b/boards/teensy2pp.json @@ -0,0 +1,23 @@ +{ + "build": { + "core": "teensy", + "extra_flags": "-DTEENSY2PP", + "f_cpu": "16000000L", + "mcu": "at90usb1286" + }, + "frameworks": [ + "arduino" + ], + "name": "Teensy++ 2.0", + "upload": { + "maximum_ram_size": 8192, + "maximum_size": 130048, + "protocol": "teensy-gui", + "protocols": [ + "teensy-cli", + "teensy-gui" + ] + }, + "url": "https://www.pjrc.com/store/teensypp.html", + "vendor": "Teensy" +} From cab465bd3f79ab37cc93f1259ce00190b07fe9bc Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 19 Dec 2018 21:49:15 +0200 Subject: [PATCH 4/7] Switch to built-in rebooter in "teensy_post_compile" script // Resolve #41 --- builder/main.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/builder/main.py b/builder/main.py index d000021..b46dba3 100644 --- a/builder/main.py +++ b/builder/main.py @@ -22,6 +22,7 @@ env = DefaultEnvironment() platform = env.PioPlatform() +board_config = env.BoardConfig() env.Replace( ARFLAGS=["rc"], @@ -37,7 +38,7 @@ if env.get("PROGNAME", "program") == "program": env.Replace(PROGNAME="firmware") -if "BOARD" in env and env.BoardConfig().get("build.core") == "teensy": +if "BOARD" in env and board_config.get("build.core") == "teensy": env.Replace( AR="avr-ar", AS="avr-as", @@ -87,7 +88,7 @@ if not env.get("PIOFRAMEWORK"): env.SConscript("frameworks/_bare_avr.py") -elif "BOARD" in env and env.BoardConfig().get("build.core") == "teensy3": +elif "BOARD" in env and board_config.get("build.core") == "teensy3": env.Replace( AR="arm-none-eabi-ar", AS="arm-none-eabi-as", @@ -185,7 +186,7 @@ def _jlink_cmd_script(env, source): __jlink_cmd_script=_jlink_cmd_script, UPLOADER="JLink.exe" if system() == "Windows" else "JLinkExe", UPLOADERFLAGS=[ - "-device", env.BoardConfig().get("debug", {}).get("jlink_device"), + "-device", board_config.get("debug", {}).get("jlink_device"), "-speed", "4000", "-if", ("jtag" if upload_protocol == "jlink-jtag" else "swd"), "-autoconnect", "1" @@ -213,18 +214,16 @@ def _jlink_cmd_script(env, source): elif upload_protocol == "teensy-gui": env.Replace( - REBOOTER="teensy_reboot", UPLOADER="teensy_post_compile", UPLOADERFLAGS=[ "-file=${PROGNAME}", '-path="$BUILD_DIR"', - '-tools=%s' % (platform.get_package_dir("tool-teensy") or "") + "-tools=%s" % (platform.get_package_dir("tool-teensy") or ""), + "-board=%s" % board_config.id.upper(), + "-reboot" ], UPLOADCMD="$UPLOADER $UPLOADERFLAGS" ) - upload_actions = [ - env.VerboseAction("$UPLOADCMD", "Uploading $SOURCE"), - env.VerboseAction("$REBOOTER", "Rebooting...") - ] + upload_actions = [env.VerboseAction("$UPLOADCMD", "Uploading $SOURCE")] # custom upload tool elif "UPLOADCMD" in env: From aaeb6426718a57a61fead8a306ca3c07617cd7dc Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 20 Dec 2018 00:09:17 +0200 Subject: [PATCH 5/7] Rename IDs for Teensy 2 --- examples/arduino-blink/platformio.ini | 8 ++++---- examples/arduino-hid-usb-mouse/platformio.ini | 8 ++++---- examples/arduino-internal-libs/platformio.ini | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/examples/arduino-blink/platformio.ini b/examples/arduino-blink/platformio.ini index cec4fcf..252b3bc 100644 --- a/examples/arduino-blink/platformio.ini +++ b/examples/arduino-blink/platformio.ini @@ -7,15 +7,15 @@ ; Please visit documentation for the other options and examples ; http://docs.platformio.org/page/projectconf.html -[env:teensy20] +[env:teensy2] platform = teensy framework = arduino -board = teensy20 +board = teensy2 -[env:teensy 20pp] +[env:teensy 2pp] platform = teensy framework = arduino -board = teensy20pp +board = teensy2pp [env:teensy30] platform = teensy diff --git a/examples/arduino-hid-usb-mouse/platformio.ini b/examples/arduino-hid-usb-mouse/platformio.ini index 1448187..60ac270 100644 --- a/examples/arduino-hid-usb-mouse/platformio.ini +++ b/examples/arduino-hid-usb-mouse/platformio.ini @@ -7,16 +7,16 @@ ; Please visit documentation for the other options and examples ; http://docs.platformio.org/page/projectconf.html -[env:teensy20] +[env:teensy2] platform = teensy framework = arduino -board = teensy20 +board = teensy2 build_flags = -DUSB_SERIAL_HID -[env:teensy20pp] +[env:teensy2pp] platform = teensy framework = arduino -board = teensy20pp +board = teensy2pp build_flags = -DUSB_SERIAL_HID [env:teensy30] diff --git a/examples/arduino-internal-libs/platformio.ini b/examples/arduino-internal-libs/platformio.ini index c295f48..de4ce55 100644 --- a/examples/arduino-internal-libs/platformio.ini +++ b/examples/arduino-internal-libs/platformio.ini @@ -7,15 +7,15 @@ ; Please visit documentation for the other options and examples ; http://docs.platformio.org/page/projectconf.html -[env:teensy20] +[env:teensy2] platform = teensy framework = arduino -board = teensy20 +board = teensy2 -[env:teensy20pp] +[env:teensy2pp] platform = teensy framework = arduino -board = teensy20pp +board = teensy2pp [env:teensy30] platform = teensy From cb99553b5e6050e3f513e132bf6704270938ccf2 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 20 Dec 2018 01:27:14 +0200 Subject: [PATCH 6/7] Update Teensyduino to 1.45 --- platform.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform.json b/platform.json index 33d8c6e..852c690 100644 --- a/platform.json +++ b/platform.json @@ -41,7 +41,7 @@ "framework-arduinoteensy": { "type": "framework", "optional": true, - "version": "~1.144.0" + "version": "~1.145.0" }, "framework-mbed": { "type": "framework", From a23c1b8a773ae49deb8dd1c33f18f3490d32a00d Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 20 Dec 2018 19:07:39 +0200 Subject: [PATCH 7/7] Bump version to 3.7.0 --- platform.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform.json b/platform.json index 852c690..8a3d94d 100644 --- a/platform.json +++ b/platform.json @@ -12,7 +12,7 @@ "type": "git", "url": "https://github.com/platformio/platform-teensy.git" }, - "version": "3.6.0", + "version": "3.7.0", "packageRepositories": [ "https://dl.bintray.com/platformio/dl-packages/manifest.json", "http://dl.platformio.org/packages/manifest.json"