diff options
Diffstat (limited to 'ao-bringup')
| -rw-r--r-- | ao-bringup/ao_bringup.h | 3 | ||||
| -rw-r--r-- | ao-bringup/ao_init.c | 3 | ||||
| -rw-r--r-- | ao-bringup/ao_led_blink.c | 3 | ||||
| -rw-r--r-- | ao-bringup/ao_radio_init.c | 3 | ||||
| -rw-r--r-- | ao-bringup/ao_radio_test.c | 3 | ||||
| -rw-r--r-- | ao-bringup/ao_radio_xmit.c | 3 | ||||
| -rwxr-xr-x | ao-bringup/test-chaoskey | 95 | ||||
| -rwxr-xr-x | ao-bringup/turnon_chaoskey | 11 | ||||
| -rwxr-xr-x | ao-bringup/turnon_telemega | 28 | ||||
| -rwxr-xr-x | ao-bringup/turnon_telemetrum | 29 | 
10 files changed, 163 insertions, 18 deletions
| diff --git a/ao-bringup/ao_bringup.h b/ao-bringup/ao_bringup.h index 99fa4fba..23a1d607 100644 --- a/ao-bringup/ao_bringup.h +++ b/ao-bringup/ao_bringup.h @@ -3,7 +3,8 @@   *   * This program is free software; you can redistribute it and/or modify   * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version.   *   * This program is distributed in the hope that it will be useful, but   * WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/ao-bringup/ao_init.c b/ao-bringup/ao_init.c index 5dababde..e30608ab 100644 --- a/ao-bringup/ao_init.c +++ b/ao-bringup/ao_init.c @@ -3,7 +3,8 @@   *   * This program is free software; you can redistribute it and/or modify   * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version.   *   * This program is distributed in the hope that it will be useful, but   * WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/ao-bringup/ao_led_blink.c b/ao-bringup/ao_led_blink.c index 1e4c143d..b53b971d 100644 --- a/ao-bringup/ao_led_blink.c +++ b/ao-bringup/ao_led_blink.c @@ -3,7 +3,8 @@   *   * This program is free software; you can redistribute it and/or modify   * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version.   *   * This program is distributed in the hope that it will be useful, but   * WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/ao-bringup/ao_radio_init.c b/ao-bringup/ao_radio_init.c index 11932506..fe8dd90b 100644 --- a/ao-bringup/ao_radio_init.c +++ b/ao-bringup/ao_radio_init.c @@ -3,7 +3,8 @@   *   * This program is free software; you can redistribute it and/or modify   * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version.   *   * This program is distributed in the hope that it will be useful, but   * WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/ao-bringup/ao_radio_test.c b/ao-bringup/ao_radio_test.c index 8efb03cc..de140213 100644 --- a/ao-bringup/ao_radio_test.c +++ b/ao-bringup/ao_radio_test.c @@ -3,7 +3,8 @@   *   * This program is free software; you can redistribute it and/or modify   * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version.   *   * This program is distributed in the hope that it will be useful, but   * WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/ao-bringup/ao_radio_xmit.c b/ao-bringup/ao_radio_xmit.c index be3333af..bca83ae8 100644 --- a/ao-bringup/ao_radio_xmit.c +++ b/ao-bringup/ao_radio_xmit.c @@ -3,7 +3,8 @@   *   * This program is free software; you can redistribute it and/or modify   * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version.   *   * This program is distributed in the hope that it will be useful, but   * WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/ao-bringup/test-chaoskey b/ao-bringup/test-chaoskey new file mode 100755 index 00000000..b4c8164f --- /dev/null +++ b/ao-bringup/test-chaoskey @@ -0,0 +1,95 @@ +#!/bin/bash +snum="unknown" +case "$#" in +    1) +	case "$1" in +	    "-?"|"--help") +		echo "Usage: $0 [serial]" +		exit 0 +		;; +	esac +	snum="$1" +	serial="--serial $1" +	;; +    0) +	snum=`dmesg | grep 'on chaoskey' | tail -1 | sed 's/.*chaoskey \([0-9a-f][0-9a-f]*\) on chaoskey.*/\1/'` +	case "$snum" in +	    "") +		serial="" +		;; +	    *) +		serial="--serial $snum" +		;; +	esac +	;; +    *) +	echo "Usage: $0 [serial]" +	exit 1 +	;; +esac + +echo -e '\e[34mTesting ChaosKey' $snum '\e[39m' + +tests="0:100 1:100 2:100 3:100 12:10 13:100 15:10000 16:250 202:1000 203:100 204:500 206:20 207:1000:32 209:1000" + +PASS=0 +FAIL=0 +WEAK=0 +../ao-tools/ao-chaosread/ao-chaosread $serial --infinite --bytes | for test in $tests done; do +    case $test in +	*:*:*) +	    dnum=`echo $test | sed 's/:.*$//'` +	    tnum=`echo $test | sed 's/^[^:]*://'` +	    tnum=`echo $test | sed 's/^[^:]*://' | sed 's/:.*$//'` +	    nnum=`echo $test | sed 's/^.*://'` +	    opts="-d $dnum -t $tnum -n $nnum" +	    ;; +	*:*) +	    dnum=`echo $test | sed 's/:.*$//'` +	    tnum=`echo $test | sed 's/^.*://'` +	    opts="-d $dnum -t $tnum" +	    ;; +	*) +	    dnum=$test +	    opts="-d $dnum" +	    ;; +    esac +    case $dnum in +    done) +	echo DONE +	;; +    *) +	echo TEST $dnum +	dieharder -g 200 $opts +	;; +    esac +done | while read result; do +    case "$result" in +	TEST*) +	    testnum=`echo $result | sed 's/TEST //'` +	    ;; +	*PASSED*) +	    PASS=`expr $PASS + 1` +	    ;; +	*WEAK*) +	    WEAK=`expr $WEAK + 1` +	    ;; +	*FAILED*) +	    echo test $testnum failed +	    FAIL=`expr $FAIL + 1` +	    ;; +	DONE) +	    echo pass $PASS weak $WEAK fail $FAIL +	    case $PASS:$FAIL in +		[1-9]*:0) +		    echo -e '\e[32m'ChaosKey $snum is ready to ship'\e[39m' +		    exit 0 +		    ;; +		*) +		    echo -e '\e[31m'ChaosKey $snum failed'\e[39m' +		    exit 1 +		    ;; +	    esac +	    ;; +    esac +done diff --git a/ao-bringup/turnon_chaoskey b/ao-bringup/turnon_chaoskey index 8c20ebaa..990382f4 100755 --- a/ao-bringup/turnon_chaoskey +++ b/ao-bringup/turnon_chaoskey @@ -24,10 +24,17 @@ echo "Expectations:"  echo "\tChaosKey v$VERSION powered from USB"  echo -$DFU_UTIL -a 0 -s 0x08000000:leave -D ../src/chaoskey-v$VERSION/flash-loader/chaoskey-v$VERSION*.bin || exit 1 +FLASH_FILE=~/altusmetrumllc/Binaries/loaders/chaoskey-v1.0-altos-flash-*.bin +ALTOS_FILE=~/altusmetrumllc/Binaries/chaoskey-v1.0-*.elf + +$DFU_UTIL -a 0 -s 0x08000000:leave -D $FLASH_FILE || exit 1  sleep 2 -$USBLOAD --serial=1 ../src/chaoskey-v$VERSION/chaoskey-v$VERSION*.ihx || exit 1 +$USBLOAD --serial=1 $ALTOS_FILE || exit 1 + +sleep 1 + +./test-chaoskey  exit $? diff --git a/ao-bringup/turnon_telemega b/ao-bringup/turnon_telemega index 62f51fba..e2b539e1 100755 --- a/ao-bringup/turnon_telemega +++ b/ao-bringup/turnon_telemega @@ -16,17 +16,31 @@ fi  VERSION=2.0  REPO=~/altusmetrumllc/Binaries +PRODUCT=TeleMega -echo "TeleMega v$VERSION Turn-On and Calibration Program" +echo "$PRODUCT v$VERSION Turn-On and Calibration Program"  echo "Copyright 2014 by Bdale Garbee.  Released under GPL v2"  echo  echo "Expectations:" -echo "\tTeleMega v$VERSION powered from USB" +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 "TeleMega-$VERSION serial number: " -read SERIAL + +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  echo $FLASH_STM @@ -54,7 +68,11 @@ echo 'E 0' > $dev  SERIAL=$SERIAL ./cal-freq $dev -../ao-tools/ao-cal-accel/ao-cal-accel $dev +failed=1 +while [ $failed = 1 ]; do +    ../ao-tools/ao-cal-accel/ao-cal-accel $dev +    failed=$? +done  echo 'E 1' > $dev diff --git a/ao-bringup/turnon_telemetrum b/ao-bringup/turnon_telemetrum index ba40a08a..5c62c49d 100755 --- a/ao-bringup/turnon_telemetrum +++ b/ao-bringup/turnon_telemetrum @@ -15,17 +15,32 @@ else  fi  VERSION=2.0 +PRODUCT=TeleMetrum -echo "TeleMetrum v$VERSION Turn-On and Calibration Program" +echo "$PRODUCT v$VERSION Turn-On and Calibration Program"  echo "Copyright 2014 by Bdale Garbee.  Released under GPL v2"  echo  echo "Expectations:" -echo "\tTeleMetrum v$VERSION powered from USB" +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 "TeleMetrum-$VERSION serial number: " -read SERIAL +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 <serial-number>" 1>&2 +	exit 1; +	;; +esac  echo $FLASH_STM @@ -53,7 +68,11 @@ echo 'E 0' > $dev  SERIAL=$SERIAL ./cal-freq $dev -../ao-tools/ao-cal-accel/ao-cal-accel $dev +failed=1 +while [ $failed = 1 ]; do +    ../ao-tools/ao-cal-accel/ao-cal-accel $dev +    failed=$? +done  echo 'E 1' > $dev | 
