From 46d8197bb80ce3fe4cdc7b36c3be211366093bd5 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Fri, 16 Mar 2018 14:49:04 -0700 Subject: ao-bringup: Don't wait for user when testing EasyMini igniters I always have the LEDs ready to go before starting the turnon process. Signed-off-by: Keith Packard --- ao-bringup/test-easymini | 2 +- ao-bringup/test-igniters-nowait | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100755 ao-bringup/test-igniters-nowait (limited to 'ao-bringup') diff --git a/ao-bringup/test-easymini b/ao-bringup/test-easymini index 7850b550..ddcfcd54 100755 --- a/ao-bringup/test-easymini +++ b/ao-bringup/test-easymini @@ -21,7 +21,7 @@ while [ $found -eq 0 ]; do echo -e '\e[34m'Testing $product $serial $dev'\e[39m' echo "" - ./test-igniters "$dev" drogue main + ./test-igniters-nowait "$dev" drogue main echo "" echo "Testing baro sensor" diff --git a/ao-bringup/test-igniters-nowait b/ao-bringup/test-igniters-nowait new file mode 100755 index 00000000..849f91de --- /dev/null +++ b/ao-bringup/test-igniters-nowait @@ -0,0 +1,26 @@ +#!/bin/sh + +dev="$1" +shift + +for igniter in "$@"; do + pass="n" + while [ $pass != "y" ]; do + + echo "Testing $igniter igniter." + ../ao-tools/ao-test-igniter/ao-test-igniter --tty="$dev" $igniter + + case $? in + 0) + echo "pass" + pass="y" + ;; + *) + echo -n "Failed. Try again. Press enter to continue..." + read foo < /dev/tty + ;; + esac + done +done + +exit 0 -- cgit v1.2.3 From 7068149704e6de67ece670227445e987421cd600 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Fri, 16 Mar 2018 14:50:29 -0700 Subject: chaoskey: Create unified ROM image with both loader and app Flash the whole thing all at once to reduce the number of steps during turnon. Signed-off-by: Keith Packard --- ao-bringup/turnon_chaoskey | 8 ++++---- src/chaoskey-v1.0/Makefile | 9 ++++++++- 2 files changed, 12 insertions(+), 5 deletions(-) (limited to 'ao-bringup') diff --git a/ao-bringup/turnon_chaoskey b/ao-bringup/turnon_chaoskey index 4a255bff..d710e5ff 100755 --- a/ao-bringup/turnon_chaoskey +++ b/ao-bringup/turnon_chaoskey @@ -24,14 +24,14 @@ echo "Expectations:" echo "\tChaosKey v$VERSION powered from USB" echo -FLASH_FILE=~/altusmetrumllc/Binaries/loaders/chaoskey-v1.0-altos-flash-*.bin -ALTOS_FILE=~/altusmetrumllc/Binaries/chaoskey-v1.0-*.elf +FLASH_FILE=~/altusmetrumllc/Binaries/chaoskey-v1.0-all-*.bin +#ALTOS_FILE=~/altusmetrumllc/Binaries/chaoskey-v1.0-*.elf $DFU_UTIL -a 0 -s 0x08000000:leave -D $FLASH_FILE || true -sleep 2 +#sleep 2 -$USBLOAD --serial=1 $ALTOS_FILE || exit 1 +#$USBLOAD --serial=1 $ALTOS_FILE || exit 1 sleep 1 diff --git a/src/chaoskey-v1.0/Makefile b/src/chaoskey-v1.0/Makefile index f2c168ba..dea5b483 100644 --- a/src/chaoskey-v1.0/Makefile +++ b/src/chaoskey-v1.0/Makefile @@ -51,12 +51,13 @@ CFLAGS = $(PRODUCT_DEF) $(STMF0_CFLAGS) -g -Os PROGNAME=chaoskey-v1.0 PROG=$(PROGNAME)-$(VERSION).elf HEX=$(PROGNAME)-$(VERSION).ihx +BIN=$(PROGNAME)-all-$(VERSION).bin METAINFO=org.altusmetrum.ChaosKey.metainfo.xml SRC=$(ALTOS_SRC) ao_chaoskey.c OBJ=$(SRC:.c=.o) -all: $(PROG) $(HEX) +all: $(PROG) $(HEX) $(BIN) $(PROG): Makefile $(OBJ) altos.ld $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(OBJ) $(LIBS) @@ -66,6 +67,12 @@ ao_product.h: ao-make-product.5c ../Version $(OBJ): $(INC) +$(BIN): $(PROG) $(LOADER) + $(MAKEBIN) --output=$@ --base=$(FLASH_ADDR) $(LOADER) $(PROG) + +$(LOADER): + +cd flash-loader && make + %.cab: $(PROG) $(HEX) $(METAINFO) gcab --create --nopath $@ $(PROG) $(HEX) $(METAINFO) -- cgit v1.2.3 From 788d02a3caf0f14f3c84ff6ae7e2a2fff302e91b Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Fri, 16 Mar 2018 14:51:22 -0700 Subject: ao-bringup: Check for Loader USB id before attempting dfu-util This lets me restart the turnon process after the boot loader has been flashed. Signed-off-by: Keith Packard --- ao-bringup/turnon_easymini | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'ao-bringup') diff --git a/ao-bringup/turnon_easymini b/ao-bringup/turnon_easymini index 7db72665..3bef3145 100755 --- a/ao-bringup/turnon_easymini +++ b/ao-bringup/turnon_easymini @@ -52,11 +52,13 @@ 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 +if lsusb -d 0483:df11 | grep -q STM; then + echo $DFU_UTIL -v -v -R -a 0 -s 0x08000000:leave -D $FLASH_FILE -$DFU_UTIL -a 0 -s 0x08000000:leave -D $FLASH_FILE || exit 1 + $DFU_UTIL -a 0 -s 0x08000000:leave -D $FLASH_FILE -sleep 2 + sleep 2 +fi echo $USBLOAD $ALTOS_FILE -- cgit v1.2.3