aboutsummaryrefslogtreecommitdiff
path: root/AT91SAM7S256/scripts
diff options
context:
space:
mode:
authorTat-Chee Wan2012-02-03 23:57:04 +0100
committerNicolas Schodet2012-02-11 17:30:42 +0100
commitd50dd5ab9567cc308e412c5e9e775dc8e15fb509 (patch)
treeb7d30c1025fb34e65a04d15701c53ee2ca071dec /AT91SAM7S256/scripts
parentceb0cbf65a11aed7662eb41ae66157e60ff61d60 (diff)
merge armdebug rc1
This enables the use of GDB or GDB based debuggers to debug the code running on the NXT brick using the USB connection.
Diffstat (limited to 'AT91SAM7S256/scripts')
-rwxr-xr-xAT91SAM7S256/scripts/armnxtgdbserver29
1 files changed, 29 insertions, 0 deletions
diff --git a/AT91SAM7S256/scripts/armnxtgdbserver b/AT91SAM7S256/scripts/armnxtgdbserver
new file mode 100755
index 0000000..1acac65
--- /dev/null
+++ b/AT91SAM7S256/scripts/armnxtgdbserver
@@ -0,0 +1,29 @@
+#!/bin/sh
+# 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`
+
+GDBSERVER=../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`
+cd `dirname $0`
+#echo $EXP; $ARCH $PYTHON $GDBSERVER $*
+$EXP; $ARCH $PYTHON $GDBSERVER $*