projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altos/telebt-v4.0: Use HW flow control to BT module
[fw/altos]
/
ao-bringup
/
turnon_chaoskey
diff --git
a/ao-bringup/turnon_chaoskey
b/ao-bringup/turnon_chaoskey
index 3617e777d1f5de8076898b162d6d5999cd9a7a14..1a8fe13f37a5503a7f7547fcdd3a0506c012e965 100755
(executable)
--- a/
ao-bringup/turnon_chaoskey
+++ b/
ao-bringup/turnon_chaoskey
@@
-1,14
+1,14
@@
#!/bin/sh
#!/bin/sh
-if [ -x /usr/bin/
ao-flash-stm32f0x
]; then
- FLASH_STM=/usr/bin/ao-flash-stm32f0x
+if [ -x /usr/bin/
dfu-util
]; then
+ DFU_UTIL=/usr/bin/dfu-util
else
else
-
echo "Can't find ao-flash-stm32f0x!
Aborting."
-
exit 1
+
echo "Can't find dfu-util!
Aborting."
+ exit 1
fi
fi
-if [ -x
/usr/bin/ao-usbload
]; then
- USBLOAD=
/usr/bin/ao-usbload
+if [ -x
`which ao-usbload`
]; then
+ USBLOAD=
`which ao-usbload`
else
echo "Can't find ao-usbload! Aborting."
exit 1
else
echo "Can't find ao-usbload! Aborting."
exit 1
@@
-22,13
+22,19
@@
echo "Copyright 2015 by Keith Packard. Released under GPL v2"
echo
echo "Expectations:"
echo "\tChaosKey v$VERSION powered from USB"
echo
echo "Expectations:"
echo "\tChaosKey v$VERSION powered from USB"
-echo "\t\twith ST-Link-V2 cabled to debug header"
echo
echo
-$FLASH_STM ../src/chaoskey-v$VERSION/flash-loader/chaoskey-v$VERSION-*.elf || exit 1
+FLASH_FILE=~/altusmetrumllc/Binaries/loaders/chaoskey-v1.0-altos-flash-*.bin
+ALTOS_FILE=~/altusmetrumllc/Binaries/chaoskey-v1.0-*.elf
+
+$DFU_UTIL -a 0 -s 0x08000000:leave -D $FLASH_FILE || exit 1
sleep 2
sleep 2
-$USBLOAD --serial=1 ../src/chaoskey-v$VERSION/chaoskey-v$VERSION*.ihx || exit 1
+$USBLOAD --serial=1 $ALTOS_FILE || exit 1
+
+sleep 1
+
+./test-chaoskey
exit $?
exit $?