summaryrefslogtreecommitdiff
path: root/ao-bringup
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2018-03-16 14:51:22 -0700
committerKeith Packard <keithp@keithp.com>2018-03-16 14:51:22 -0700
commit788d02a3caf0f14f3c84ff6ae7e2a2fff302e91b (patch)
tree95a3c31d0b2c8de389c54e888b588acff261bf8b /ao-bringup
parent7068149704e6de67ece670227445e987421cd600 (diff)
ao-bringup: Check for Loader USB id before attempting dfu-util
This lets me restart the turnon process after the boot loader has been flashed. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'ao-bringup')
-rwxr-xr-xao-bringup/turnon_easymini8
1 files changed, 5 insertions, 3 deletions
diff --git a/ao-bringup/turnon_easymini b/ao-bringup/turnon_easymini
index 7db72665..3bef3145 100755
--- a/ao-bringup/turnon_easymini
+++ b/ao-bringup/turnon_easymini
@@ -52,11 +52,13 @@ ALTOS_FILE=~/altusmetrumllc/Binaries/easymini-v2.0-*.elf
#FLASH_FILE=../src/$BASE-v$VERSION/flash-loader/$BASE-v$VERSION-altos-flash-*.elf
#ALTOS_FILE=../src/$BASE-v$VERSION/*.ihx
-echo $DFU_UTIL -a 0 -s 0x08000000:leave -D $FLASH_FILE
+if lsusb -d 0483:df11 | grep -q STM; then
+ echo $DFU_UTIL -v -v -R -a 0 -s 0x08000000:leave -D $FLASH_FILE
-$DFU_UTIL -a 0 -s 0x08000000:leave -D $FLASH_FILE || exit 1
+ $DFU_UTIL -a 0 -s 0x08000000:leave -D $FLASH_FILE
-sleep 2
+ sleep 2
+fi
echo $USBLOAD $ALTOS_FILE