forked from M-Labs/artiq
1
0
Fork 0

artiq_flash: check that xc3sprog is found. closes #162

This commit is contained in:
Sebastien Bourdeauducq 2015-10-30 15:52:03 +08:00
parent 41543662b2
commit 58f55fc630
1 changed files with 10 additions and 3 deletions

View File

@ -166,9 +166,17 @@ fi
set +e
xc3sprog -c $CABLE -R > /dev/null 2>&1
if [ "$?" != "0" ]
STATUS=$?
set -e
if [ "$STATUS" == "127" ]
then
echo "Flashing failed. Maybe you do not have permission to access the USB device?"
echo "xc3sprog not found. Please install it or check your PATH."
exit
fi
if [ "$STATUS" != "0" ]
then
echo "Failed to connect to FPGA."
echo "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"
@ -177,7 +185,6 @@ then
echo "Please make sure you used the correct -t option (currently: $BOARD)"
exit
fi
set -e
if [ ! -z "$FILENAME" ]
then