aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AT91SAM7S256/armdebug/Debugger/debug_internals.h2
-rwxr-xr-xAT91SAM7S256/armdebug/Host/nxt-gdb-server.py4
-rwxr-xr-xAT91SAM7S256/armdebug/Host/pyenv-nxt-gdb-server30
3 files changed, 30 insertions, 6 deletions
diff --git a/AT91SAM7S256/armdebug/Debugger/debug_internals.h b/AT91SAM7S256/armdebug/Debugger/debug_internals.h
index e187b82..bdab463 100644
--- a/AT91SAM7S256/armdebug/Debugger/debug_internals.h
+++ b/AT91SAM7S256/armdebug/Debugger/debug_internals.h
@@ -390,4 +390,6 @@ ENUM_VAL(DISP_ABORT_SPURIOUS) /**< Spurious IRQ. */
ENUM_VAL(DISP_ABORT_ILLEGAL) /**< Illegal Instruction. */
ENUM_END(abort_type_t)
+/*@}*/
+
#endif /* __DEBUG_INTERNALS_H__ */
diff --git a/AT91SAM7S256/armdebug/Host/nxt-gdb-server.py b/AT91SAM7S256/armdebug/Host/nxt-gdb-server.py
index 197c27a..03a95d3 100755
--- a/AT91SAM7S256/armdebug/Host/nxt-gdb-server.py
+++ b/AT91SAM7S256/armdebug/Host/nxt-gdb-server.py
@@ -148,7 +148,7 @@ class NXTGDBServer:
assert segno == prev_segno + 1, "segno = %s, prev_segno = %s" % (segno, prev_segno)
prev_segno = segno
msg += s
- except usb.USBError as e:
+ except IOError as e:
# Some pyusb are buggy, ignore some "errors".
if e.args != ('No error', ):
raise e
@@ -198,7 +198,7 @@ class NXTGDBServer:
for seg in segments:
try:
self.brick.sock.send (seg)
- except usb.USBError as e:
+ except IOError as e:
# Some pyusb are buggy, ignore some "errors".
if e.args != ('No error', ):
raise e
diff --git a/AT91SAM7S256/armdebug/Host/pyenv-nxt-gdb-server b/AT91SAM7S256/armdebug/Host/pyenv-nxt-gdb-server
index 7929c60..45797c6 100755
--- a/AT91SAM7S256/armdebug/Host/pyenv-nxt-gdb-server
+++ b/AT91SAM7S256/armdebug/Host/pyenv-nxt-gdb-server
@@ -1,6 +1,28 @@
#!/bin/sh
-export PYTHONPATH=~/svnrepo/nxt-python:~/gitrepo/pyfantom
-export EXP="export VERSIONER_PYTHON_PREFER_32_BIT=yes"
-ARCH="arch -i386"
+# If using Apple's python, use the following to enable 32-bit python
+# arch -i386 does not work reliably except with specific python versions
+# python2.6 and python2.7 is known to work with 'arch -i386'
+#
+# Apple recommends the use of the following Environment Variable to control
+# 32-bit vs. 64-bit python selection
+# export VERSIONER_PYTHON_PREFER_32_BIT="yes"
+
+DARWIN=`uname`
+PYTHON=python
+PYTHONVER=`$PYTHON --version`
-$ARCH python ~/gitrepo/armdebug/Host/nxt-gdb-server.py $*
+if [ $DARWIN == "Darwin" ]; then
+ echo "$PYTHONVER Running on Mac OSX Platform!"
+ EXP="export VERSIONER_PYTHON_PREFER_32_BIT=yes"
+ ARCH="arch -i386"
+else
+ echo "$PYTHONVER Running on Default Platform!"
+ EXP=
+ ARCH=
+fi
+# Debugging Info
+# echo "dirname:" `dirname $0`
+# echo "basename:" `basename $0`
+export PYTHONPATH=~/svnrepo/nxt-python:~/gitrepo/pyfantom
+#echo $EXP; $ARCH $PYTHON ~/gitrepo/armdebug/Host/nxt-gdb-server.py $*
+$EXP; $ARCH $PYTHON ~/gitrepo/armdebug/Host/nxt-gdb-server.py $*