projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altos/chaoskey: Add another USB endpoint to read raw data
[fw/altos]
/
ao-bringup
/
turnon_easymini
diff --git
a/ao-bringup/turnon_easymini
b/ao-bringup/turnon_easymini
old mode 100644
(file)
new mode 100755
(executable)
index
3c24aa2
..
0b915c5
--- a/
ao-bringup/turnon_easymini
+++ b/
ao-bringup/turnon_easymini
@@
-20,7
+20,8
@@
fi
VERSION=1.0
PRODUCT=EasyMini
VERSION=1.0
PRODUCT=EasyMini
-#VERSION=0.1
+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 "$PRODUCT v$VERSION Turn-On and Calibration Program"
echo "Copyright 2010 by Bdale Garbee. Released under GPL v2"
@@
-29,50
+30,43
@@
echo "Expectations:"
echo "\t$PRODUCT v$VERSION powered from USB"
echo "\t\twith ST-Link-V2 cabled to debug header"
echo
echo "\t$PRODUCT v$VERSION powered from USB"
echo "\t\twith ST-Link-V2 cabled to debug header"
echo
-echo -n "$PRODUCT-$VERSION serial number: "
-read SERIAL
-echo $FLASH_LPC
+case $# in
+ 1)
+ SERIAL="$1"
+ echo "$PRODUCT-$VERSION serial number: $SERIAL"
+ ;;
+ 0)
+ echo -n "$PRODUCT-$VERSION serial number: "
+ read SERIAL
+ ;;
+ *)
+ echo "Usage: $0 <serial-number>" 1>&2
+ exit 1;
+ ;;
+esac
-$FLASH_LPC ../src/easymini-v$VERSION/flash-loader/*.elf || exit 1
+#
+# Use released versions of everything
+#
+FLASH_FILE=~/altusmetrumllc/Binaries/loaders/easymini-v1.0-altos-flash-*.elf
+ALTOS_FILE=~/altusmetrumllc/Binaries/easymini-v1.0-*.elf
-sleep 2
+#FLASH_FILE=../src/$BASE-v$VERSION/flash-loader/$BASE-v$VERSION-altos-flash-*.elf
+#ALTOS_FILE=../src/$BASE-v$VERSION/*.ihx
-$USBLOAD --serial=$SERIAL ../src/easymini-v$VERSION/*.ihx || exit 1
-#$USBLOAD --serial=$SERIAL /usr/share/altos/telemega-v$VERSION*.ihx || exit 1
+echo $FLASH_LPC $FLASH_FILE
-sleep 2
+$FLASH_LPC $FLASH_FILE || exit 1
-dev=`ao-list | awk '/$PRODUCT-v'"$VERSION"'/ { print $3; exit(0); }'`
+sleep 1
-case "$dev" in
-/dev/tty*)
- echo "$PRODUCT found on $dev"
- ;;
-*)
- echo 'No $PRODUCT-v'"$VERSION"' found'
- exit 1
- ;;
-esac
+echo $USBLOAD $ALTOS_FILE
-echo "Testing igniters. Both should flash"
-./test-igniter "$dev" drogue main
+$USBLOAD --serial=$SERIAL $ALTOS_FILE || exit 1
-case $? in
-0)
- ;;
-*)
- echo "failed"
- exit 1
-esac
+sleep 2
-echo "Testing baro sensor"
-./test-baro "$dev"
+./test-easymini
-case $? in
-0)
- ;;
-*)
- echo "failed"
- exit 1
-esac
+exit $?