summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-10-13 21:38:15 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-10-13 21:38:15 +0000
commitfd4f585b7a2df8f42d467ca2014106a1d92351e5 (patch)
tree8b5da0ee956e3df1ba0d1199447d049ba1d76d0a
parent58b3a3403ff75b829fd0c9a1de2926f06209964d (diff)
downloadnuttx-fd4f585b7a2df8f42d467ca2014106a1d92351e5.tar.gz
nuttx-fd4f585b7a2df8f42d467ca2014106a1d92351e5.tar.bz2
nuttx-fd4f585b7a2df8f42d467ca2014106a1d92351e5.zip
Still futzing with OpenOCD
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4045 42af7a65-404d-4744-a932-0658087f49c3
-rw-r--r--nuttx/configs/ea3152/tools/olimex-arm-usb-ocd.cfg2
-rwxr-xr-xnuttx/configs/ea3152/tools/oocd.sh100
2 files changed, 52 insertions, 50 deletions
diff --git a/nuttx/configs/ea3152/tools/olimex-arm-usb-ocd.cfg b/nuttx/configs/ea3152/tools/olimex-arm-usb-ocd.cfg
index 44263c2b2..ef2964708 100644
--- a/nuttx/configs/ea3152/tools/olimex-arm-usb-ocd.cfg
+++ b/nuttx/configs/ea3152/tools/olimex-arm-usb-ocd.cfg
@@ -5,7 +5,7 @@
#
interface ft2232
-ft2232_device_desc "Olimex OpenOCD JTAG A"
+ft2232_device_desc "Olimex OpenOCD JTAG B"
ft2232_layout olimex-jtag
ft2232_vid_pid 0x15ba 0x0003
diff --git a/nuttx/configs/ea3152/tools/oocd.sh b/nuttx/configs/ea3152/tools/oocd.sh
index 0bb495c18..0953ba703 100755
--- a/nuttx/configs/ea3152/tools/oocd.sh
+++ b/nuttx/configs/ea3152/tools/oocd.sh
@@ -11,71 +11,73 @@ fi
###############################################################################
# OpenOCD 0.4.0 ###############################################################
###############################################################################
-# This script *probably* only works with the following version of OpenOCD:
+# This script *probably* only works with the following versions of OpenOCD:
OPENOCD_PATH="/cygdrive/c/OpenOCD/openocd-0.4.0/src"
OPENOCD_EXE=openocd.exe
-# Local search directory and configurations
+echo "Trying OpenOCD 0.4.0 path: ${OPENOCD_PATH}/${OPENOCD_EXE}"
-OPENOCD_SEARCHDIR="${TOPDIR}/configs/ea3152/tools"
-OPENOCD_WSEARCHDIR="`cygpath -w ${OPENOCD_SEARCHDIR}`"
-OPENOCD_INTERFACE="olimex-arm-usb-ocd.cfg"
-OPENOCD_TARGET="lpc3152.cfg"
-OPENOCD_ARGS="-s ${OPENOCD_WSEARCHDIR} -f ${OPENOCD_INTERFACE} -f ${OPENOCD_TARGET}"
+if [ -x "${OPENOCD_PATH}/${OPENOCD_EXE}" ]; then
-# Verify that everything is what it claims it is and is located where it claims it is.
+ # Local search directory and configurations
-if [ ! -d "${OPENOCD_PATH}" ]; then
- echo "OpenOCD path does not exist: ${OPENOCD_PATH}"
- exit 1
-fi
-if [ ! -x "${OPENOCD_PATH}/${OPENOCD_EXE}" ]; then
- echo "OpenOCD does not exist: ${OPENOCD_PATH}/${OPENOCD_EXE}"
- exit 1
-fi
-if [ ! -f "${OPENOCD_SEARCHDIR}/${OPENOCD_TARGET}" ]; then
+ OPENOCD_SEARCHDIR="${TOPDIR}/configs/ea3152/tools"
+ OPENOCD_WSEARCHDIR="`cygpath -w ${OPENOCD_SEARCHDIR}`"
+ OPENOCD_INTERFACE="olimex-arm-usb-ocd.cfg"
+ OPENOCD_TARGET="lpc3152.cfg"
+ OPENOCD_ARGS="-s ${OPENOCD_WSEARCHDIR} -f ${OPENOCD_INTERFACE} -f ${OPENOCD_TARGET}"
+
+ # Verify that everything is what it claims it is and is located where it claims it is.
+
+ if [ ! -f "${OPENOCD_SEARCHDIR}/${OPENOCD_TARGET}" ]; then
echo "OpenOCD target config file does not exist: ${OPENOCD_SEARCHDIR}/${OPENOCD_TARGET}"
exit 1
-fi
-if [ ! -f "${OPENOCD_SEARCHDIR}/${OPENOCD_INTERFACE}" ]; then
+ fi
+ if [ ! -f "${OPENOCD_SEARCHDIR}/${OPENOCD_INTERFACE}" ]; then
echo "OpenOCD interface config file does not exist: ${OPENOCD_SEARCHDIR}/${OPENOCD_INTERFACE}"
exit 1
-fi
+ fi
+
###############################################################################
###############################################################################
# Older OpenOCD that Shipped with the ARM-OCD JTAG ############################
###############################################################################
-# This script *probably* only works with the following version of OpenOCD:
-#
-#OPENOCD_PATH="/cygdrive/c/gccfd/openocd/bin"
-#OPENOCD_EXE=openocd-ftd2xx.exe
-#
-# Local search directory and configurations
-#
-#OPENOCD_CFG="${TOPDIR}/configs/ea3152/tools/armusbocd.cfg"
-#OPENOCD_ARGS="-f `cygpath -w ${OPENOCD_CFG}`"
-#
-#if [ ! -f ${OPENOCD_CFG} ]; then
-# echo "OpenOCD config file does not exist: ${OPENOCD_CFG}"
-# exit 1
-#fi
-#
-# Verify that everything is what it claims it is and is located where it claims it is.
-#
-#if [ ! -d "${OPENOCD_PATH}" ]; then
-# echo "OpenOCD path does not exist: ${OPENOCD_PATH}"
-# exit 1
-#fi
-#if [ ! -x "${OPENOCD_PATH}/${OPENOCD_EXE}" ]; then
-# echo "OpenOCD does not exist: ${OPENOCD_PATH}/${OPENOCD_EXE}"
-# exit 1
-#fi
-#if [ ! -f ${OPENOCD_CFG} ]; then
-# echo "OpenOCD config file does not exist: ${OPENOCD_CFG}"
-# exit 1
-#fi
+
+else
+ echo "OpenOCD 0.4.0 path does not exist: ${OPENOCD_PATH}/${OPENOCD_EXE}"
+
+ OPENOCD_PATH="/cygdrive/c/gccfd/openocd/bin"
+ OPENOCD_EXE=openocd-ftd2xx.exe
+
+ echo "Trying GCCFD OpenOCD 0.1.0 path: ${OPENOCD_PATH}/${OPENOCD_EXE}"
+
+ # Local search directory and configurations
+
+ OPENOCD_CFG="${TOPDIR}/configs/ea3152/tools/armusbocd.cfg"
+ OPENOCD_ARGS="-f `cygpath -w ${OPENOCD_CFG}`"
+
+ if [ ! -f ${OPENOCD_CFG} ]; then
+ echo "OpenOCD config file does not exist: ${OPENOCD_CFG}"
+ exit 1
+ fi
+
+ # Verify that everything is what it claims it is and is located where it claims it is.
+
+ if [ ! -d "${OPENOCD_PATH}" ]; then
+ echo "OpenOCD path does not exist: ${OPENOCD_PATH}"
+ exit 1
+ fi
+ if [ ! -x "${OPENOCD_PATH}/${OPENOCD_EXE}" ]; then
+ echo "OpenOCD does not exist: ${OPENOCD_PATH}/${OPENOCD_EXE}"
+ exit 1
+ fi
+ if [ ! -f ${OPENOCD_CFG} ]; then
+ echo "OpenOCD config file does not exist: ${OPENOCD_CFG}"
+ exit 1
+ fi
+fi
###############################################################################
# Enable debug if so requested