Skip to content

Commit

Permalink
Merge pull request platformio#5 from platformio/develop
Browse files Browse the repository at this point in the history
merge upstream
  • Loading branch information
tsandmann authored Dec 20, 2018
2 parents 8c5c1a8 + 0f96aff commit dd6c855
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 27 deletions.
File renamed without changes.
File renamed without changes.
17 changes: 8 additions & 9 deletions builder/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

env = DefaultEnvironment()
platform = env.PioPlatform()
board_config = env.BoardConfig()

env.Replace(
ARFLAGS=["rc"],
Expand All @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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:
Expand Down
10 changes: 5 additions & 5 deletions examples/arduino-blink/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -40,4 +40,4 @@ board = teensy35
[env:teensy36]
platform = teensy
framework = arduino
board = teensy35
board = teensy36
10 changes: 5 additions & 5 deletions examples/arduino-hid-usb-mouse/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -46,5 +46,5 @@ build_flags = -DUSB_SERIAL_HID
[env:teensy36]
platform = teensy
framework = arduino
board = teensy35
board = teensy36
build_flags = -DUSB_SERIAL_HID
10 changes: 5 additions & 5 deletions examples/arduino-internal-libs/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -40,4 +40,4 @@ board = teensy35
[env:teensy36]
platform = teensy
framework = arduino
board = teensy35
board = teensy36
6 changes: 3 additions & 3 deletions platform.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -31,7 +31,7 @@
"toolchain-atmelavr": {
"type": "toolchain",
"optional": false,
"version": "~1.40902.0"
"version": "~1.50400.0"
},
"toolchain-gccarmnoneeabi": {
"type": "toolchain",
Expand All @@ -41,7 +41,7 @@
"framework-arduinoteensy": {
"type": "framework",
"optional": true,
"version": "~1.144.0"
"version": "~1.145.0"
},
"framework-mbed": {
"type": "framework",
Expand Down

0 comments on commit dd6c855

Please sign in to comment.