aboutsummaryrefslogtreecommitdiff
path: root/bin/reset
diff options
context:
space:
mode:
authorFredrik Thulin <fredrik@thulin.net>2016-05-27 21:58:55 +0200
committerFredrik Thulin <fredrik@thulin.net>2016-05-27 21:58:55 +0200
commit13d9bfb4bf1cfbb3d723c919763bc460c193ed3b (patch)
tree2454a8313689ce2ed92644bc4a449b7fa039f997 /bin/reset
parent0009ba29bbb3d7ff911b343bafb9a005114ea2d8 (diff)
parent854a8ba169d64a16f5466c0cac9e1aeeff50659d (diff)
Merge branch 'ft-dfu-code-loading'
Diffstat (limited to 'bin/reset')
-rwxr-xr-xbin/reset4
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/reset b/bin/reset
index 4461cf1..1c57f97 100755
--- a/bin/reset
+++ b/bin/reset
@@ -20,6 +20,8 @@ OPENOCD_BOARD_DIR=/usr/share/openocd/scripts/board
# the OPENOCD_BOARD_DIR directory.
#
OPENOCD_PROC_FILE=stm32f4discovery.cfg
-#OPENOCD_PROC_FILE=st_nucleo_f4.cfg
+if [ "x`lsusb -d 0483:374b`" != "x" ]; then
+ OPENOCD_PROC_FILE=st_nucleo_f4.cfg
+fi
$OPENOCD -f $OPENOCD_BOARD_DIR/$OPENOCD_PROC_FILE -c "init" -c "reset run" -c "exit"