Update example projects' makefiles.
[bertos.git] / bertos / cpu / arm / scripts / flash.sh
1 #! /usr/bin/env bash
2 #set -x
3
4 BASE_DIR=`dirname $0`
5 . ${BASE_DIR}/common.sh
6
7 OUT_FILE="openocd.tmp"
8
9 sed -e "s#PROGRAMMER_TYPE#${INT_FILE}#" ${BASE_DIR}/openocd/flash.cfg | sed -e "s#PROGRAMMER_CPU#${CPU_FILE}#" \
10         | sed -e "s#IMAGE_FILE#${IMAGE_FILE}#" > ${OUT_FILE}
11
12 openocd -d 1 -f ${OUT_FILE}
13 OCD_RET=$?
14 rm -f ${OUT_FILE}
15 exit $OCD_RET