From e421a62342e3dde9210663d6c8b81e5ee22fe4df Mon Sep 17 00:00:00 2001 From: Bdale Garbee Date: Wed, 29 May 2024 13:54:06 -0600 Subject: [PATCH] make EasyMini v2.1 our "current" thing to flash/cal/test --- ao-bringup/test-easymini-v2.0 | 62 +++++++++++++++++ ao-bringup/turnon_easymini_v2.0 | 69 +++++++++++++++++++ .../{turnon_easymini => turnon_easymini_v3.0} | 0 3 files changed, 131 insertions(+) create mode 100755 ao-bringup/test-easymini-v2.0 create mode 100755 ao-bringup/turnon_easymini_v2.0 rename ao-bringup/{turnon_easymini => turnon_easymini_v3.0} (100%) diff --git a/ao-bringup/test-easymini-v2.0 b/ao-bringup/test-easymini-v2.0 new file mode 100755 index 00000000..7850b550 --- /dev/null +++ b/ao-bringup/test-easymini-v2.0 @@ -0,0 +1,62 @@ +#!/bin/bash + +VERSION=2.0 +PRODUCT=EasyMini +BASE=`echo $PRODUCT | tr 'A-Z' 'a-z'` + +echo "$PRODUCT-v$VERSION Test Program" +echo "Copyright 2014 by Keith Packard. Released under GPL v2" +echo +echo "Expectations:" +echo -e "\t$PRODUCT v$VERSION powered from USB" +echo + +found=0 +while [ $found -eq 0 ]; do + (ao-list; echo END END END END) | while read product serial dev; do + case "$product" in + "$PRODUCT-v$VERSION") + + found=1 + echo -e '\e[34m'Testing $product $serial $dev'\e[39m' + echo "" + + ./test-igniters "$dev" drogue main + echo "" + + echo "Testing baro sensor" + ../ao-tools/ao-test-baro/ao-test-baro --tty="$dev" + + if [ $? -ne 0 ]; then + echo -e '\e[31m'"$PRODUCT-$VERSION serial $serial failed"'\e[39m' + exit 1 + fi + echo"" + + FLASHSIZE=1048576 + + echo "Testing flash" + ../ao-tools/ao-test-flash/ao-test-flash --tty="$dev" "$FLASHSIZE" + + if [ $? -ne 0 ]; then + echo -e '\e[31m'"$PRODUCT-$VERSION serial $serial failed"'\e[39m' + exit 1 + fi + + echo "" + + echo -e '\e[32m'"$PRODUCT-v$VERSION" serial "$serial" is ready to ship'\e[39m' + exit 0 + ;; + END) + exit 2 + ;; + esac + done + result=$? + if [ $result -ne 2 ]; then + exit $result + fi + echo 'No device, sleeping...' + sleep 1 +done diff --git a/ao-bringup/turnon_easymini_v2.0 b/ao-bringup/turnon_easymini_v2.0 new file mode 100755 index 00000000..3d883b3f --- /dev/null +++ b/ao-bringup/turnon_easymini_v2.0 @@ -0,0 +1,69 @@ +#!/bin/sh + +#if [ -x /usr/bin/dfu-util ]; then +# DFU_UTIL=/usr/bin/dfu-util +#else +# echo "Can't find dfu-util! Aborting." +# exit 1 +#fi + +if [ -x ../ao-tools/ao-usbload/ao-usbload ]; then + USBLOAD=../ao-tools/ao-usbload/ao-usbload +elif [ -x /usr/bin/ao-usbload ]; then + USBLOAD=/usr/bin/ao-usbload +else + echo "Can't find ao-usbload! Aborting." + exit 1 +fi + +VERSION=2.0 +PRODUCT=EasyMini +BASE=`echo $PRODUCT | tr 'A-Z' 'a-z'` +echo $FILE + +echo "$PRODUCT v$VERSION Turn-On and Calibration Program" +echo "Copyright 2024 by Bdale Garbee. Released under GPL v2+" +echo +echo "Expectations:" +echo "\t$PRODUCT v$VERSION powered and connected to USB" +echo + +case $# in + 1) + SERIAL="$1" + echo "$PRODUCT-$VERSION serial number: $SERIAL" + ;; + 0) + echo -n "$PRODUCT-$VERSION serial number: " + read SERIAL + ;; + *) + echo "Usage: $0 " 1>&2 + exit 1; + ;; +esac + +# +# Use released versions of everything +# +#FLASH_FILE=~/altusmetrumllc/Binaries/loaders/easymini-v2.0-altos-flash-*.bin +ALTOS_FILE=~/altusmetrumllc/Binaries/easymini-v2.0-*.elf + +#FLASH_FILE=../src/$BASE-v$VERSION/flash-loader/$BASE-v$VERSION-altos-flash-*.elf +#ALTOS_FILE=../src/$BASE-v$VERSION/*.ihx + +#echo $DFU_UTIL -a 0 -s 0x08000000:leave -D $FLASH_FILE + +#$DFU_UTIL -a 0 -s 0x08000000:leave -D $FLASH_FILE || exit 1 + +#sleep 2 + +echo $USBLOAD $ALTOS_FILE + +$USBLOAD --serial=$SERIAL $ALTOS_FILE || exit 1 + +sleep 1 + +./test-easymini-v2.0 + +exit $? diff --git a/ao-bringup/turnon_easymini b/ao-bringup/turnon_easymini_v3.0 similarity index 100% rename from ao-bringup/turnon_easymini rename to ao-bringup/turnon_easymini_v3.0 -- 2.47.2