From d909654b170615f1a8d69a1b58f6979570873a8c Mon Sep 17 00:00:00 2001 From: Tat-Chee Wan (USM) Date: Thu, 17 Mar 2011 14:01:10 +0800 Subject: added length check for gdb command --- Host/nxt-gdb-server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Host/nxt-gdb-server.py b/Host/nxt-gdb-server.py index 6563dc9..67e93b8 100755 --- a/Host/nxt-gdb-server.py +++ b/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) -- cgit v1.2.3 From 27866753e46ef5d711950b6db04a06b9f68ccc9c Mon Sep 17 00:00:00 2001 From: Tat-Chee Wan (USM) Date: Fri, 18 Mar 2011 12:01:56 +0800 Subject: updated libusb version info, fixed checksum error in setonereg example --- Host/README | 6 +++--- Host/gdb-commands.txt | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Host/README b/Host/README index 9e6b9c1..23d95c9 100644 --- a/Host/README +++ b/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/Host/gdb-commands.txt b/Host/gdb-commands.txt index 4155ec7..ef412d1 100644 --- a/Host/gdb-commands.txt +++ b/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 -- cgit v1.2.3 From d7e6d01799a0465c024bb0025476ffdfbbedfa93 Mon Sep 17 00:00:00 2001 From: Tat-Chee Wan (USM) Date: Fri, 18 Mar 2011 12:02:33 +0800 Subject: fixed incorrect parameter lengths for setonereg --- Debugger/debug_stub.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Debugger/debug_stub.h b/Debugger/debug_stub.h index 1c47050..d70152b 100644 --- a/Debugger/debug_stub.h +++ b/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) /*@}*/ -- cgit v1.2.3