From: Bdale Garbee Date: Wed, 29 May 2024 19:54:06 +0000 (-0600) Subject: make EasyMini v2.1 our "current" thing to flash/cal/test X-Git-Tag: 1.9.19~1^2~5 X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=e421a62342e3dde9210663d6c8b81e5ee22fe4df;p=fw%2Faltos make EasyMini v2.1 our "current" thing to flash/cal/test --- 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 b/ao-bringup/turnon_easymini deleted file mode 100755 index 1960c4d6..00000000 --- a/ao-bringup/turnon_easymini +++ /dev/null @@ -1,69 +0,0 @@ -#!/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 -else - echo "Can't find ao-flash-lpc! 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=3.0 -PRODUCT=EasyMini -BASE=`echo $PRODUCT | tr 'A-Z' 'a-z'` -echo $FILE - -echo "$PRODUCT v$VERSION Turn-On and Calibration Program" -echo "Copyright 2022 by Bdale Garbee. Released under GPL v3" -echo -echo "Expectations:" -echo "\t$PRODUCT v$VERSION powered from USB" -echo "\t\twith ST-Link-V2 cabled to debug header" -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-v3.0-altos-flash-*.elf -ALTOS_FILE=~/altusmetrumllc/Binaries/easymini-v3.0-*.elf - -echo $FLASH_LPC $FLASH_FILE - -$FLASH_LPC $FLASH_FILE || exit 1 - -sleep 1 - -echo $USBLOAD $ALTOS_FILE - -$USBLOAD --serial=$SERIAL $ALTOS_FILE || exit 1 - -sleep 1 - -./test-easymini-v3.0 - -exit $? 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_v3.0 b/ao-bringup/turnon_easymini_v3.0 new file mode 100755 index 00000000..1960c4d6 --- /dev/null +++ b/ao-bringup/turnon_easymini_v3.0 @@ -0,0 +1,69 @@ +#!/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 +else + echo "Can't find ao-flash-lpc! 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=3.0 +PRODUCT=EasyMini +BASE=`echo $PRODUCT | tr 'A-Z' 'a-z'` +echo $FILE + +echo "$PRODUCT v$VERSION Turn-On and Calibration Program" +echo "Copyright 2022 by Bdale Garbee. Released under GPL v3" +echo +echo "Expectations:" +echo "\t$PRODUCT v$VERSION powered from USB" +echo "\t\twith ST-Link-V2 cabled to debug header" +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-v3.0-altos-flash-*.elf +ALTOS_FILE=~/altusmetrumllc/Binaries/easymini-v3.0-*.elf + +echo $FLASH_LPC $FLASH_FILE + +$FLASH_LPC $FLASH_FILE || exit 1 + +sleep 1 + +echo $USBLOAD $ALTOS_FILE + +$USBLOAD --serial=$SERIAL $ALTOS_FILE || exit 1 + +sleep 1 + +./test-easymini-v3.0 + +exit $?