;;
esac
+ST_FLASH=st-flash
+
+if which $ST_FLASH > /dev/null; then
+ :
+else
+ echo "$0: $ST_FLASH not found. Check to see if the stlink package is installed"
+ exit 1
+fi
+
file=$1
bin=/tmp/flash$$.bin
arm-none-eabi-objcopy -O binary $file $bin
-st-flash --reset write $bin $base
\ No newline at end of file
+$ST_FLASH --reset write $bin $base