From 42570013c5266449f7e8512a77fe66b8e852294d Mon Sep 17 00:00:00 2001 From: Marti Bolivar Date: Thu, 7 Jun 2012 01:24:01 -0400 Subject: Move OpenOCD stuff into contrib/. This has gone unmaintained for long enough. Signed-off-by: Marti Bolivar --- contrib/openocd/openocd-wrapper.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 contrib/openocd/openocd-wrapper.sh (limited to 'contrib/openocd/openocd-wrapper.sh') diff --git a/contrib/openocd/openocd-wrapper.sh b/contrib/openocd/openocd-wrapper.sh new file mode 100755 index 0000000..73be92e --- /dev/null +++ b/contrib/openocd/openocd-wrapper.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +# Helper to decide which openocd script to use. We only support 0.3.x and 0.4.x. + +if [ $# -ne 1 ] +then + echo "Usage: `basename $0` {flash|debug}" + exit 1 +fi + +OPENOCD_VERSION=`openocd -v 2>&1 | head -n1 | \ + awk '{print $4}' | sed 's/\([0-9]*\.[0-9]*\)\.[0-9]*/\1/'` + +CFG_FILE=$1_${OPENOCD_VERSION}.cfg + +openocd -f support/openocd/$CFG_FILE -- cgit v1.2.3