Skip to content

Commit

Permalink
artiq_flash.sh: some cleanup
Browse files Browse the repository at this point in the history
fallen committed May 14, 2015
1 parent e557d7e commit e9b166b
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions artiq/frontend/artiq_flash.sh
Original file line number Diff line number Diff line change
@@ -117,22 +117,20 @@ 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
echo "Flashing failed. Maybe you do not have permission to access the USB device?"
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

0 comments on commit e9b166b

Please sign in to comment.