aboutsummaryrefslogtreecommitdiff
path: root/src/command.c
diff options
context:
space:
mode:
authorGareth McMullin2012-05-26 15:05:37 +1200
committerGareth McMullin2012-05-26 15:05:37 +1200
commit01bf5e6b44992740250d0d5467e8baf5d9953d09 (patch)
tree3ffeea98c7301630425e314d1414beb9603e991d /src/command.c
parent09330d7fa9c36f7125d8654fdca66df0c1a86533 (diff)
Fixed and cleaned up build for libftdi platform.
Diffstat (limited to 'src/command.c')
-rw-r--r--src/command.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/command.c b/src/command.c
index e4e856b..caa2ea6 100644
--- a/src/command.c
+++ b/src/command.c
@@ -37,8 +37,6 @@
#include "adiv5.h"
-#include <libopencm3/usb/usbd.h>
-
static void cmd_version(void);
static void cmd_help(void);
@@ -46,8 +44,9 @@ static void cmd_jtag_scan(void);
static void cmd_swdp_scan(void);
static void cmd_targets(void);
static void cmd_morse(void);
-
+#ifdef PLATFORM_HAS_TRACESWO
static void cmd_traceswo(void);
+#endif
const struct command_s cmd_list[] = {
{"version", (cmd_handler)cmd_version, "Display firmware version info"},
@@ -56,8 +55,9 @@ 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" },
+#ifdef PLATFORM_HAS_TRACESWO
{"traceswo", (cmd_handler)cmd_traceswo, "Start trace capture" },
-
+#endif
{NULL, NULL, NULL}
};
@@ -168,10 +168,12 @@ void cmd_morse(void)
gdb_outf("%s\n", morse_msg);
}
+#ifdef PLATFORM_HAS_TRACESWO
static void cmd_traceswo(void)
{
extern char serial_no[9];
traceswo_init();
gdb_outf("%s:%02X:%02X\n", serial_no, 5, 0x85);
}
+#endif