-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
package.json
623 lines (623 loc) · 36 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
{
"name": "probe-rs-debugger",
"displayName": "Debugger for probe-rs",
"version": "0.24.2",
"publisher": "probe-rs",
"description": "probe-rs Debug Adapter for VS Code.",
"author": {
"name": "Jack Noppé",
"email": "noppej@hotmail.com"
},
"license": "(MIT OR Apache-2.0)",
"pricing": "Free",
"keywords": [
"probe-rs",
"rust",
"embedded",
"debug",
"Arm",
"ARM Cortex-M",
"ARM Cortex-A",
"Risc-v",
"RTT",
"SVD"
],
"engines": {
"vscode": ">=1.85.0"
},
"icon": "images/probe-rs-debugger.png",
"categories": [
"Debuggers"
],
"sponsor": {
"url": "https://github.com/sponsors/probe-rs"
},
"homepage": "https://probe.rs/",
"repository": {
"type": "git",
"url": "https://github.com/probe-rs/vscode.git"
},
"bugs": {
"url": "https://github.com/probe-rs/vscode/issues"
},
"publishConfig": {
"registry": "https://marketplace.visualstudio.com/"
},
"scripts": {
"probe-rs:getDebugProtocolLatest": "curl -LJs https://microsoft.github.io/debug-adapter-protocol/debugAdapterProtocol.json -o dap/debugProtocol.json",
"probe-rs:Update Dev Dependencies": "updates --update ./",
"package": "vsce package --no-yarn",
"vscode:prepublish": "rimraf dist && npm run -S build -- --minify",
"publish": "vsce publish --no-yarn --skip-duplicate",
"un-publish": "vsce unpublish",
"login": "vsce login probe-rs",
"run-prettier": "prettier --write .",
"pretest": "npm run compile && npm run lint && npm run typecheck && prettier --check .",
"compile": "tsc -p ./",
"lint": "eslint src --ext ts",
"typecheck": "tsc -p tsconfig.json --noEmit",
"watch": "npm run -S build -- --sourcemap --sources-content=false --watch",
"build": "esbuild ./src/extension.ts --bundle --tsconfig=./tsconfig.json --external:vscode --format=cjs --platform=node --outfile=dist/extension.js"
},
"devDependencies": {
"@types/mocha": "^10.0.6",
"@types/node": "^20.11.5",
"@types/vscode": "^1.85.0",
"@typescript-eslint/eslint-plugin": "^6.19.0",
"@typescript-eslint/parser": "^6.19.0",
"@vscode/debugadapter": "^1.64.0",
"@vscode/debugprotocol": "^1.64.0",
"@vscode/vsce": "^2.22.0",
"esbuild": "^0.19.11",
"eslint": "^8.56.0",
"get-port": "^7.0.0",
"glob": "^10.3.10",
"mocha": "^10.2.0",
"prettier": "3.2.4",
"rimraf": "^5.0.5",
"ts-loader": "^9.5.1",
"typescript": "^5.3.3",
"updates": "latest",
"webpack": "^5.89.0",
"webpack-cli": "^5.1.4"
},
"main": "./dist/extension.js",
"activationEvents": [
"onDebug",
"onStartupFinished"
],
"workspaceTrust": {
"request": "never"
},
"contributes": {
"breakpoints": [
{
"language": "rust"
},
{
"language": "c"
},
{
"language": "cpp"
},
{
"language": "asm"
}
],
"debuggers": [
{
"type": "probe-rs-debug",
"label": "probe-rs Debugger",
"languages": [
"rust",
"c"
],
"configurationAttributes": {
"launch": {
"required": [
"chip",
"coreConfigs"
],
"properties": {
"server": {
"type": "string",
"description": "Optionally connect to an existing `probe-rs dap-server` session on IP and Port, e.g. '127.0.0.1:50000'",
"default": "127.0.0.1:50000"
},
"logFile": {
"type": "string",
"description": "The path to the log file. This option is ignored if either the `server` or `runtimeArgs` is specified. If no location is specified, the behaviour depends on `--log-to-folder"
},
"logToFolder": {
"type": "boolean",
"description": "Enable logging to the default folder. This option is ignored if either the `logFile` or `runtimeArgs` is specified.`"
},
"consoleLogLevel": {
"type": "string",
"description": "The level of log info printed to the console. This does NOT affect the RUST_LOG defined in the `env` property.",
"enum": [
"Console",
"Info",
"Debug"
],
"enumDescriptions": [
"The console will only contain error messages and process status messages.",
"The console log will also contain high level information about interactions between the extension and the debug adapter.",
"The console log will also contain detailed information about interactions between the extension and the debug adapter."
],
"default": "Console"
},
"runtimeExecutable": {
"type": "string",
"description": "An OS resolvable path to the Probe-rs debugger executable.",
"default": "probe-rs"
},
"runtimeArgs": {
"type": "array",
"items": {
"type": "string"
},
"description": "String array of arguments to provide the startup arguments for the Probe-rs debugger executable.",
"default": [
"dap-server"
]
},
"env": {
"additionalProperties": {
"type": "string"
},
"default": {},
"description": "Environment variables defined as a key value pair. The 'key' is the name of the environment variable, and the 'value' is value of the environment variable.",
"type": "object"
},
"cwd": {
"type": "string",
"description": "The working directory of the debugger, typically the RUST crate root",
"default": "${workspaceFolder}"
},
"probe": {
"type": "string",
"description": "Use this flag to select a specific probe in the list. Use '--probe VID:PID' or '--probe VID:PID:Serial' if you have more than one probe with the same VID:PID."
},
"chip": {
"type": "string",
"description": "Please specify the appropriate chip from the list of supported chips reported by running `probe-rs chip list`."
},
"chipDescriptionPath": {
"type": "string",
"description": "Use this option to add custom target chips from a file."
},
"connectUnderReset": {
"type": "boolean",
"description": "This option will result in the target reset pin being held high during the attach operation.",
"default": false
},
"speed": {
"type": "number",
"description": "Specify the protocol speed in kHz."
},
"wireProtocol": {
"type": "string",
"description": "The correct wire protocol to use.",
"enum": [
"Swd",
"Jtag"
],
"enumDescriptions": [
"Use the Serial Wire Debug (SWD) protocol.",
"Use the Joint Test Action Group (JTAG) protocol."
]
},
"allowEraseAll": {
"type": "boolean",
"description": "Allow the session to erase all memory of the chip or reset it to factory default.",
"default": false
},
"flashingConfig": {
"type": "object",
"additionalProperties": false,
"description": "These options are applied when flashing one or more `program_binary` files to the target memory.",
"properties": {
"flashingEnabled": {
"type": "boolean",
"description": "Flash the target before debugging.",
"default": false
},
"haltAfterReset": {
"type": "boolean",
"description": "Halt all cores on the target after reset.",
"default": false
},
"fullChipErase": {
"type": "boolean",
"description": "Do a full chip erase, versus page-by-page erase.",
"default": false
},
"restoreUnwrittenBytes": {
"type": "boolean",
"description": "Restore erased bytes that will not be rewritten from ELF.",
"default": false
},
"formatOptions": {
"type": "object",
"additionalProperties": false,
"properties": {
"binaryFormat": {
"type": "string",
"description": "One of the supported binary formats probe-rs uses for flashing the target binary.",
"enum": [
"bin",
"hex",
"elf",
"idf"
],
"enumDescriptions": [
"The target binary file contains the verbatim contents of the flash.",
"The target binary file conforms with the [Intel HEX](https://en.wikipedia.org/wiki/Intel_HEX) format.",
"The target binary file conforms with the [ELF](https://en.wikipedia.org/wiki/Executable_and_Linkable_Format) format.",
"The target binary file conforms with the [ESP-IDF bootloader](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/system/app_image_format.html#app-image-structures) format"
],
"default": "elf"
},
"baseAddress": {
"type": "number",
"description": "The address in memory where the binary will be flashed to."
},
"skip": {
"type": "number",
"description": "The number of bytes to skip at the start of the binary file."
},
"idf_bootloader": {
"type": "string",
"description": "The path (relative to `cwd` or absolute) to the ESP-IDF bootloader."
},
"idf_partition_table": {
"type": "string",
"description": "The path (relative to `cwd` or absolute) to the ESP-IDF partition table."
}
}
}
}
},
"coreConfigs": {
"type": "array",
"description": "Each MCU core has a mandatory `programBinary` as well as several other optional properties.",
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"programBinary"
],
"properties": {
"coreIndex": {
"type": "number",
"description": "The zero based index of the MCU core for this session",
"default": 0
},
"programBinary": {
"type": "string",
"description": "The path (relative to `cwd` or absolute) to the binary for your target firmware"
},
"svdFile": {
"type": "string",
"description": "The path (relative to `cwd` or absolute) to the CMSIS-SVD file for your target core"
},
"rttEnabled": {
"type": "boolean",
"description": "If true, the debugger will open an RTT Terminal tab for each of the active channels on the target.",
"default": false
},
"rttChannelFormats": {
"type": "array",
"description": "RTT channel configuration. Unlisted active channels will be configured with `dataFormat=String', and 'showTimestamps=true'.",
"items": {
"type": "object",
"required": [
"channelNumber"
],
"properties": {
"channelNumber": {
"type": "number",
"description": "The channel number to which this data format applies."
},
"dataFormat": {
"type": "string",
"description": "One of the supported data formats for RTT channels.",
"enum": [
"String",
"BinaryLE",
"Defmt"
],
"enumDescriptions": [
"String (text) format.",
"Binary Little Endian format.",
"defmt (see: https://defmt.ferrous-systems.com)."
],
"default": "String"
},
"mode": {
"type": "string",
"description": "RTT operating mode.",
"enum": [
"NoBlockSkip",
"NoBlockTrim",
"BlockIfFull"
],
"enumDescriptions": [
"The target will add data to the channel only if it fits completely, otherwise it will skip the data.",
"The target will add as much data to the channel as possible, without blocking.",
"The target will block until there is enough space in the channel to add the data."
]
},
"showTimestamps": {
"type": "boolean",
"description": "Enable the inclusion of timestamps in the RTT output for `dataFormat=String`."
},
"showLocation": {
"type": "boolean",
"description": "Enable the inclusion of defmt location information in the RTT output for `dataFormat=Defmt`."
},
"logFormat": {
"type": "string",
"description": "The default format string to use for decoding defmt logs."
}
}
}
}
}
}
}
}
},
"attach": {
"required": [
"chip",
"coreConfigs"
],
"properties": {
"server": {
"type": "string",
"description": "Optionally connect to an existing `probe-rs dap-server` session on IP and Port, e.g. '127.0.0.1:50000'",
"default": "127.0.0.1:50000"
},
"logFile": {
"type": "string",
"description": "The path to the log file. This option is ignored if either the `server` or `runtimeArgs` is specified. If no location is specified, the behaviour depends on `--log-to-folder"
},
"logToFolder": {
"type": "boolean",
"description": "Enable logging to the default folder. This option is ignored if either the `logFile` or `runtimeArgs` is specified.`"
},
"consoleLogLevel": {
"type": "string",
"description": "The level of log info printed to the console. This does NOT affect the RUST_LOG defined in the `env` property.",
"enum": [
"Console",
"Info",
"Debug"
],
"enumDescriptions": [
"The console will only contain error messages and process status messages.",
"The console log will also contain high level information about interactions between the extension and the debug adapter.",
"The console log will also contain detailed information about interactions between the extension and the debug adapter."
],
"default": "Console"
},
"runtimeExecutable": {
"type": "string",
"description": "An OS resolvable path to the Probe-rs debugger executable.",
"default": "probe-rs"
},
"runtimeArgs": {
"type": "array",
"items": {
"type": "string"
},
"description": "String array of arguments to provide the startup arguments for the Probe-rs debugger executable.",
"default": [
"dap-server"
]
},
"env": {
"additionalProperties": {
"type": "string"
},
"default": {},
"description": "Environment variables defined as a key value pair. The 'key' is the name of the environment variable, and the 'value' is value of the environment variable.",
"type": "object"
},
"cwd": {
"type": "string",
"description": "The working directory of the debugger, typically the RUST crate root",
"default": "${workspaceFolder}"
},
"probe": {
"type": "string",
"description": "Use this flag to select a specific probe in the list. Use '--probe VID:PID' or '--probe VID:PID:Serial' if you have more than one probe with the same VID:PID."
},
"chip": {
"type": "string",
"description": "Please specify the appropriate chip from the list of supported chips reported by running `probe-rs chip list`."
},
"chipDescriptionPath": {
"type": "string",
"description": "Use this option to add custom target chips from a file."
},
"connectUnderReset": {
"type": "boolean",
"description": "This option will result in the target reset pin being held high during the attach operation.",
"default": false
},
"speed": {
"type": "number",
"description": "Specify the protocol speed in kHz."
},
"wireProtocol": {
"type": "string",
"description": "The correct wire protocol to use.",
"enum": [
"Swd",
"Jtag"
],
"enumDescriptions": [
"Use the Serial Wire Debug (SWD) protocol.",
"Use the Joint Test Action Group (JTAG) protocol."
]
},
"allowEraseAll": {
"type": "boolean",
"description": "Allow the session to erase all memory of the chip or reset it to factory default.",
"default": false
},
"coreConfigs": {
"type": "array",
"description": "Each MCU core has a mandatory `programBinary` as well as several other optional properties.",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"required": [
"programBinary"
],
"coreIndex": {
"type": "number",
"description": "The zero based index of the MCU core for this session",
"default": 0
},
"programBinary": {
"type": "string",
"description": "The path (relative to `cwd` or absolute) to the binary for your target firmware"
},
"svdFile": {
"type": "string",
"description": "The path (relative to `cwd` or absolute) to the CMSIS-SVD file for your target core"
},
"rttEnabled": {
"type": "boolean",
"description": "If true, the debugger will open an RTT Terminal tab for each of the active channels on the target.",
"default": false
},
"rttChannelFormats": {
"type": "array",
"description": "RTT channel configuration. Unlisted active channels will be configured with `dataFormat=String', and 'showTimestamps=true'.",
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"channelNumber"
],
"properties": {
"channelNumber": {
"type": "number",
"description": "The channel number to which this data format applies."
},
"dataFormat": {
"type": "string",
"description": "One of the supported data formats for RTT channels.",
"enum": [
"String",
"BinaryLE",
"Defmt"
],
"enumDescriptions": [
"String (text) format.",
"Binary Little Endian format.",
"defmt (see: https://defmt.ferrous-systems.com)."
],
"default": "String"
},
"mode": {
"type": "string",
"description": "RTT operating mode.",
"enum": [
"NoBlockSkip",
"NoBlockTrim",
"BlockIfFull"
],
"enumDescriptions": [
"The target will add data to the channel only if it fits completely, otherwise it will skip the data.",
"The target will add as much data to the channel as possible, without blocking.",
"The target will block until there is enough space in the channel to add the data."
]
},
"showTimestamps": {
"type": "boolean",
"description": "Enable the inclusion of timestamps in the RTT output for `dataFormat=String`."
},
"showLocation": {
"type": "boolean",
"description": "Enable the inclusion of defmt location information in the RTT output for `dataFormat=Defmt`."
},
"logFormat": {
"type": "string",
"description": "The default format string to use for decoding defmt logs."
}
}
}
}
}
}
}
}
}
},
"initialConfigurations": [
{
"type": "probe-rs-debug",
"request": "launch",
"name": "probe-rs Test",
"cwd": "${workspaceFolder}",
"connectUnderReset": true,
"chip": "STM32H745ZITx",
"flashingConfig": {
"flashingEnabled": true,
"haltAfterReset": true
},
"coreConfigs": [
{
"coreIndex": 0,
"programBinary": "./target/thumbv7em-none-eabihf/debug/${workspaceFolderBasename}"
}
]
}
],
"configurationSnippets": [
{
"label": "probe-rs Debug: Launch",
"description": "A new configuration for embedded debugging of a user selected rust file with probe-rs.",
"body": {
"type": "probe-rs-debug",
"request": "launch",
"name": "probe-rs Test",
"cwd": "${workspaceFolder}",
"connectUnderReset": false,
"chip": "STM32H745ZITx",
"flashingConfig": {
"flashingEnabled": true,
"haltAfterReset": true
},
"coreConfigs": [
{
"coreIndex": 0,
"programBinary": "./target/thumbv7em-none-eabihf/debug/${workspaceFolderBasename}"
}
]
}
}
]
}
],
"configuration": [
{
"title": "probe-rs Debugger",
"properties": {
"probe-rs-debugger.debuggerExecutable": {
"type": "string",
"markdownDescription": "Path to the `probe-rs` executable. If this is not set, the extension requires that `probe-rs` (or `probe-rs.exe`) is available on the system `PATH`.\n\nNote: Setting `runtimeExecutable` in 'launch.json' take precedence over this setting.",
"scope": "machine-overridable"
}
}
}
]
}
}