aboutsummaryrefslogtreecommitdiff
path: root/src/command.c
diff options
context:
space:
mode:
authorGareth McMullin2012-04-17 21:40:39 +1200
committerGareth McMullin2012-04-18 19:15:44 +1200
commit21ecbd23ea6ea3c3f72ad9c45d9be3e6e8b7c4f7 (patch)
tree3bce8158a70899170b596bd13b16620a580a724f /src/command.c
parent9cff48dc6b065afe60cf696fcff1ebd822bfce3b (diff)
Added capture of SWO, passed to host over a vendor specific USB interface.
Diffstat (limited to 'src/command.c')
-rw-r--r--src/command.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/command.c b/src/command.c
index b812bfe..1efae36 100644
--- a/src/command.c
+++ b/src/command.c
@@ -37,6 +37,8 @@
#include "adiv5.h"
+#include <libopencm3/usb/usbd.h>
+
static void cmd_version(void);
static void cmd_help(void);
@@ -45,6 +47,8 @@ static void cmd_swdp_scan(void);
static void cmd_targets(void);
static void cmd_morse(void);
+static void cmd_traceswo(void);
+
const struct command_s cmd_list[] = {
{"version", (cmd_handler)cmd_version, "Display firmware version info"},
{"help", (cmd_handler)cmd_help, "Display help for monitor commands"},
@@ -52,6 +56,7 @@ const struct command_s cmd_list[] = {
{"swdp_scan", (cmd_handler)cmd_swdp_scan, "Scan SW-DP for devices" },
{"targets", (cmd_handler)cmd_targets, "Display list of available targets" },
{"morse", (cmd_handler)cmd_morse, "Display morse error message" },
+ {"traceswo", (cmd_handler)cmd_traceswo, "Start trace capture" },
{NULL, NULL, NULL}
};
@@ -159,4 +164,8 @@ void cmd_morse(void)
gdb_outf("%s\n", morse_msg);
}
+static void cmd_traceswo(void)
+{
+ traceswo_init();
+}