Avoid resetting target when debugging with st-util
The default behaviour for st-util is to reset the target on startup,
which should only be done when RESET shell variable is set.
@@ -56,6 +56,8 @@ stlink_debug () {
windows_detect
PORT=3333
+ parse_extra_jtag_cmd $EXTRA_JTAG_CMD
+
if [ -z "$NO_GDB" ]; then
if [ -z $FILE_NAME ]; then
echo "Missing filename"
@@ -72,13 +74,13 @@ stlink_debug () {
# it doesn't get killed by Ctrl-C signal from bash.
#
- $COMSPEC /C "start $COMSPEC /C st-util -p $PORT"
+ $COMSPEC /C "start $COMSPEC /C st-util --no-reset -p $PORT"
else
#
# Block Ctrl-C from getting passed to openocd.
#
set -m
- st-util -p $PORT >stlink.log 2>&1 &
+ st-util --no-reset -p $PORT >stlink.log 2>&1 &
stpid=$!
set +m
fi
@@ -106,8 +108,8 @@ stlink_debug () {
fi
fi
else
- # No GDB, wait for openocd to exit
- st-util -p $PORT
+ # No GDB, wait for st-util to exit
+ st-util --no-reset -p $PORT
return $?
fi
