New Horizons

Welcome to my blog

My name is Sven Andersson and I
work as a consultant in embedded
system design, implemented in ASIC
and FPGA.
In my spare time I write this blog
and I hope it will inspire others to
learn more about this fantastic field.
I live in Stockholm Sweden and have
my own company

Contact

You are welcome to contact me
and ask questions or make comments
about my blog.

Before we can run the application we have to connect to our ZedBoard. Here is a list of things to do:

Connect the power cable to the ZedBoard

Connect two micro-USB cables between the host computer and the ZedBoard connectors J17 (JTAG) and J14 (UART)

Set jumpers to Cascaded JTAG Mode MIO[6:2] = GND

Power on the ZedBoard

Install JTAG cable drivers

Setup a terminal emulator

ZedBoard USB ports

Programming port (JTAG)

UART port

ZedBoard jumpers

ZedBoard connected

USB plug and play

We all know that connecting an USB device to our computer is "plug and play". When inserting a memory flash card it just pops up on our computer screen. Connecting a Xilinx development board is not always plug and play. Especially not if we are using Ubuntu Linux. Since I started playing with Xilinx boards I have had a hard time to get the USB functionality to work, both the JTAG programming and connecting a terminal through the UART USB port. Has anything changed with the new Vivado software? Let's power on the ZedBoard and find out.

USB ports in Mac OS X

After powering on the ZedBoard we should see the two USB ports called something like this:

Digilent USB Device (JTAG port)

2012 Cypress Semiconductor Cypress-USB2UART (UART port)

The system report shows us the following information about the connected USB ports.

Enable USB ports in VirtualBox

To enable the two USB ports in VirtualBox select Settings

and then Ports and USB.

Click the + button and add the two ports. If you don't see both ports try to unplug and plug in the USB cables with the ZedBoard still powered on. Now we can return to Ubuntu Linux.

Device 005 (USB to UART) and 006 (USB to JTAG) are the two USB ports we are using.

Install Digilent Adept JTAG drivers

Xilinx uses software from Digilent to configure Xilinx logic devices, initialize scan chains, program FPGAs, CLPDs and PROM. We will go to the Digilent web page and download all software from there. I know that some of this software is hidden somewhere in the SDK installation (/opt/Xilinx/SDK/2013.4/data/xicom/cable_drivers) but I prefer to do this installation from scratch and try to understand what is going on.

To install the Digilent Adept software we will run the three install scripts and copy the plugins to the SDK installation directory.

cd $HOME/Downloads/digilent.adept_runtime_2.15.3-x86_64

sudo sh ./install.sh

cd ftdi.drivers_1.0.4-x86_64

sudo sh ./install.sh

cd $HOME/Downloads/digilent.adept_utilities_2.1.1-x86_64

sudo sh ./install.sh

Let the installer put everything in default locations.

When using the latest version of Digilent Adept the following files have been downloaded.

Use the following commands to install the deb files:

-> sudo dpkg -i digilent.adept_runtime_2.16.1-2_amd64.deb

-> sudo dpkg -i digilent.adept_utilities_2.2.1-amd64.deb

Copy Digilent plugins

We will copy the plugins to the directory:

/opt/Xilinx/SDK/2013.4/lib/lin64/plugins/Digilent/libCseDigilent

When using Vivado 2015.1 the plugin files will be placed here.

Here is the answer from Xilinx forum. I don't know if this is the right place. You can try both solutions. Put them in the following location: "<Xilinx_vivado_installed_directory>/Xilinx/Vivado/<version>/data/xicom/vcse_plugins/lnx64.g/Digilent/libCseDigilent" folder

The rules file 52-digilent-usb.rules has been installed in the directory /etc/udev/rules.d

Finish the installationBefore we can use the Digilent cable drivers we have to reboot Ubuntu Linux or run this command to initialize the new udev rules file:

sudo udevadm control --reload-rules

Digilent JTAG Config Utility program

Included in the Digilent Adept installation is a command-line program called "djtgcfg" (who came up with this name). We can use this program to test if the JTAG connection to the ZedBoard works.

Use this command to discover and list the board connected:

djtgcfg enum

Congratulations! We have established a connection with our ZedBoard.

Summary

It wasn't exactly "plug and play". Without a working connection between our computer and the development board, Xilinx software and hardware is useless. Installing the JTAG cable drivers is a major stumbling block for many Linux users. I think it is high time to make it 100% "plug and play", once and forever.

jmales2 March 10, 2015 02:30 PM PDTI finally managed to get it working.

I had to install again the diligent packages because I think that I probably didn't install them the first time in the default folders.

jmales2 March 9, 2015 07:43 PM PDTHello and thank you for the tutorial.

I'm doing everything like you said but my SDK is the 2014.4 and not the 2013.4. So, there is no /lib/lin64/plugins/Digilent/ folder but only a /lib/lnx64.o.

I copy the 2 files to this last folder but the results aren0t the same as when I do "djtgcfg enum" no devices are found, even though "lsusb" finds the Zedboard.

Can you help me please?

anjosi September 18, 2014 12:51 PM PDTThanks for the guide!
Great work! I have managed to get everything working just by following your thorough guide.
However I have a little problem with the usb connections. If the usb are connected and up on the host machine before I start the guest, then everything works well. lsusb show bot usb connecions and djtgcfg enum lists the Zed. The problem comes when I disconnect and reconnect the cables while the guest machine (Ubuntu) is running. After that, I cannot see the connection on the guest anymore.

Can you tell what could be the problem?

Br,
anjosi

Lewis July 11, 2014 05:10 PM PDTI had a problem in install the software.

svenand July 11, 2014 08:23 AM PDTHi Murad
I am sorry but I don't have time to look at this right now. I will be back from vacation beginning of August and then I will take a look at this problem.
Sven

murad July 11, 2014 07:52 AM PDTThanks alot for a great blog.
I installed Vivado 2014.2 and Ubuntu 14.04 LTS. I was able to successfully follow alone up to the end of step 13. I can't connect to the ZedBoard though. everytime I run djtgcfg enum, it returns none found...I tried the link in this blog but I am new to linux and not sure how to run all the commands. Any help is appreciated

svenand June 4, 2014 06:49 AM PDTHi Marty,
I was unable to get the JTAG STDIO in SDK to work. Don't know why. I have used a terminal emulator like GTKterm or screen all the time.

Nadine June 3, 2014 12:51 PM PDTHi Svand,
I have a Ubuntu 14.04 32bits machine. I followed your instruction, but when installing digilent adept runtime for i686 (sh ./install.sh), I've got an error:
install.sh: line 445: ./install-slib.sh : Permission denied
error: failed to install lib/libdabs.so.2.14.1
Is there any workaround for this?