Add debug scripts for ARM and AVR.
authorbatt <batt@38d2e660-2303-0410-9eaa-f027e97ec537>
Thu, 27 Aug 2009 14:46:43 +0000 (14:46 +0000)
committerbatt <batt@38d2e660-2303-0410-9eaa-f027e97ec537>
Thu, 27 Aug 2009 14:46:43 +0000 (14:46 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2800 38d2e660-2303-0410-9eaa-f027e97ec537

bertos/cpu/arm/scripts/debug.sh [new file with mode: 0755]
bertos/cpu/avr/scripts/debug.sh [new file with mode: 0755]

diff --git a/bertos/cpu/arm/scripts/debug.sh b/bertos/cpu/arm/scripts/debug.sh
new file mode 100755 (executable)
index 0000000..5b9e0af
--- /dev/null
@@ -0,0 +1,13 @@
+#! /usr/bin/env bash
+set -x
+BASE_DIR=`dirname $0`
+. ${BASE_DIR}/common.sh
+
+OUT_FILE="openocd.tmp"
+
+sed -e "s#PROGRAMMER_TYPE#${INT_FILE}#" ${BASE_DIR}/openocd/debug.cfg | sed -e "s#PROGRAMMER_CPU#${CPU_FILE}#" > ${OUT_FILE}
+
+openocd -f ${OUT_FILE}
+OCD_RET=$?
+rm -f ${OUT_FILE}
+exit $OCD_RET
diff --git a/bertos/cpu/avr/scripts/debug.sh b/bertos/cpu/avr/scripts/debug.sh
new file mode 100755 (executable)
index 0000000..49656ed
--- /dev/null
@@ -0,0 +1,4 @@
+#!/usr/bin/env bash
+
+printf "AVR target debugging is currently not supported.\n"
+exit 1