These instructions are for a fresh installation of Ubuntu 14.10. Many of these steps are not going to be necessary for Windows. Look for an update to these instructions with details on a Windows installation soon.
To use the Scarab IDE, you will need the Xilinx ISE tool, a free tool to compile .bit files for the Xilinx family of Spartan FPGAs. There are three quests you will need to embark on while installing the Xilinx ISE tool: getting the license file, the libQT Network library, and a USB cable driver.
Once you have the Xilinx ISE ready to go, you will need to get xc3sprog, a tool to download the .bin file generated by the Xilinx ISE to your miniSpartan6+ board. Installing xc3sprog will involve a quest to acquire libFTDI, a free USB driver library.
You will need to install Java:
sudo apt-get update
sudo apt-get install default-jdk
sudo apt-get install python-software-updates
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get install oracle-java7-installer
sudo update-alternatives --config java
Installing the Xilinx ISE Design Suite
Download the Xilinx ISE Design Suite from here:
These instructions are for the latest version that was available when they were written, 14.7. For Linux, the file is 6.09 GB.
Uncompress the tar file and move into the directory:
tar -xvf Xilinx_ISE_DS_Lin_14.7_1015_1.tar
Now we run the installation script. It’s going to complain, because it won’t have the right USB drivers installed, but don’t worry, we are going to fix this later. The ISE Design Suite also needs a license from Xilinx (a free file basically, you just need to register to get it), and while the installation program has an in-built dialogue to generate and download this, it might not work, but don’t worry, we can also do it on our own.
You will be asked which software to install, select the ISE WebPACK, which will need about 16 GB of space. Keep note of the path you decide to install to. In this example, we are installing to:
Uncheck the option to install the USB cable drivers, we will be doing this ourselves later.
Check Enable WebTalk
Check Acquire/Manage the license key
Once some things are installed, the License Manager will pop open. There is an option to open a browser and get a license from Xilinx inside this installation program, and this usually works. Once you register on the website, it will generate a .lic file, and the installation program should find this on its own.
Installing a pre-req: the libQt_Network library for the License Manager
In the fresh Ubuntu install I used, I found I did not have the libQt library, which is needed by the Xilinx License Manager. If you need it as well, here is how to install it:
unzip libQt_Network.zip -d libqt
sudo cp libQt_Network_lin64.so /opt/Xilinx/14.7/ISE_DS/common/lib/lin64/libQt_Network.so
sudo chmod 755 /opt/Xilinx/14.7/ISE_DS/common/lib/lin64/libQt_Network.so
Getting the license file on your own:
If you cannot get the license generated and properly configured with the Xilinx ISE installation program, quit the installation, and go to the website yourself:
You will need your email to create an account, which is free. We want what is called a “node-locked license.” If you do this license creation on your own through the Xilinx website, you will get an option to have the .lic file emailed to you as an attachment. It’s a binary file with a special license code in it. Get this file and put it somewhere on your machine.
Now, we will need to relaunch the Xilinx License Manager on our own and tell it where to find our license:
Once this launches, you can point it to the .lic file.
Installing a pre-req: USB cable drivers:
We are going to be using an open-source USB driver set from Michael Gernoth.
To use this, we will need a few libraries which don’t usually come installed on a fresh Ubuntu install:
sudo apt-get install gitk git-gui libusb-dev build-essential libc6-dev-i386 fxload
Now we are going to use the git tool to download Michael Gernoth’s USB drivers. I just went ahead and put these in a sub-directory of the Xilinx ISE install:
sudo git clone git://git.zerfleddert.de/usb-driver
sudo ./setup_pcusb /opt/Xilinx/14.7/ISE_DS/ISE/
Now we want to run a script and set some things in our .bashrc file to make sure things point to the right executables:
echo "PATH=\$PATH:/opt/Xilinx/14.7/ISE_DS/ISE/bin/lin64/" >> ~/.bashrc
echo "export PATH" >> ~/.bashrc
We will need subversion, cmake, and libconfuse, then we can install libFTDI, then xc3sprog.
sudo apt-get install subversion
sudo apt-get install libconfuse
sudo apt-get install cmake
Installing a pre-req: libFTDI:
Download the libFTDI source from here: http://www.intra2net.com/en/developer/libftdi/download.php
Unzip the code, move into the build sub directory, and copy the library files and headers to their usual homes. We go into the directory for 64-bit, since we are using a 64-bit machine:
sudo cp lib* /usr/local/lib
sudo chmod 0755 /usr/local/lib/libftd2xx.so.1.1.12
sudo ln -sf /usr/local/lib/libftd2xx.so.1.1.12 /usr/local/lib/libftd2xx.s
sudo cp ftd2xx.h /usr/local/include/
sudo chmod 0755 /usr/local/include/ftd2xx.h
sudo cp WinTypes.h /usr/local/include/
sudo chmod 0755 /usr/local/include/WinTypes.h
Now we are ready to install xc3sprog itself:
svn co https://xc3sprog.svn.sourceforge.net/svnroot/xc3sprog/trunk xc3sprog
sudo make install