Skip to content

Commit 0e79c17

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents cfd9594 + 459aa77 commit 0e79c17

9 files changed

Lines changed: 99 additions & 102 deletions

File tree

.github/workflows/main.yaml

Lines changed: 50 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -2,60 +2,72 @@ name: CI
22

33
on:
44
push:
5-
branches: [ master ]
5+
branches: [master]
66
pull_request:
7-
branches: [ master ]
7+
branches: [master]
88

99
jobs:
1010
setup:
1111
name: Setup
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v3
15-
- name: Cache NPM Install
16-
id: cache-npm
17-
uses: actions/cache@v3
18-
with:
19-
path: ./node_modules
20-
key: npm-${{ hashFiles('./package-lock.json') }}
21-
- name: Install NPM dependencies
22-
if: steps.cache-npm.outputs.cache-hit != 'true'
23-
run: |
24-
npm install
14+
- uses: actions/checkout@v3
15+
- name: Setup Node.js
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: "22"
19+
- name: Cache NPM Install
20+
id: cache-npm
21+
uses: actions/cache@v3
22+
with:
23+
path: ./node_modules
24+
key: npm-${{ hashFiles('./package-lock.json') }}
25+
- name: Install NPM dependencies
26+
if: steps.cache-npm.outputs.cache-hit != 'true'
27+
run: |
28+
npm install
2529
2630
build:
2731
name: Build
2832
needs: setup
2933
runs-on: ubuntu-latest
3034
steps:
31-
- uses: actions/checkout@v3
32-
- name: Load NPM install
33-
id: cache-npm
34-
uses: actions/cache@v3
35-
with:
36-
path: ./node_modules
37-
key: npm-${{ hashFiles('./package-lock.json') }}
38-
- name: Install VSCE for packaging
39-
run: npm install vsce
40-
- name: Package Binary
41-
run: ./node_modules/vsce/vsce package -o cortex-debug.vsix
42-
- name: Upload Artifact
43-
uses: actions/upload-artifact@v4
44-
with:
45-
name: cortex-debug.vsix
46-
path: ./cortex-debug.vsix
35+
- uses: actions/checkout@v3
36+
- name: Setup Node.js
37+
uses: actions/setup-node@v4
38+
with:
39+
node-version: "22"
40+
- name: Load NPM install
41+
id: cache-npm
42+
uses: actions/cache@v3
43+
with:
44+
path: ./node_modules
45+
key: npm-${{ hashFiles('./package-lock.json') }}
46+
- name: Install VSCE for packaging
47+
run: npm install vsce
48+
- name: Package Binary
49+
run: ./node_modules/vsce/vsce package -o cortex-debug.vsix
50+
- name: Upload Artifact
51+
uses: actions/upload-artifact@v4
52+
with:
53+
name: cortex-debug.vsix
54+
path: ./cortex-debug.vsix
4755

