X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=ao-bringup%2Fturnon_chaoskey;h=990382f48e56cc268905999596427204bf24e1a8;hb=ffc90fa3f932aef4dd85147817949aa9474b6d26;hp=8c8a6758609f76ba2e7276c470a28fe27bdaeaad;hpb=f2d3202de9a5847923f72afe2969eb7ccd7342c7;p=fw%2Faltos diff --git a/ao-bringup/turnon_chaoskey b/ao-bringup/turnon_chaoskey index 8c8a6758..990382f4 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 @@ -14,7 +14,7 @@ else exit 1 fi -VERSION=0.1 +VERSION=1.0 PRODUCT=ChaosKey echo "ChaosKey v$VERSION Turn-On and Calibration Program" @@ -22,29 +22,19 @@ 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_FILE=~/altusmetrumllc/Binaries/loaders/chaoskey-v1.0-altos-flash-*.bin +ALTOS_FILE=~/altusmetrumllc/Binaries/chaoskey-v1.0-*.elf -case $# in - 1) - SERIAL="$1" - echo "$PRODUCT-$VERSION serial number: $SERIAL" - ;; - 0) - echo -n "$PRODUCT-$VERSION serial number: " - read SERIAL - ;; - *) - echo "Usage: $0 " 1>&2 - exit 1; - ;; -esac - -$FLASH_STM ../src/chaoskey-v$VERSION/flash-loader/chaoskey-v$VERSION-*.elf || exit 1 +$DFU_UTIL -a 0 -s 0x08000000:leave -D $FLASH_FILE || exit 1 sleep 2 -$USBLOAD --serial=$SERIAL ../src/chaoskey-v$VERSION/chaoskey-v$VERSION*.ihx || exit 1 +$USBLOAD --serial=1 $ALTOS_FILE || exit 1 + +sleep 1 + +./test-chaoskey exit $?