|
|
@ -77,7 +77,11 @@ const struct command_s cmd_list[] = { |
|
|
|
{"tpwr", (cmd_handler)cmd_target_power, "Supplies power to the target: (enable|disable)"}, |
|
|
|
#endif |
|
|
|
#ifdef PLATFORM_HAS_TRACESWO |
|
|
|
{"traceswo", (cmd_handler)cmd_traceswo, "Start trace capture [(baudrate) for async swo]" }, |
|
|
|
#if defined TRACESWO_PROTOCOL && TRACESWO_PROTOCOL == 2 |
|
|
|
{"traceswo", (cmd_handler)cmd_traceswo, "Start trace capture, NRZ mode: (baudrate)" }, |
|
|
|
#else |
|
|
|
{"traceswo", (cmd_handler)cmd_traceswo, "Start trace capture, Manchester mode" }, |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#if defined(PLATFORM_HAS_DEBUG) && !defined(PC_HOSTED) |
|
|
|
{"debug_bmp", (cmd_handler)cmd_debug_bmp, "Output BMP \"debug\" strings to the second vcom: (enable|disable)"}, |
|
|
@ -356,13 +360,21 @@ static bool cmd_traceswo(target *t, int argc, const char **argv) |
|
|
|
#else |
|
|
|
extern char serial_no[9]; |
|
|
|
#endif |
|
|
|
uint32_t baudrate = 0; |
|
|
|
(void)t; |
|
|
|
|
|
|
|
if (argc > 1) |
|
|
|
baudrate = atoi(argv[1]); |
|
|
|
|
|
|
|
traceswo_init(baudrate); |
|
|
|
#if defined TRACESWO_PROTOCOL && TRACESWO_PROTOCOL == 2 |
|
|
|
if (argc > 1) { |
|
|
|
uint32_t baudrate = atoi(argv[1]); |
|
|
|
traceswo_init(baudrate); |
|
|
|
} else { |
|
|
|
gdb_outf("Missing baudrate parameter in command\n"); |
|
|
|
} |
|
|
|
#else |
|
|
|
(void)argv; |
|
|
|
traceswo_init(); |
|
|
|
if (argc > 1) { |
|
|
|
gdb_outf("Superfluous parameter(s) ignored\n"); |
|
|
|
} |
|
|
|
#endif |
|
|
|
gdb_outf("%s:%02X:%02X\n", serial_no, 5, 0x85); |
|
|
|
return true; |
|
|
|
} |
|
|
|