3 if [ -x /usr/bin/ao-flash-stm32f0x ]; then
4 FLASH_STM=/usr/bin/ao-flash-stm32f0x
6 echo "Can't find ao-flash-stm32f0x! Aborting."
10 if [ -x /usr/bin/ao-usbload ]; then
11 USBLOAD=/usr/bin/ao-usbload
13 echo "Can't find ao-usbload! Aborting."
20 echo "ChaosKey v$VERSION Turn-On and Calibration Program"
21 echo "Copyright 2015 by Keith Packard. Released under GPL v2"
24 echo "\tChaosKey v$VERSION powered from USB"
25 echo "\t\twith ST-Link-V2 cabled to debug header"
32 echo "$PRODUCT-$VERSION serial number: $SERIAL"
35 echo -n "$PRODUCT-$VERSION serial number: "
39 echo "Usage: $0 <serial-number>" 1>&2
44 $FLASH_STM ../src/chaoskey-v$VERSION/flash-loader/chaoskey-v$VERSION-*.elf || exit 1
48 $USBLOAD --serial=$SERIAL ../src/chaoskey-v$VERSION/chaoskey-v$VERSION*.ihx || exit 1