3 if [ -x ../ao-tools/ao-flash/ao-flash-lpc ]; then
4 FLASH_LPC=../ao-tools/ao-flash/ao-flash-lpc
5 elif [ -x /usr/bin/ao-flash-lpc ]; then
6 FLASH_LPC=/usr/bin/ao-flash-lpc
8 echo "Can't find ao-flash-lpc! Aborting."
12 if [ -x ../ao-tools/ao-usbload/ao-usbload ]; then
13 USBLOAD=../ao-tools/ao-usbload/ao-usbload
14 elif [ -x /usr/bin/ao-usbload ]; then
15 USBLOAD=/usr/bin/ao-usbload
17 echo "Can't find ao-usbload! Aborting."
23 BASE=`echo $PRODUCT | tr 'A-Z' 'a-z'`
26 echo "$PRODUCT v$VERSION Turn-On and Calibration Program"
27 echo "Copyright 2022 by Bdale Garbee. Released under GPL v3"
30 echo "\t$PRODUCT v$VERSION powered from USB"
31 echo "\t\twith ST-Link-V2 cabled to debug header"
37 echo "$PRODUCT-$VERSION serial number: $SERIAL"
40 echo -n "$PRODUCT-$VERSION serial number: "
44 echo "Usage: $0 <serial-number>" 1>&2
50 # Use released versions of everything
52 FLASH_FILE=~/altusmetrumllc/Binaries/loaders/easymini-v3.0-altos-flash-*.elf
53 ALTOS_FILE=~/altusmetrumllc/Binaries/easymini-v3.0-*.elf
55 echo $FLASH_LPC $FLASH_FILE
57 $FLASH_LPC $FLASH_FILE || exit 1
61 echo $USBLOAD $ALTOS_FILE
63 $USBLOAD --serial=$SERIAL $ALTOS_FILE || exit 1