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

Method rttCommands

src/jlink.ts:66–84  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

64 }
65
66 public rttCommands(): string[] {
67 const commands = [];
68 if (this.args.rttConfig.enabled && !this.args.pvtRestartOrReset) {
69 const cfg = this.args.rttConfig;
70 if ((this.args.request === 'launch') && cfg.clearSearch) {
71 // The RTT control block may contain a valid search string from a previous run
72 // and RTT ends up outputting garbage. Or, the server could read garbage and
73 // misconfigure itself. Following will clear the RTT header which
74 // will cause the server to wait for the server to actually be initialized
75 let addr = parseHexOrDecInt(cfg.address);
76 for (let bytes = 0; bytes < cfg.searchId.length; bytes += 4) {
77 commands.push(`interpreter-exec console "monitor exec memU32 0x${addr.toString(16)} = 0"`);
78 addr += 4;
79 }
80 }
81 commands.push(`interpreter-exec console "monitor exec SetRTTAddr ${cfg.address}"`);
82 }
83 return commands;
84 }
85
86 public swoAndRTTCommands(): string[] {
87 const commands = [];

Callers 1

swoAndRTTCommandsMethod · 0.95

Calls 2

parseHexOrDecIntFunction · 0.90
toStringMethod · 0.80

Tested by

no test coverage detected