Skip to content

Commit ba6844a

Browse files
committed
Merge branch 'release/v3.3.2'
2 parents d8909c9 + b148632 commit ba6844a

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

platform.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"type": "git",
1313
"url": "https://github.com/platformio/platform-nxplpc.git"
1414
},
15-
"version": "3.3.1",
15+
"version": "3.3.2",
1616
"packageRepositories": [
1717
"https://dl.bintray.com/platformio/dl-packages/manifest.json",
1818
"http://dl.platformio.org/packages/manifest.json"
@@ -42,6 +42,11 @@
4242
"type": "debugger",
4343
"optional": true,
4444
"version": "~0.801.0"
45+
},
46+
"tool-jlink": {
47+
"type": "uploader",
48+
"optional": true,
49+
"version": "^1.63208.0"
4550
}
4651
}
4752
}

platform.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,21 @@ def configure_default_packages(self, variables, targets):
3131
if upload_protocol == "cmsis-dap":
3232
self.packages['tool-pyocd']['type'] = "uploader"
3333

34+
# configure J-LINK tool
35+
jlink_conds = [
36+
"jlink" in variables.get(option, "")
37+
for option in ("upload_protocol", "debug_tool")
38+
]
39+
if variables.get("board"):
40+
board_config = self.board_config(variables.get("board"))
41+
jlink_conds.extend([
42+
"jlink" in board_config.get(key, "")
43+
for key in ("debug.default_tools", "upload.protocol")
44+
])
45+
jlink_pkgname = "tool-jlink"
46+
if not any(jlink_conds) and jlink_pkgname in self.packages:
47+
del self.packages[jlink_pkgname]
48+
3449
return PlatformBase.configure_default_packages(self, variables,
3550
targets)
3651

@@ -66,6 +81,7 @@ def _add_default_debug_tools(self, board):
6681
"Missed J-Link Device ID for %s" % board.id)
6782
debug['tools'][link] = {
6883
"server": {
84+
"package": "tool-jlink",
6985
"arguments": [
7086
"-singlerun",
7187
"-if", "SWD",

0 commit comments

Comments
 (0)