Skip to content

Commit 8c20aeb

Browse files
authored
add chipDescriptionPath support for probe-rs
read chipDescriptionPath from flashercfg,import to dbgCfg
1 parent 584d492 commit 8c20aeb

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

src/extension.ts

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

0 commit comments

Comments
 (0)