projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
point turnon_telemetrum_v2 to correct test script for v2.0
[fw/altos]
/
ao-bringup
/
turnon_easymini
diff --git
a/ao-bringup/turnon_easymini
b/ao-bringup/turnon_easymini
index db2b3248ef35e6127594c1f095e619cc5c2dc7e8..3bef31450ae27c28dc9c12aff323751a746db11f 100755
(executable)
--- a/
ao-bringup/turnon_easymini
+++ b/
ao-bringup/turnon_easymini
@@
-1,12
+1,10
@@
#!/bin/sh
#!/bin/sh
-if [ -x ../ao-tools/ao-flash/ao-flash-lpc ]; then
- FLASH_LPC=../ao-tools/ao-flash/ao-flash-lpc
-elif [ -x /usr/bin/ao-flash-lpc ]; then
- FLASH_LPC=/usr/bin/ao-flash-lpc
+if [ -x /usr/bin/dfu-util ]; then
+ DFU_UTIL=/usr/bin/dfu-util
else
else
-
echo "Can't find ao-flash-lpc!
Aborting."
-
exit 1
+
echo "Can't find dfu-util!
Aborting."
+ exit 1
fi
if [ -x ../ao-tools/ao-usbload/ao-usbload ]; then
fi
if [ -x ../ao-tools/ao-usbload/ao-usbload ]; then
@@
-18,79
+16,56
@@
else
exit 1
fi
exit 1
fi
-VERSION=
1
.0
+VERSION=
2
.0
PRODUCT=EasyMini
BASE=`echo $PRODUCT | tr 'A-Z' 'a-z'`
echo $FILE
echo "$PRODUCT v$VERSION Turn-On and Calibration Program"
PRODUCT=EasyMini
BASE=`echo $PRODUCT | tr 'A-Z' 'a-z'`
echo $FILE
echo "$PRODUCT v$VERSION Turn-On and Calibration Program"
-echo "Copyright 2010 by Bdale Garbee. Released under GPL v2"
+echo "Copyright 2010 by Bdale Garbee. Released under GPL v2
+
"
echo
echo "Expectations:"
echo
echo "Expectations:"
-echo "\t$PRODUCT v$VERSION powered from USB"
-echo "\t\twith ST-Link-V2 cabled to debug header"
+echo "\t$PRODUCT v$VERSION powered and connected to USB"
echo
echo
-echo -n "$PRODUCT-$VERSION serial number: "
-read SERIAL
-
-echo $FLASH_LPC
-
-$FLASH_LPC ../src/$BASE-v$VERSION/flash-loader/$BASE-v$VERSION-altos-flash-*.elf || exit 1
-
-sleep 1
-
-echo $USBLOAD
-$USBLOAD --serial=$SERIAL ../src/$BASE-v$VERSION/*.ihx || exit 1
-
-sleep 2
-
-dev=`ao-list | awk '/'"$PRODUCT"'-v'"$VERSION"'/ { print $3; exit(0); }'`
-
-case "$dev" in
-/dev/tty*)
- echo "$PRODUCT found on $dev"
+case $# in
+ 1)
+ SERIAL="$1"
+ echo "$PRODUCT-$VERSION serial number: $SERIAL"
;;
;;
-*)
- echo 'No '"$PRODUCT"'-v'"$VERSION"' found'
- exit 1
+ 0)
+ echo -n "$PRODUCT-$VERSION serial number: "
+ read SERIAL
+ ;;
+ *)
+ echo "Usage: $0 <serial-number>" 1>&2
+ exit 1;
;;
esac
;;
esac
-echo "Testing igniters. Both should flash"
-./test-igniter "$dev" drogue main
+#
+# Use released versions of everything
+#
+FLASH_FILE=~/altusmetrumllc/Binaries/loaders/easymini-v2.0-altos-flash-*.bin
+ALTOS_FILE=~/altusmetrumllc/Binaries/easymini-v2.0-*.elf
-case $? in
-0)
- ;;
-*)
- echo "failed"
- exit 1
-esac
+#FLASH_FILE=../src/$BASE-v$VERSION/flash-loader/$BASE-v$VERSION-altos-flash-*.elf
+#ALTOS_FILE=../src/$BASE-v$VERSION/*.ihx
-echo "Testing baro sensor"
-./test-baro "$dev"
+if lsusb -d 0483:df11 | grep -q STM; then
+ echo $DFU_UTIL -v -v -R -a 0 -s 0x08000000:leave -D $FLASH_FILE
-case $? in
-0)
- ;;
-*)
- echo "failed"
- exit 1
-esac
+ $DFU_UTIL -a 0 -s 0x08000000:leave -D $FLASH_FILE
+
+ sleep 2
+fi
-FLASHSIZE=1048576
+echo $USBLOAD $ALTOS_FILE
-echo "Testing flash"
-./test-flash "$dev" "$FLASHSIZE"
+$USBLOAD --serial=$SERIAL $ALTOS_FILE || exit 1
-case $? in
-0)
- ;;
-*)
- echo "failed"
- exit 1
-esac
+sleep 1
+
+./test-easymini
-echo "$PRODUCT-v$VERSION" serial "$SERIAL" is ready to ship
-exit 0
+exit $?