Skip to content

Commit 0cb011c

Browse files
authored
Merge pull request #499 from musicwei/dev
add chipDescriptionPath support for probe-rs
2 parents 170c6db + 34da2de commit 0cb011c

2 files changed

Lines changed: 13 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ All notable version changes will be recorded in this file.
114114
**Improve**:
115115
- `GNU Arm Toolchain`: Support new mcpu: `cortex-m52, cortex-m55, cortex-m85`.
116116
- `unify_builder`: Optimize builder speed.
117+
117118
- `File Options`: Add memory assignment feature for `AC5`, `AC6` toolchain. Thanks the contributor [Deadline039](https://github.com/Deadline039)
118119
- `File Options GUI`: Update the translation text. Optimize layout.
119120
- `DebugConfig Generator GUI`: Change gui element width. Sort the option result list.

src/extension.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2203,6 +2203,18 @@ class ExternalDebugConfigProvider implements vscode.DebugConfigurationProvider {
22032203
if (m && m.length > 1) {
22042204
dbgCfg['probe'] = m[1];
22052205
}
2206+
// parse '--chip-description-path <path>' (support quoted path)
2207+
// examples:
2208+
// --chip-description-path /path/to/desc.yaml
2209+
// --chip-description-path "/path/with spaces/desc.yaml"
2210+
m = /--chip-description-path\s+("[^"]+"|[^\s]+)/.exec(flasherCfg.otherOptions);
2211+
if (m && m.length > 1) {
2212+
let p = m[1];
2213+
// strip surrounding quotes if present
2214+
if (p.startsWith('"') && p.endsWith('"'))
2215+
p = p.substring(1, p.length - 1);
2216+
dbgCfg['chipDescriptionPath'] = p;
2217+
}
22062218
}
22072219
result.push(dbgCfg);
22082220
result.push(newAttachDebugCfg(dbgCfg));

0 commit comments

Comments
 (0)