3 if [ -x /usr/bin/dfu-util ]; then
4 DFU_UTIL=/usr/bin/dfu-util
6 echo "Can't find dfu-util! Aborting."
10 if [ -x ../ao-tools/ao-usbload/ao-usbload ]; then
11 USBLOAD=../ao-tools/ao-usbload/ao-usbload
12 elif [ -x /usr/bin/ao-usbload ]; then
13 USBLOAD=/usr/bin/ao-usbload
15 echo "Can't find ao-usbload! Aborting."
21 BASE=`echo $PRODUCT | tr 'A-Z' 'a-z'`
24 echo "$PRODUCT v$VERSION Turn-On and Calibration Program"
25 echo "Copyright 2010 by Bdale Garbee. Released under GPL v2+"
28 echo "\t$PRODUCT v$VERSION powered and connected to USB"
34 echo "$PRODUCT-$VERSION serial number: $SERIAL"
37 echo -n "$PRODUCT-$VERSION serial number: "
41 echo "Usage: $0 <serial-number>" 1>&2
47 # Use released versions of everything
49 FLASH_FILE=~/altusmetrumllc/Binaries/loaders/easymini-v2.0-altos-flash-*.bin
50 ALTOS_FILE=~/altusmetrumllc/Binaries/easymini-v2.0-*.elf
52 #FLASH_FILE=../src/$BASE-v$VERSION/flash-loader/$BASE-v$VERSION-altos-flash-*.elf
53 #ALTOS_FILE=../src/$BASE-v$VERSION/*.ihx
55 echo $DFU_UTIL -a 0 -s 0x08000000:leave -D $FLASH_FILE
57 #$DFU_UTIL -a 0 -s 0x08000000:leave -D $FLASH_FILE || exit 1
61 echo $USBLOAD $ALTOS_FILE
63 $USBLOAD --serial=$SERIAL $ALTOS_FILE || exit 1