MCPcopy Create free account
hub / github.com/Marus/cortex-debug / serverArguments

Method serverArguments

src/pemicro.ts:87–126  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

85 }
86
87 public serverArguments(): string[] {
88 const gdbport = this.ports['gdbPort'];
89
90 let serverargs = [];
91
92 serverargs.push('-startserver');
93 serverargs.push('-singlesession');
94 serverargs.push(`-device=${this.args.device}`);
95 serverargs.push(`-serverport=${gdbport}`);
96
97 if (this.args.ipAddress) {
98 serverargs.push(`-serverip=${this.args.ipAddress}`);
99 }
100
101 if (this.args.rtos) {
102 serverargs.push(`-kernal=${this.args.rtos}`);
103 }
104
105 if (this.args.interface === 'jtag') { // TODO: handle ctag in when this server supports it
106 serverargs.push('-usejtag');
107 }
108
109 if (this.args.configFiles) {
110 serverargs.push(`-configfile=${this.args.configFiles[0]}`);
111 }
112
113 if (this.args.swoConfig.enabled) {
114 const source = this.args.swoConfig.source;
115 if (source === 'socket') {
116 const swoPort = this.ports[createPortName(this.args.targetProcessor, 'swoPort')];
117 serverargs.push(`-streamingport=${swoPort}`);
118 }
119 }
120
121 if (this.args.serverArgs) {
122 serverargs = serverargs.concat(this.args.serverArgs);
123 }
124
125 return serverargs;
126 }
127
128 public initMatch(): RegExp {
129 return /All Servers Running/g;

Callers

nothing calls this directly

Calls 1

createPortNameFunction · 0.90

Tested by

no test coverage detected