dist/jlink.sh: Allow overwriting the 'reset' commands

Add a variable to configure the reset commands.
This is required for board that need a hardware reset.
This commit is contained in:
Gaëtan Harter 2019-07-17 15:28:33 +02:00
parent 21e796d6f9
commit 5ed65989ed
No known key found for this signature in database
GPG Key ID: 76DF6BCF1B1F883B

View File

@ -54,6 +54,8 @@
# Set IMAGE_OFFSET to zero by default.
: ${IMAGE_OFFSET:=0}
# Allow overwriting the reset commands.
: ${JLINK_RESET_FILE:=${RIOTTOOLS}/jlink/reset.seg}
# default GDB port
_GDB_PORT=3333
@ -167,7 +169,7 @@ do_flash() {
if [ ! -z "${JLINK_POST_FLASH}" ]; then
printf "${JLINK_POST_FLASH}\n" >> ${BINDIR}/burn.seg
fi
cat ${RIOTTOOLS}/jlink/reset.seg >> ${BINDIR}/burn.seg
cat ${JLINK_RESET_FILE} >> ${BINDIR}/burn.seg
# flash device
sh -c "${JLINK} ${JLINK_SERIAL} \
-ExitOnError 1 \
@ -224,7 +226,7 @@ do_reset() {
-speed '${JLINK_SPEED}' \
-if '${JLINK_IF}' \
-jtagconf -1,-1 \
-commandfile '${RIOTTOOLS}/jlink/reset.seg'"
-commandfile '${JLINK_RESET_FILE}'"
}
do_term() {