()
| 68 | } |
| 69 | |
| 70 | private SWOConfigurationCommands(): string[] { |
| 71 | const portMask = '0x' + calculatePortMask(this.args.swoConfig.decoders).toString(16); |
| 72 | const swoFrequency = this.args.swoConfig.swoFrequency; |
| 73 | const cpuFrequency = this.args.swoConfig.cpuFrequency; |
| 74 | |
| 75 | const ratio = Math.floor(cpuFrequency / swoFrequency) - 1; |
| 76 | |
| 77 | const commands: string[] = [ |
| 78 | 'EnableITMAccess', |
| 79 | `BaseSWOSetup ${ratio}`, |
| 80 | 'SetITMId 1', |
| 81 | 'ITMDWTTransferEnable', |
| 82 | 'DisableITMPorts 0xFFFFFFFF', |
| 83 | `EnableITMPorts ${portMask}`, |
| 84 | 'EnableDWTSync', |
| 85 | 'ITMSyncEnable', |
| 86 | 'ITMGlobalEnable' |
| 87 | ]; |
| 88 | |
| 89 | commands.push(this.args.swoConfig.profile ? 'EnablePCSample' : 'DisablePCSample'); |
| 90 | |
| 91 | return commands.map((c) => `interpreter-exec console "${c}"`); |
| 92 | } |
| 93 | |
| 94 | public serverExecutable(): string { |
| 95 | if (this.args.serverpath) { return this.args.serverpath; } |
no test coverage detected