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 d8909c9 + b148632 commit ba6844a
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-nxplpc.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 @@ -42,6 +42,11 @@
"type": "debugger",
"optional": true,
"version": "~0.801.0"
},
"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 @@ -31,6 +31,21 @@ def configure_default_packages(self, variables, targets):
if upload_protocol == "cmsis-dap":
self.packages['tool-pyocd']['type'] = "uploader"

# 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 Down Expand Up @@ -66,6 +81,7 @@ def _add_default_debug_tools(self, board):
"Missed J-Link Device ID for %s" % board.id)
debug['tools'][link] = {
"server": {
"package": "tool-jlink",
"arguments": [
"-singlerun",
"-if", "SWD",
Expand Down

0 comments on commit ba6844a

Please sign in to comment.