From 35c36139c479e1a948dd7dcdc95504b8bcd916ea Mon Sep 17 00:00:00 2001 From: Bdale Garbee Date: Fri, 12 Sep 2025 12:43:40 -0600 Subject: [PATCH] make turnon_telemetrum default to v4.0c boards that don't need bootloader flashed --- ao-bringup/turnon_telemetrum | 82 +----------------------------- ao-bringup/turnon_telemetrum_v4.0 | 81 +++++++++++++++++++++++++++++ ao-bringup/turnon_telemetrum_v4.0c | 67 ++++++++++++++++++++++++ 3 files changed, 149 insertions(+), 81 deletions(-) mode change 100755 => 120000 ao-bringup/turnon_telemetrum create mode 100755 ao-bringup/turnon_telemetrum_v4.0 create mode 100755 ao-bringup/turnon_telemetrum_v4.0c diff --git a/ao-bringup/turnon_telemetrum b/ao-bringup/turnon_telemetrum deleted file mode 100755 index bb455c98..00000000 --- a/ao-bringup/turnon_telemetrum +++ /dev/null @@ -1,81 +0,0 @@ -#!/bin/sh - -if [ -x /usr/bin/ao-flash-samd21 ]; then - FLASH_STM=/usr/bin/ao-flash-samd21 -else - echo "Can't find ao-flash-samd21! Aborting." - exit 1 -fi - -if [ -x /usr/bin/ao-usbload ]; then - USBLOAD=/usr/bin/ao-usbload -else - echo "Can't find ao-usbload! Aborting." - exit 1 -fi - -VERSION=4.0 -PRODUCT=TeleMetrum - -echo "$PRODUCT v$VERSION Turn-On and Calibration Program" -echo "Copyright 2023 by Bdale Garbee. Released under GPL v2" -echo -echo "Expectations:" -echo "\t$PRODUCT v$VERSION powered from USB" -echo "\t\twith ST-Link-V2 cabled to debug header" -echo "\t\twith coax from UHF to frequency counter" -echo -echo -n "$PRODUCT-$VERSION serial number: " - -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 - -echo $FLASH_STM - -$FLASH_STM ~/altusmetrumllc/Binaries/loaders/telemetrum-v$VERSION-*.elf || exit 1 - -sleep 3 - -$USBLOAD --serial=$SERIAL ~/altusmetrumllc/Binaries/telemetrum-v$VERSION-*.elf || exit 1 - -sleep 5 - -dev=`ao-list | awk '/TeleMetrum-v'"$VERSION"'/ { print $3; exit(0); }'` - -case "$dev" in -/dev/tty*) - echo "TeleMetrum found on $dev" - ;; -*) - echo 'No TeleMetrum-v'"$VERSION"' found' - exit 1 - ;; -esac - -echo 'E 0' > $dev - -SERIAL=$SERIAL ./cal-freq $dev - -failed=1 -while [ $failed = 1 ]; do - ../ao-tools/ao-cal-accel/ao-cal-accel $dev - failed=$? -done - -echo 'E 1' > $dev - -./test-telemetrum-v4.0 - -exit $? diff --git a/ao-bringup/turnon_telemetrum b/ao-bringup/turnon_telemetrum new file mode 120000 index 00000000..17c1ae6a --- /dev/null +++ b/ao-bringup/turnon_telemetrum @@ -0,0 +1 @@ +turnon_telemetrum_v4.0c \ No newline at end of file diff --git a/ao-bringup/turnon_telemetrum_v4.0 b/ao-bringup/turnon_telemetrum_v4.0 new file mode 100755 index 00000000..bb455c98 --- /dev/null +++ b/ao-bringup/turnon_telemetrum_v4.0 @@ -0,0 +1,81 @@ +#!/bin/sh + +if [ -x /usr/bin/ao-flash-samd21 ]; then + FLASH_STM=/usr/bin/ao-flash-samd21 +else + echo "Can't find ao-flash-samd21! Aborting." + exit 1 +fi + +if [ -x /usr/bin/ao-usbload ]; then + USBLOAD=/usr/bin/ao-usbload +else + echo "Can't find ao-usbload! Aborting." + exit 1 +fi + +VERSION=4.0 +PRODUCT=TeleMetrum + +echo "$PRODUCT v$VERSION Turn-On and Calibration Program" +echo "Copyright 2023 by Bdale Garbee. Released under GPL v2" +echo +echo "Expectations:" +echo "\t$PRODUCT v$VERSION powered from USB" +echo "\t\twith ST-Link-V2 cabled to debug header" +echo "\t\twith coax from UHF to frequency counter" +echo +echo -n "$PRODUCT-$VERSION serial number: " + +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 + +echo $FLASH_STM + +$FLASH_STM ~/altusmetrumllc/Binaries/loaders/telemetrum-v$VERSION-*.elf || exit 1 + +sleep 3 + +$USBLOAD --serial=$SERIAL ~/altusmetrumllc/Binaries/telemetrum-v$VERSION-*.elf || exit 1 + +sleep 5 + +dev=`ao-list | awk '/TeleMetrum-v'"$VERSION"'/ { print $3; exit(0); }'` + +case "$dev" in +/dev/tty*) + echo "TeleMetrum found on $dev" + ;; +*) + echo 'No TeleMetrum-v'"$VERSION"' found' + exit 1 + ;; +esac + +echo 'E 0' > $dev + +SERIAL=$SERIAL ./cal-freq $dev + +failed=1 +while [ $failed = 1 ]; do + ../ao-tools/ao-cal-accel/ao-cal-accel $dev + failed=$? +done + +echo 'E 1' > $dev + +./test-telemetrum-v4.0 + +exit $? diff --git a/ao-bringup/turnon_telemetrum_v4.0c b/ao-bringup/turnon_telemetrum_v4.0c new file mode 100755 index 00000000..e9fc5e3b --- /dev/null +++ b/ao-bringup/turnon_telemetrum_v4.0c @@ -0,0 +1,67 @@ +#!/bin/sh + +if [ -x /usr/bin/ao-usbload ]; then + USBLOAD=/usr/bin/ao-usbload +else + echo "Can't find ao-usbload! Aborting." + exit 1 +fi + +VERSION=4.0 +PRODUCT=TeleMetrum + +echo "$PRODUCT v$VERSION Turn-On and Calibration Program" +echo "Copyright 2025 by Bdale Garbee. Released under GPL v3" +echo +echo "Expectations:" +echo "\t$PRODUCT v$VERSION with battery attached by USB" +echo "\t\twith coax from UHF to frequency counter" +echo +echo -n "$PRODUCT-$VERSION serial number: " + +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 + +$USBLOAD --serial=$SERIAL ~/altusmetrumllc/Binaries/telemetrum-v$VERSION-*.elf || exit 1 + +sleep 5 + +dev=`ao-list | awk '/TeleMetrum-v'"$VERSION"'/ { print $3; exit(0); }'` + +case "$dev" in +/dev/tty*) + echo "TeleMetrum found on $dev" + ;; +*) + echo 'No TeleMetrum-v'"$VERSION"' found' + exit 1 + ;; +esac + +echo 'E 0' > $dev + +SERIAL=$SERIAL ./cal-freq $dev + +failed=1 +while [ $failed = 1 ]; do + ../ao-tools/ao-cal-accel/ao-cal-accel $dev + failed=$? +done + +echo 'E 1' > $dev + +./test-telemetrum-v4.0 + +exit $? -- 2.47.3