projects
/
fw
/
altos
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8f52963
)
ao-tools: complain if st-flash is not available
author
Keith Packard
<keithp@keithp.com>
Wed, 18 Dec 2013 19:07:55 +0000
(11:07 -0800)
committer
Keith Packard
<keithp@keithp.com>
Wed, 18 Dec 2013 19:07:55 +0000
(11:07 -0800)
Signed-off-by: Keith Packard <keithp@keithp.com>
ao-tools/ao-flash/ao-flash-stm
patch
|
blob
|
history
diff --git
a/ao-tools/ao-flash/ao-flash-stm
b/ao-tools/ao-flash/ao-flash-stm
index 993258e5f0be2a9b37b9db1dceabcac768a17e0e..9eebf5d2e55eb0dde1312d95cf53c8c95a669db5 100644
(file)
--- a/
ao-tools/ao-flash/ao-flash-stm
+++ b/
ao-tools/ao-flash/ao-flash-stm
@@
-6,6
+6,15
@@
case "$#" in
;;
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
@@
-21,4
+30,4
@@
esac
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