aboutsummaryrefslogtreecommitdiff
path: root/AT91SAM7S256/armdebug/Debugger/debug_stub.h
diff options
context:
space:
mode:
authorTC Wan2010-12-23 18:32:16 +0800
committerTC Wan2010-12-23 18:32:16 +0800
commit2ce74d88a2a894799dfb025e92806c61c5dd9612 (patch)
tree1c53d2b62e0ca58719813970259eaec90baa496b /AT91SAM7S256/armdebug/Debugger/debug_stub.h
parent60c29d8cd77da30a72b3bbdab4472ad2ff987836 (diff)
parentc351d60d912c121b3c4e22b8b53e5d946bb5f748 (diff)
Merge branch 'master' of ssh://svc.cs.usm.my/~/gitrepo-bare/armdebug
Diffstat (limited to 'AT91SAM7S256/armdebug/Debugger/debug_stub.h')
-rw-r--r--AT91SAM7S256/armdebug/Debugger/debug_stub.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/AT91SAM7S256/armdebug/Debugger/debug_stub.h b/AT91SAM7S256/armdebug/Debugger/debug_stub.h
index c3a71c4..e79f0de 100644
--- a/AT91SAM7S256/armdebug/Debugger/debug_stub.h
+++ b/AT91SAM7S256/armdebug/Debugger/debug_stub.h
@@ -36,10 +36,20 @@
* High Speed Device 64 1024 1024 512
*/
-#define USB_BUFSIZE 64
-#define USB_NUMDATAPKTS 3 /* For packet transfers */
+#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_GDBMSG_START 4 /* Offset into USB Telegram buffer */
+#define USB_GDBMSG_CHKSUMOFFSET 4 /* 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 MSGBUF_SIZE (USB_BUFSIZE*USB_NUMDATAPKTS) /* Debug Message Buffer Size, 64 x 3 = 192 chars = ~90 bytes */
#define MSGBUF_STARTCHAR '$'
#define MSGBUF_ACKCHAR '+'
#define MSGBUF_NAKCHAR '-'
@@ -47,6 +57,7 @@
#define MSGBUF_SIGCHAR 'S'
#define MSGBUF_CPSRREG '!'
#define MSGBUF_SETCHAR '='
+#define MSGBUF_CHKSUMCHAR '#'
#define MSGBUF_CMDINDEX_OUTOFRANGE_VAL -1
/*@}*/