summaryrefslogtreecommitdiff
path: root/AT91SAM7S256/armdebug
diff options
context:
space:
mode:
authorTat-Chee Wan (USM)2011-03-18 12:04:03 +0800
committerTat-Chee Wan (USM)2011-03-18 12:04:03 +0800
commit8945b4e00b5122619e3f5b65ae8294d7a50350d8 (patch)
treeb9952e30eb414f9550968a14d6c703eae710704b /AT91SAM7S256/armdebug
parent00cfbb071f76c34c06d4cf343ba3452d67c6aa64 (diff)
parentd7e6d01799a0465c024bb0025476ffdfbbedfa93 (diff)
Merge branch 'master' of ssh://svc.cs.usm.my/~/gitrepo-bare/armdebug
Diffstat (limited to 'AT91SAM7S256/armdebug')
-rw-r--r--AT91SAM7S256/armdebug/Debugger/debug_stub.h5
-rw-r--r--AT91SAM7S256/armdebug/Host/README6
-rw-r--r--AT91SAM7S256/armdebug/Host/gdb-commands.txt4
-rwxr-xr-xAT91SAM7S256/armdebug/Host/nxt-gdb-server.py2
4 files changed, 9 insertions, 8 deletions
diff --git a/AT91SAM7S256/armdebug/Debugger/debug_stub.h b/AT91SAM7S256/armdebug/Debugger/debug_stub.h
index 1c47050..d70152b 100644
--- a/AT91SAM7S256/armdebug/Debugger/debug_stub.h
+++ b/AT91SAM7S256/armdebug/Debugger/debug_stub.h
@@ -81,8 +81,9 @@
#define CMD_REG_NUMREGS 17
#define CMD_REG_GETONE_PARAMLEN 1
#define CMD_REG_GETALL_PARAMLEN 0
-#define CMD_REG_SETONE_PARAMLEN 6
-#define CMD_REG_SETALL_PARAMLEN (CMD_REG_NUMREGS*4)
+#define CMD_REG_REGPARAMLEN 8 /* 32-bit ASCII Hex Value */
+#define CMD_REG_SETONE_PARAMLEN (2 + CMD_REG_REGPARAMLEN)
+#define CMD_REG_SETALL_PARAMLEN (CMD_REG_NUMREGS*CMD_REG_REGPARAMLEN)
/*@}*/
diff --git a/AT91SAM7S256/armdebug/Host/README b/AT91SAM7S256/armdebug/Host/README
index 9e6b9c1..23d95c9 100644
--- a/AT91SAM7S256/armdebug/Host/README
+++ b/AT91SAM7S256/armdebug/Host/README
@@ -1,11 +1,11 @@
The nxt-gdb-server.py script is initially developed by Nicolas Schodet.
It depends on the following libraries:
- - nxt-python v2.0x http://code.google.com/p/nxt-python/
+ - nxt-python v2.1.x http://code.google.com/p/nxt-python/
- pyusb v0.4x http://pyusb.wiki.sourceforge.net
- - libusb-compat v0.1x and libusb v1.0x http://libusb.org/
+ - libusb v0.1.x http://libusb.org/
- It will probably work with libusb v0.1.x but it has not been tested in that configuration.
+Currently, it does not work with libusb v1.x, on Mac OSX, it causes segfaults.
Installation
============
diff --git a/AT91SAM7S256/armdebug/Host/gdb-commands.txt b/AT91SAM7S256/armdebug/Host/gdb-commands.txt
index 4155ec7..ef412d1 100644
--- a/AT91SAM7S256/armdebug/Host/gdb-commands.txt
+++ b/AT91SAM7S256/armdebug/Host/gdb-commands.txt
@@ -12,5 +12,5 @@ $pF#B6
# Display User CPSR
$p!#91
-# Set R0 to 0xAA
-$P1=000000AA#80
+# Set R1 to 0xAA
+$P1=000000AA#60
diff --git a/AT91SAM7S256/armdebug/Host/nxt-gdb-server.py b/AT91SAM7S256/armdebug/Host/nxt-gdb-server.py
index 6563dc9..67e93b8 100755
--- a/AT91SAM7S256/armdebug/Host/nxt-gdb-server.py
+++ b/AT91SAM7S256/armdebug/Host/nxt-gdb-server.py
@@ -137,7 +137,7 @@ class NXTGDBServer:
# Data from client, read it and forward it to NXT brick.
data = client.recv (self.recv_size)
data = data.strip()
- if data:
+ if len (data) > 0:
if DEBUG:
print "[GDB->NXT] %s" % data
segments = self.segment (data)