diff --git a/debug_attributes.md b/debug_attributes.md index e6a326e9..af8eb0a5 100644 --- a/debug_attributes.md +++ b/debug_attributes.md @@ -52,6 +52,7 @@ If the type is marked as `{...}` it means that it is a complex item can have mul | machine | string | Both | Machine Type Selection - used for QEMU server type | | numberOfProcessors | number | Both | Number of processors/cores in the target device. | | objdumpPath | string | Both | This setting can be used to override the objdump (used to find globals/statics) path user/workspace setting for a particular launch configuration. This should be the full pathname to the executable (or name of the executable if it is in your PATH). Note that other toolchain executables with the configured prefix must still be available. The program 'nm' is also expected alongside | +| openOCDIP | string | Both | IP address/interface for OpenOCD to bind to and for GDB to connect to (maps to OpenOCD bindto). | | openOCDLaunchCommands | string[] | Both | OpenOCD command(s) after configuration files are loaded (-c options) | | openOCDPreConfigLaunchCommands | string[] | Both | OpenOCD command(s) before configuration files are loaded (-c options) | | overrideAttachCommands | string[] | Attach | Override the commands that are normally executed as part of attaching to a running target. In most cases it is preferable to use preAttachCommands and postAttachCommands to customize the GDB attach sequence. | diff --git a/package.json b/package.json index 531e6e37..3d557e8e 100644 --- a/package.json +++ b/package.json @@ -1629,6 +1629,11 @@ }, "type": "array" }, + "openOCDIP": { + "default": null, + "description": "IP address/interface for OpenOCD to bind to and for GDB to connect to (maps to OpenOCD bindto).", + "type": "string" + }, "configFiles": { "description": "OpenOCD/PE GDB Server configuration file(s) to use when debugging (OpenOCD -f option)", "items": { @@ -2854,6 +2859,11 @@ }, "type": "array" }, + "openOCDIP": { + "default": null, + "description": "IP address/interface for OpenOCD to bind to and for GDB to connect to (maps to OpenOCD bindto).", + "type": "string" + }, "configFiles": { "description": "OpenOCD/PE GDB Server configuration file(s) to use when debugging (OpenOCD -f option)", "items": { diff --git a/release.js b/release.js index 6a735247..04c453f5 100644 --- a/release.js +++ b/release.js @@ -44,7 +44,7 @@ function isPreRelease() { function vsceRun(pkgOnly) { const npx = 'npx'; - const args = [npx, 'vsce', (pkgOnly ? 'package' : 'publish')]; + const args = [npx, '@vscode/vsce', (pkgOnly ? 'package' : 'publish')]; if (isPreRelease()) { args.push('--pre-release'); if (vsxAlso) { @@ -71,7 +71,7 @@ function vsceRun(pkgOnly) { } }); if (vsxAlso) { - const vsxCmd = [npx, 'ovsx', 'publish', '-p', openVsxPat]; + const vsxCmd = [npx, '@vscode/ovsx', 'publish', '-p', openVsxPat]; runProg(vsxCmd, (code) => { if (code !== 0) { errExit(`Failed '${vsxCmd}'`); diff --git a/src/common.ts b/src/common.ts index 86043f09..b4819c64 100644 --- a/src/common.ts +++ b/src/common.ts @@ -290,6 +290,7 @@ export interface ConfigurationArguments extends DebugProtocol.LaunchRequestArgum preResetCommands: string[]; postResetCommands: string[]; overrideResetCommands: string[]; + openOCDIP: string; postStartSessionCommands: string[]; postResetSessionCommands: string[]; overrideGDBServerStartedRegex: string; diff --git a/src/openocd.ts b/src/openocd.ts index f970d334..b9eb67f7 100644 --- a/src/openocd.ts +++ b/src/openocd.ts @@ -77,9 +77,10 @@ export class OpenOCDServerController extends EventEmitter implements GDBServerCo public initCommands(): string[] { const gdbport = this.ports[createPortName(this.args.targetProcessor)]; + const openOCDIP = this.args.openOCDIP || 'localhost'; return [ - `target-select extended-remote localhost:${gdbport}` + `target-select extended-remote ${openOCDIP}:${gdbport}` ]; } @@ -264,6 +265,10 @@ export class OpenOCDServerController extends EventEmitter implements GDBServerCo serverargs.push('-c', 'CDLiveWatchSetup'); } + if (this.args.openOCDIP) { + serverargs.push('-c', `bindto ${this.args.openOCDIP}`); + } + OpenOCDLog('Launching: ' + serverargs.join(' ')); return serverargs; }