aboutsummaryrefslogtreecommitdiff
path: root/Debugger/debug_stub.h
diff options
context:
space:
mode:
authorTC Wan2011-01-04 14:54:50 +0800
committerTC Wan2011-01-04 14:54:50 +0800
commitdcdbc6d3f18fa1c255bc03ce573fed74b754b19c (patch)
tree191b58bc580d33bc18e1d9facef35ddef7675259 /Debugger/debug_stub.h
parente9cdc8055191a6dea1a471b1b3fe6e2fe0f7070f (diff)
adjusted nxt message to 3 byte header format
Adjusted NXT Message Header to use 3 byte header format to support future expansion of multi-segmented GDB messages. This is not used at this moment.
Diffstat (limited to 'Debugger/debug_stub.h')
-rw-r--r--Debugger/debug_stub.h19
1 files changed, 8 insertions, 11 deletions
diff --git a/Debugger/debug_stub.h b/Debugger/debug_stub.h
index b1815f8..efaed73 100644
--- a/Debugger/debug_stub.h
+++ b/Debugger/debug_stub.h
@@ -39,21 +39,18 @@
#define USB_BUFSIZE 64 /* USB Buffer size for AT91SAM7S */
#define USB_NXT_TELEGRAMTYPE_OFFSET 0 /* NXT Direct Command/Response Header */
-#define USB_NXT_COMMAND_OFFSET 1
-#define USB_NXT_SEGNUM_OFFSET 2
-#define USB_NXT_TELEGRAMSIZE_OFFSET 3
+#define USB_NXT_SEGNUM_OFFSET 1
+#define USB_NXT_TELEGRAMSIZE_OFFSET 2
-#define USB_NXT_TELEGRAM_DC_RESP 0x00
-#define USB_NXT_TELEGRAM_RESP 0x02
-#define USB_NXT_COMMAND_GDB 0xF0
-#define USB_NXT_RESPONSE_GDB 0xF1
+#define USB_NXT_TELEGRAM_DC_RESP 0x8d
+#define USB_NXT_TELEGRAM_RESP 0x8d
-#define USB_GDBMSG_START 4 /* Offset into USB Telegram buffer */
-#define USB_GDBMSG_CHKSUMOFFSET 4 /* to be subtracted from USB_NXT_TELEGRAMSIZE_OFFSET */
+#define USB_GDBMSG_START 3 /* Offset into USB Telegram buffer */
+#define USB_GDBMSG_CHKSUMOFFSET 3 /* to be subtracted from USB_NXT_TELEGRAMSIZE_OFFSET */
#define MSG_NUMSEGMENTS 3 /* For packet transfers */
-#define MSG_SEGMENTSIZE (USB_BUFSIZE - USB_GDBMSG_START) /* 60 bytes per segment */
-#define MSGBUF_SIZE (MSG_SEGMENTSIZE*MSG_NUMSEGMENTS) /* Debug Message Buffer Size, 60 x 3 = 180 chars = ~80 bytes of actual data */
+#define MSG_SEGMENTSIZE (USB_BUFSIZE - USB_GDBMSG_START) /* 61 bytes per segment */
+#define MSGBUF_SIZE (MSG_SEGMENTSIZE*MSG_NUMSEGMENTS) /* Debug Message Buffer Size, 61 x 3 = 183 chars = ~80 bytes of actual data */
#define MSGBUF_STARTCHAR '$'
#define MSGBUF_ACKCHAR '+'