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

Method SWOConfigurationCommands

src/jlink.ts:95–111  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

93 }
94
95 private SWOConfigurationCommands(): string[] {
96 const portMask = '0x' + calculatePortMask(this.args.swoConfig.decoders).toString(16);
97 const swoFrequency = this.args.swoConfig.swoFrequency | 0;
98 const cpuFrequency = this.args.swoConfig.cpuFrequency | 0;
99
100 const commands: string[] = [
101 `monitor SWO EnableTarget ${cpuFrequency} ${swoFrequency} ${portMask} 0`,
102 'DisableITMPorts 0xFFFFFFFF',
103 `EnableITMPorts ${portMask}`,
104 'EnableDWTSync',
105 'ITMSyncEnable'
106 ];
107
108 commands.push(this.args.swoConfig.profile ? 'EnablePCSample' : 'DisablePCSample');
109
110 return commands.map((c) => `interpreter-exec console "${c}"`);
111 }
112
113 public serverExecutable() {
114 if (this.args.serverpath) { return this.args.serverpath; }

Callers 1

swoAndRTTCommandsMethod · 0.95

Calls 2

calculatePortMaskFunction · 0.90
toStringMethod · 0.80

Tested by

no test coverage detected