4856
lint:
4957
name: Lint
5058
needs: setup
5159
runs-on: ubuntu-latest
5260
steps:
53-
- uses: actions/checkout@v3
54-
- name: Load NPM install
55-
id: cache-npm
56-
uses: actions/cache@v3
57-
with:
58-
path: ./node_modules
59-
key: npm-${{ hashFiles('./package-lock.json') }}
60-
- name: Lint Project
61-
run: npm run lint
61+
- uses: actions/checkout@v3
62+
- name: Setup Node.js
63+
uses: actions/setup-node@v4
64+
with:
65+
node-version: "22"
66+
- name: Load NPM install
67+
id: cache-npm
68+
uses: actions/cache@v3
69+
with:
70+
path: ./node_modules
71+
key: npm-${{ hashFiles('./package-lock.json') }}
72+
- name: Lint Project
73+
run: npm run lint

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ This is a major release. It has been in pre-release for quite a while and some o
231231
* You can also use **Microsoft Embedded Tools** and their RTOS views as we are now compatible with each other
232232
* Microsoft Embedded Tools also added compatibility for Cortex-Debug for their version of Peripheral Views/Registers. They also helped with integrating Cortex-Debug with MS built-in Hex-Editor. To use MS Peripheral View, use `svdPath` in launch.json. `svdFile` uses the SVD feature from Cortex-Debug. You can use both at the same time if you wish but you should typically use only one.
233233
* Fixed a long standing issue with OpenOCD RTT where there was no good way to know when to start the RTT. We can now poll until RTT is detected and enabled. See `rttConfig.rtt_start_retry` in your launch.json to control who the polling works.
234-
* Support for loading alternate symbol files instead of the `"executable"` using a new launch.json property `"symbolFiles"`. See the Wiki [documentation here](https://github.com/Marus/cortex-debug/wiki/Overview#debug-files). This is in addition to the already existing `"loadFiles"` which is used to customizing the programming of the device
234+
* Support for loading alternate symbol files instead of the `"executable"` using a new launch.json property `"symbolFiles"`. See the Wiki [documentation here](https://github.com/Marus/cortex-debug/wiki/Cortex-Debug-Under-the-hood#debug-files). This is in addition to the already existing `"loadFiles"` which is used to customizing the programming of the device
235235
* You can now use `breakAfterReset` and `runToEntryPoint` for an `attach` type launch configuration as well but they will only be used on a reset/restart.
236236
* For chained configuration, the parent can override properties of children and/or allow children to inherit from itself using `overrides` and `inherits`.
237237
* Of course, many issues fixed: thanks to the community with reporting them helping fixing them
@@ -265,7 +265,7 @@ This is a major release. It has been in pre-release for quite a while and some o
265265
# V1.5.1
266266

267267
## New features
268-
* Support for loading alternate symbol files instead of the `"executable"` using a new launch.json property `"symbolFiles"`. See the Wiki [documentation here](https://github.com/Marus/cortex-debug/wiki/Overview#debug-files). This is in addition to the already existing `"loadFiles"` which is used to customizing the programming of the device
268+
* Support for loading alternate symbol files instead of the `"executable"` using a new launch.json property `"symbolFiles"`. See the Wiki [documentation here](https://github.com/Marus/cortex-debug/wiki/Cortex-Debug-Under-the-hood#debug-files). This is in addition to the already existing `"loadFiles"` which is used to customizing the programming of the device
269269
* You can now use `breakAfterReset` and `runToEntryPoint` for an `attach` type launch configuration as well but they will only be used on a reset/restart.
270270
* For chained configuration, the parent can override properties of children and/or allow children to inherit from itself using `overrides` and `inherits`.
271271

debug_attributes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ If the type is marked as `{...}` it means that it is a complex item can have mul
101101
| swoConfig<br>.swoEncoding | string | Both | BMP only: SWO encoding data used at the line level. Depends on the probe hardware, native (the original one) supports only Manchester (self-clocked, but slower rates) while most other platforms (e.g. ST-LINK with BMP firmware) support only UART (frequency/baud rate has to match to within ~2%). |
102102
| swoConfig<br>.swoFrequency | number | Both | SWO frequency in Hz. |
103103
| swoConfig<br>.swoPath | string | Both | Path name when source is "file" or "serial", device name regex match when source is "probe" for BMP. Typically a /path-name or a serial-port-name |
104-
| swoConfig<br>.swoPort | string | Both | When server is "external" && source is "socket", port to connect to. Format [host:]port. For BMP, specifies the regex match of the USB interface contianing raw SWO data. |
105-
| symbolFiles | object[] | Both | Array of ELF files to load symbols from instead of the executable file. Each item in the array cab be a string or an object. Program information is ignored (see `loadFiles`). Can be an empty list to specify none. If this property does not exist, then the executable is used for symbols |
104+
| swoConfig<br>.swoPort | string | Both | When server is "external" && source is "socket", port to connect to. Format [host:]port. For BMP, specifies the regex match of the USB interface containing raw SWO data. |
105+
| symbolFiles | object[] | Both | Array of ELF files to load symbols from instead of the executable file. Each item in the array can be a string or an object. Program information is ignored (see `loadFiles`). Can be an empty list to specify none. If this property does not exist, then the executable is used for symbols |
106106
| targetId | string &#124; number | Both | On BMP this is the ID number that should be passed to the attach command (defaults to 1); for PyOCD this is the target identifier (only needed for custom hardware) |
107107
| targetProcessor | number | Both | The processor you want to debug. Zero based integer index. Must be less than 'numberOfProcessors' |
108108
| toolchainPrefix | string | Both | This setting can be used to override the toolchainPrefix user setting for a particular launch configuration. Default = "arm-none-eabi" |

package-lock.json

Lines changed: 27 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -722,7 +722,7 @@
722722
"type": "string"
723723
},
724724
"symbolFiles": {
725-
"description": "Array of ELF files to load symbols from instead of the executable file. Each item in the array cab be a string or an object. Program information is ignored (see `loadFiles`). Can be an empty list to specify none. If this property does not exist, then the executable is used for symbols",
725+
"description": "Array of ELF files to load symbols from instead of the executable file. Each item in the array can be a string or an object. Program information is ignored (see `loadFiles`). Can be an empty list to specify none. If this property does not exist, then the executable is used for symbols",
726726
"type": "array",
727727
"items": {
728728
"type": [
@@ -1924,7 +1924,7 @@
19241924
"default": null
19251925
},
19261926
"symbolFiles": {
1927-
"description": "Array of ELF files to load symbols from instead of the executable file. Each item in the array cab be a string or an object. Program information is ignored (see `loadFiles`). Can be an empty list to specify none. If this property does not exist, then the executable is used for symbols",
1927+
"description": "Array of ELF files to load symbols from instead of the executable file. Each item in the array can be a string or an object. Program information is ignored (see `loadFiles`). Can be an empty list to specify none. If this property does not exist, then the executable is used for symbols",
19281928
"type": "array",
19291929
"items": {
19301930
"type": [
@@ -2680,7 +2680,7 @@
26802680
"swoPort": {
26812681
"type": "string",
26822682
"default": "",
2683-
"description": "When server is \"external\" && source is \"socket\", port to connect to. Format [host:]port. For BMP, specifies the regex match of the USB interface contianing raw SWO data."
2683+
"description": "When server is \"external\" && source is \"socket\", port to connect to. Format [host:]port. For BMP, specifies the regex match of the USB interface containing raw SWO data."
26842684
},
26852685
"decoders": {
26862686
"description": "SWO Decoder Configuration",
@@ -3232,7 +3232,7 @@
32323232
"devDependencies": {
32333233
"@stylistic/eslint-plugin": "^2.13.0",
32343234
"@types/mocha": "^10.0.10",
3235-
"@types/node": "16.x",
3235+
"@types/node": "22.x",
32363236
"@types/vscode": "^1.69.0",
32373237
"@vscode/debugadapter": "^1.68.0",
32383238
"@vscode/debugprotocol": "^1.68.0",

src/backend/mi2/mi2.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ export class MI2 extends EventEmitter implements IBackend {
9696
reject(new Error('Could not start gdb, no response from gdb'));
9797
}, 10);
9898
timeout = undefined;
99-
}, 5000);
99+
}, 10 * 1000);
100100

101101
const swallOutput = this.debugOutput ? false : true;
102102
let v;
@@ -756,14 +756,13 @@ export class MI2 extends EventEmitter implements IBackend {
756756
breakpoint.number = bkptNum;
757757

758758
if (breakpoint.condition) {
759-
this.setBreakPointCondition(bkptNum, breakpoint.condition).then((result) => {
759+
Promise.resolve(this.setBreakPointCondition(bkptNum, breakpoint.condition)).then((result) => {
760760
if (result.resultRecords.resultClass === 'done') {
761761
resolve(breakpoint);
762762
} else {
763763
reject(new MIError(result.result('msg') || 'Internal error', 'Setting breakpoint condition'));
764764
}
765-
},
766-
(reason) => {
765+
}).catch((reason) => {
767766
// Just delete the breakpoint we just created as the condition creation failed
768767
this.sendCommand(`break-delete ${bkptNum}`).then((x) => { }, (e) => { });
769768
reject(reason); // Use this reason as reason for failing to create the breakpoint

src/frontend/swo/sources/fifo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export class FifoSWOSource extends EventEmitter implements SWORTTSource {
1212
this.stream.on('data', (buffer) => {
1313
this.emit('data', buffer);
1414
});
15-
this.stream.on('close', (buffer) => {
15+
this.stream.on('close', () => {
1616
this.emit('disconnected');
1717
});
1818
this.connected = true;

0 commit comments

Comments
 (0)