diff options
| author | Keith Packard <keithp@keithp.com> | 2016-03-18 11:17:46 -0700 | 
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2016-03-18 11:17:46 -0700 | 
| commit | afba05c41f30c9273668d5ed71e0dc8c1ca53141 (patch) | |
| tree | 3a7df8d784165505cdf42c8fc70d2f5ac0f162d3 | |
| parent | 4635203e9be530f53b697ac0349838916e146983 (diff) | |
ao-bringup: Use dfu-util to install flash loader on chaoskey
Signed-off-by: Keith Packard <keithp@keithp.com>
| -rwxr-xr-x | ao-bringup/turnon_chaoskey | 11 | 
1 files changed, 5 insertions, 6 deletions
diff --git a/ao-bringup/turnon_chaoskey b/ao-bringup/turnon_chaoskey index 3617e777..8c20ebaa 100755 --- a/ao-bringup/turnon_chaoskey +++ b/ao-bringup/turnon_chaoskey @@ -1,10 +1,10 @@  #!/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 -	echo "Can't find ao-flash-stm32f0x!  Aborting." -	exit 1 +    echo "Can't find dfu-util! Aborting." +    exit 1  fi  if [ -x /usr/bin/ao-usbload ]; then @@ -22,10 +22,9 @@ echo "Copyright 2015 by Keith Packard.  Released under GPL v2"  echo  echo "Expectations:"  echo "\tChaosKey v$VERSION powered from USB" -echo "\t\twith ST-Link-V2 cabled to debug header"  echo -$FLASH_STM ../src/chaoskey-v$VERSION/flash-loader/chaoskey-v$VERSION-*.elf || exit 1 +$DFU_UTIL -a 0 -s 0x08000000:leave -D ../src/chaoskey-v$VERSION/flash-loader/chaoskey-v$VERSION*.bin || exit 1  sleep 2  | 
