summaryrefslogtreecommitdiffstats
path: root/fpga/xilinx
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-04-15 14:40:25 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-04-15 14:40:25 -0500
commit401379667e6ae3a9ed856371866b245a21fde64e (patch)
tree62a3e73805b58c4aed0987aa8fde79435a04c8c4 /fpga/xilinx
parent98d8958426c8dd3a77c7838722d819a4197b72b7 (diff)
downloadulab-401379667e6ae3a9ed856371866b245a21fde64e.tar.gz
ulab-401379667e6ae3a9ed856371866b245a21fde64e.zip
Properly report device programming errors
Diffstat (limited to 'fpga/xilinx')
-rwxr-xr-xfpga/xilinx/programmer/program_device.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/fpga/xilinx/programmer/program_device.sh b/fpga/xilinx/programmer/program_device.sh
index 364330f..3e8bfb6 100755
--- a/fpga/xilinx/programmer/program_device.sh
+++ b/fpga/xilinx/programmer/program_device.sh
@@ -11,6 +11,17 @@ fi
UNIQUEID=$(date "+%s%N")
DEVICETYPE=$(bitdevice $1)
SVFFILE=/tmp/${UNIQUEID}.svf
+if [[ $? != 0 ]]; then
+ exit 1
+fi
bit2svf $1 $SVFFILE $DEVICETYPE
+if [[ $? != 0 ]]; then
+ rm -f $SVFFILE
+ exit 1
+fi
xsvf-rpi -v -s $SVFFILE
+if [[ $? != 0 ]]; then
+ rm $SVFFILE
+ exit 1
+fi
rm $SVFFILE