diff --git a/misc/install/run_openocd.bat b/misc/install/run_openocd_f4.bat similarity index 100% rename from misc/install/run_openocd.bat rename to misc/install/run_openocd_f4.bat diff --git a/misc/install/run_openocd_f4.sh b/misc/install/run_openocd_f4.sh new file mode 100755 index 0000000000..ca788b02b6 --- /dev/null +++ b/misc/install/run_openocd_f4.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +STLINK=$(lsusb | grep 'ST-LINK\|STLINK') +if [ "$STLINK" ]; then + echo "I see $STLINK make sure your board file accepts this specific kind of ST-LINK" +else + echo "Do not see any ST-LINK. If you are on WSL make sure you have bound USB" + exit -1 +fi + +sudo openocd -f board/stm32f4discovery.cfg -c init -c reset \ No newline at end of file