Skip to content

Commit

Permalink
Merge branch 'release/v3.3.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
ivankravets committed Jul 17, 2018
2 parents 8908774 + 773ab73 commit 37e92fc
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
7 changes: 6 additions & 1 deletion 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.3.1",
"version": "3.3.2",
"packageRepositories": [
"https://dl.bintray.com/platformio/dl-packages/manifest.json",
"http://dl.platformio.org/packages/manifest.json"
Expand Down Expand Up @@ -52,6 +52,11 @@
"type": "uploader",
"optional": true,
"version": "<2"
},
"tool-jlink": {
"type": "uploader",
"optional": true,
"version": "^1.63208.0"
}
}
}
16 changes: 16 additions & 0 deletions platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,21 @@ def configure_default_packages(self, variables, targets):
self.packages["toolchain-gccarmnoneeabi"][
'version'] = ">=1.60301.0"

# configure J-LINK tool
jlink_conds = [
"jlink" in variables.get(option, "")
for option in ("upload_protocol", "debug_tool")
]
if variables.get("board"):
board_config = self.board_config(variables.get("board"))
jlink_conds.extend([
"jlink" in board_config.get(key, "")
for key in ("debug.default_tools", "upload.protocol")
])
jlink_pkgname = "tool-jlink"
if not any(jlink_conds) and jlink_pkgname in self.packages:
del self.packages[jlink_pkgname]

return PlatformBase.configure_default_packages(
self, variables, targets)

Expand All @@ -58,6 +73,7 @@ def _add_default_debug_tools(self, board):
"Missed J-Link Device ID for %s" % board.id)
debug['tools']['jlink'] = {
"server": {
"package": "tool-jlink",
"arguments": [
"-singlerun",
"-if", "SWD",
Expand Down

0 comments on commit 37e92fc

Please sign in to comment.