From 4e0bd63af2ee0272c5a8a51f0b53735fcf3e8c16 Mon Sep 17 00:00:00 2001 From: batt Date: Thu, 27 Aug 2009 14:46:43 +0000 Subject: [PATCH] Add debug scripts for ARM and AVR. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2800 38d2e660-2303-0410-9eaa-f027e97ec537 --- bertos/cpu/arm/scripts/debug.sh | 13 +++++++++++++ bertos/cpu/avr/scripts/debug.sh | 4 ++++ 2 files changed, 17 insertions(+) create mode 100755 bertos/cpu/arm/scripts/debug.sh create mode 100755 bertos/cpu/avr/scripts/debug.sh diff --git a/bertos/cpu/arm/scripts/debug.sh b/bertos/cpu/arm/scripts/debug.sh new file mode 100755 index 00000000..5b9e0afb --- /dev/null +++ b/bertos/cpu/arm/scripts/debug.sh @@ -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 index 00000000..49656edc --- /dev/null +++ b/bertos/cpu/avr/scripts/debug.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +printf "AVR target debugging is currently not supported.\n" +exit 1 -- 2.25.1