()
| 213 | } |
| 214 | |
| 215 | public serverArguments(): string[] { |
| 216 | let serverargs = []; |
| 217 | |
| 218 | // Regardless of the target processor, we will only supply the processor '0's port# |
| 219 | // OpenOcd will increment and assign the right port-numer to the right processor |
| 220 | serverargs.push('-c', `gdb_port ${this.ports['gdbPort']}`); |
| 221 | serverargs.push('-c', `tcl_port ${this.ports['tclPort']}`); |
| 222 | serverargs.push('-c', `telnet_port ${this.ports['telnetPort']}`); |
| 223 | |
| 224 | this.args.searchDir.forEach((cs, idx) => { |
| 225 | serverargs.push('-s', cs); |
| 226 | }); |
| 227 | |
| 228 | if (this.args.searchDir.length === 0) { |
| 229 | serverargs.push('-s', this.args.cwd); |
| 230 | } |
| 231 | |
| 232 | for (const cmd of this.args.openOCDPreConfigLaunchCommands || []) { |
| 233 | serverargs.push('-c', cmd); |
| 234 | } |
| 235 | |
| 236 | serverargs.push('-f', `${this.args.extensionPath}/support/openocd-helpers.tcl`); |
| 237 | this.args.configFiles.forEach((cf, idx) => { |
| 238 | serverargs.push('-f', cf); |
| 239 | }); |
| 240 | |
| 241 | if (this.args.rtos) { |
| 242 | serverargs.push('-c', `CDRTOSConfigure ${this.args.rtos}`); |
| 243 | } |
| 244 | |
| 245 | if (this.args.serverArgs) { |
| 246 | serverargs = serverargs.concat(this.args.serverArgs); |
| 247 | } |
| 248 | |
| 249 | const commands = []; |
| 250 | |
| 251 | if (this.args.swoConfig.enabled) { |
| 252 | if (!(['probe', 'socket', 'file', 'serial'].find((s) => s === this.args.swoConfig.source))) { |
| 253 | this.args.swoConfig.enabled = false; |
| 254 | } |
| 255 | } |
| 256 | |
| 257 | if (commands.length > 0) { |
| 258 | serverargs.push('-c', commands.join('; ')); |
| 259 | } |
| 260 | |
| 261 | for (const cmd of this.args.openOCDLaunchCommands || []) { |
| 262 | serverargs.push('-c', cmd); |
| 263 | } |
| 264 | |
| 265 | if (this.args.liveWatch?.enabled) { |
| 266 | serverargs.push('-c', 'CDLiveWatchSetup'); |
| 267 | } |
| 268 | |
| 269 | OpenOCDLog('Launching: ' + serverargs.join(' ')); |
| 270 | return serverargs; |
| 271 | } |
| 272 |
nothing calls this directly
no test coverage detected