From e9b166b1993d2dc356cb0e7bcc6513eb03d5ad17 Mon Sep 17 00:00:00 2001 From: Yann Sionneau Date: Thu, 14 May 2015 11:11:54 +0200 Subject: [PATCH] artiq_flash.sh: some cleanup --- artiq/frontend/artiq_flash.sh | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/artiq/frontend/artiq_flash.sh b/artiq/frontend/artiq_flash.sh index b9ab1dc6e..93bc710c2 100755 --- a/artiq/frontend/artiq_flash.sh +++ b/artiq/frontend/artiq_flash.sh @@ -117,11 +117,7 @@ then FLASH_BITSTREAM=1 fi -check_return() { - echo "Flashing failed, you may want to re-run the flashing tool." - exit -} - +set +e xc3sprog -c $CABLE -R > /dev/null 2>&1 if [ "$?" != "0" ] then @@ -129,10 +125,12 @@ then echo "To fix this you might want to add a udev rule by doing:" echo "$ sudo cp $ARTIQ_PREFIX/misc/$UDEV_RULES /etc/udev/rules.d" echo "Then unplug/replug your device and try flashing again" + echo + echo "Other reason could be that you chosed the wrong target" + echo "Please make sure you used the correct -t option (currently: $BOARD)" exit fi - -trap check_return ERR +set -e if [ "${FLASH_BITSTREAM}" == "1" ] then