Friday, June 11, 2010

Complete installation of Xilinx ISE suite

OS: Ubuntu 10.04 Lucid Lynx
Kernel: 2.6.31.22 - generic
Date: June 11th, 2010
 
Installing ISE is probably pretty simple but I found getting every aspect working is bit of a work
 So here is procedure which I followed and got everything to work as per my requirements.

 Some prerequisites and heads ups are:
  • I used iso image of Xilinx ISE (i.e. I didn't try webinstall) and if you want to use cd/dvd there is particular way to mount it, you will have to check about it.
  • My installation directory is /media/WorkSpace/Xilinx (default is /opt/Xilinx). Here I'll assume /path/to/installation/folder/Xilinx
  • On windows machine (or probably other linuxes as well) path for ISE components is /path/to/installation/folder/Xilinx/10.1/ however I found it to be simply /path/to/installation/folder/Xilinx so if you find any path mismatch please correct it according to your requirements.
  • My system is 32-bit and I used 10.1 version of Xilinx ISE so the guide suppose to work with them.
I suppose thats all for now will add if I remember something else or if I get a feedback asking for something

Now procedure to get it installed:
  • Mount iso image in home directory under some folder (or anywhere where use have full rights else installation will fail).
  • Open termianl then cd to image mounted folder and run setup script (./setup).
  • Follow the steps to complete installation. Write down installation path somewhere, even Xilinx installation window shows all paths, you can copy and paste those to some text file or write them down on a paper.
  • Assuming installation competed successfully, here are steps just to start ISE with a single command (I called it startise, you can call whatever you feel like).
  • echo "export DISPLAY=:0 >> /path/to/installation/folder/Xilinx/ISE/settings32.sh
  • echo "exec ise" >> /path/to/installation/folder/Xilinx/ISE/settings32.sh
  • chmod +x /path/to/installation/folder/Xilinx/ISE/settings32.sh Now you can run ISE from this particular settings32.sh however for system wide access use following command
  • sudo cp /path/to/installation/folder/Xilinx/ISE/settings32.sh /usr/local/bin/startise (You can replace startise by whatever name you like)

Well thats installation and starting ISE however if you have noticed chipscope, xps and some other compatible programs will not just work.
Follow the steps to setup your environment. Again my installation folder is /media/WorkSpace/Xilinx, Here we are using path/to/installation/folder/Xilinx
I setup environment as I need it (through a simple shell script), however uf you want, you can just add these lines to .bashrc (in home folder) so as to get it setup on startup
  • export PLATFORM=lin
  • export XILINX=/path/to/installation/folder/XILINX/ISE for e.g. export XILINX=/media/WorkSpace/Xilinx/ISE
  • export XILINX_EDK=/path/to/installation/folder/XILINX/EDK
  • export CHIPSCOPE=/path/to/installation/folder/XILINX/ChipScope
  • export XILINX_PLANAHEAD=/path/to/installation/folder/Xilinx/PlanAhead
  • export PATH=$PATH:${XILINX}/bin/${PLATFORM}:${XILINX_EDK}/lib/${PLATFORM}:${CHIPSCOPE}/bin/${PLATFORM}: ${XILINX_PLANAHEAD}/bin/${PLATFORM}
  • export LD_LIBRARY_PATH=${XILINX}/lib/${PLATFORM}:${XILINX_EDK}/lib/${PLATFORM}:${CHIPSCOPE}/lib/${PLATFORM}: ${CHIPSCOPE}/xilinx/lib/${PLATFORM}:${XILINX_PLANAHEAD}/lib/${PLATFORM}
  • Thats seems enough for getting everything running (not sure if Xilinx have any more features).
  • Probably the last piece of installation is to get programming USB cable working:
  • Prerequisites, Install following programs:
  • sudo apt-get install gitk git-gui libusb-dev build-essential libc6-dev fxload
  • I would assume you want USB drivers to be at /path/to/USB/driver/folder for e.g. /media/WorkSpace/Xilinx/ in my case and get USB drivers lib
  • git clone git://git.zerfleddert.de/usb-driver
  • Compiling USB drivers:
  • cd /path/to/USB/driver/folder/usb-driver
  • make
  • Now you need to link these compiled drivers with impact tool. This step can be added to setting up environment step (script or .bashrc)
  • export LD_PRELOAD=/path/to/USB/driver/folder/usb-driver/libusb-driver.so
At this point USB driver installation and linking is done, however you will still need to add few tweaks to make it work without giving an error for root user.
Basically we need to copy /path/to/installation/folder/Xininx/ISE/bin/lin/xusbdfwu.rules to /etc/udev/rules.d with proper name and by replacing TEMPNODE by tempnode however procedure is as follows (I didn't just copy pasted it but went through procedure you can try it the other way).
  • sudo sed /path/to/installation/folder/Xilinx/ISE/bin/lin/xusbdfwu.rules -e 's:TEMPNODE:tempnode:g' > /etc/udev/rules.d/50-xusbdfwu.rules
  • I used 50-xusbdfwu.rules as a new name to maintain consistency with naming convention in rules.d directory, however I suppose any name would be fine.
  • sudo cp /path/to/installation/folder/Xilinx/ISE/bin/lin/xusb*.hex /usr/share
  • sudo /etc/init.d/udev restart
  • If you do lsusb after connecting powered ON board through a USB cable, lsusb should show Vendor id as 03fd and product id as 0008 for Xilinx cable (This one didn't work for me right away I needed to Restart my machine)
After install steps:
Xilinx complains about missing gmake utility while compiling hardware, simply add soft link to make to get it working
  • sudo ln -s /usr/bin/make /usr/bin/gmake

As you can see it was pretty lengthy process and I needed quite a while to get everything working. Along the way I found many tutorials and to-do's, I'm really thankful to all of them for taking efforts, all links I followed are mostly listed at the end of this page. I'm sure I must have missed some pieces, if you find any missing link in this guide please mail me, I'll try to solve it at my best

Links followed (Last Checked June 5th 2010):
http://www.george-smart.co.uk/wiki/Xilinx_JTAG_Linux
http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/archive/2007/03/msg00101.html
http://forums.xilinx.com/t5/EDK-and-Platform-Studio/EDK-10-1-sp3-Ubuntu-8-10/m-p/27344
http://ubuntuforums.org/showthread.php?t=255573
http://heilubuntu.blogspot.com/search?q=xilinx
http://www.xilinx.com/support/answers/11630.htm

Thats all for Xilinx installation.

Few Notes

Hey,
 Its Summer again :) Got some time to document my struggle with Xilinx and got my site up and running.
 So from now on most of the posts which appear here will be available at: ubuntu section of my website.

 Another news: Blogger came up with new layouts, yippie. That means you will have to put up with periodically changing blog design -- Sorry about that in advance.
 
Anyway enjoy.