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.



Content

New Horizons
What's new
Starting a blog
Writing a blog
Using an RSS reader

Zynq Design From Scratch
Started February 2014
1 Introduction
Changes and updates
2 Zynq-7000 All Programmable SoC
3 ZedBoard and other boards
4 Computer platform and VirtualBox
5 Installing Ubuntu
6 Fixing Ubuntu
7 Installing Vivado
8 Starting Vivado
9 Using Vivado
10 Lab 1. Create a Zynq project
11 Lab 1. Build a hardware platform
12 Lab 1. Create a software application
13 Lab 1. Connect to ZedBoard
14 Lab 1. Run a software application
15 Lab 1. Benchmarking ARM Cortex-A9
16 Lab 2. Adding a GPIO peripheral
17 Lab 2. Create a custom HDL module
18 Lab 2. Connect package pins and implement
19 Lab 2. Create a software application and configure the PL
20 Lab 2. Debugging a software application
21 Running Linux from SD card
22 Installing PetaLinux
23 Booting PetaLinux
24 Connect to ZedBoad via ethernet
25 Rebuilding the PetaLinux kernel image
26 Running a DHCP server on the host
27 Running a TFTP server on the host
28 PetaLinux boot via U-boot
29 PetaLinux application development
30 Fixing the host computer
31 Running NFS servers
32 VirtualBox seamless mode
33 Mounting guest file system using sshfs
34 PetaLinux. Setting up a web server
35 PetaLinux. Using cgi scripts
36 PetaLinux. Web enabled application
37 Convert from VirtualBox to VMware
38 Running Linaro Ubuntu on ZedBoard
39 Running Android on ZedBoard
40 Lab2. Booting from SD card and SPI flash
41 Lab2. PetaLinux board bringup
42 Lab2. Writing userspace IO device driver
43 Lab2. Hardware debugging
44 MicroZed quick start
45 Installing Vivado 2014.1
46 Lab3. Adding push buttons to our Zynq system
47 Lab3. Adding an interrupt service routine
48 Installing Ubuntu 14.04
49 Installing Vivado and Petalinux 2014.2
50 Using Vivado 2014.2
51 Upgrading to Ubuntu 14.04
52 Using Petalinux 2014.2
53 Booting from SD card and SPI flash
54 Booting Petalinux 2014.2 from SD card
55 Booting Petalinux 2014.2 from SPI flash
56 Installing Vivado 2014.3

Chipotle Verification System
Introduction

EE Times Retrospective Series
It all started more than 40 years ago
My first job as an electrical engineer
The Memory (R)evolution
The Microprocessor (R)evolution

Four soft-core processors
Started January 2012
Introduction
Table of contents
Leon3
MicroBlaze
OpenRISC 1200
Nios II

Using the Spartan-6 LX9 MicroBoard
Started August 2011
Introduction
Table of contents
Problems, fixes and solutions

FPGA Design From Scratch
Started December 2006
Introduction
Table of contents
Index
Acronyms and abbreviations

Actel FPGA design
Designing with an Actel FPGA. Part 1
Designing with an Actel FPGA. Part 2
Designing with an Actel FPGA. Part 3
Designing with an Actel FPGA. Part 4
Designing with an Actel FPGA. Part 5

CAD
A hardware designer's best friend
Zoo Design Platform

Linux
Installing Cobra Command Tool
A processor benchmark

Mac
Porting a Unix program to Mac OS X
Fixing a HyperTerminal in Mac OS X
A dream come true

Running
The New York City Marathon

Skiing/Skating
Kittelfjall Lappland

Tour skating in Sweden and around the world
Top
Introduction
SSSK
Wild skating
Tour day
Safety equipment
A look at the equipment you need
Skate maintenance
Links
Books, photos, films and videos
Weather forecasts

Travel
38000 feet above see level
A trip to Spain
Florida the sunshine state

Photo Albums
Seaside Florida
Ronda Spain
Sevilla Spain
Cordoba Spain
Alhambra Spain
KittelfjÀll Lapland
Landsort Art Walk
Skating on thin ice

Books
100 Power Tips for FPGA Designers

Favorites
Adventures in ASIC
ChipHit
Computer History Museum
DeepChip
Design & Reuse
Dilbert
d9 Tech Blog
EDA Cafe
EDA DesignLine
Eli's tech Blog
Embedded.com
EmbeddedRelated.com
FPGA Arcade
FPGA Blog
FPGA Central
FPGA CPU News
FPGA developer
FPGA Journal
FPGA World
Lesley Shannon Courses
Mac 2 Ubuntu
Programmable Logic DesignLine
OpenCores
Simplehelp
SOCcentral
World of ASIC



If you want to be updated on this weblog Enter your email here:



rss feed



 
Monday, February 17, 2014
Zynq design from scratch. Part 13.
Connecting to ZedBoard

Before we can run the application we have to connect to our ZedBoard. Here is a list of things to do:
  1. Connect the power cable to the ZedBoard
  2. Connect two micro-USB cables between the host computer and the ZedBoard connectors J17 (JTAG) and J14 (UART)
  3. Set jumpers to Cascaded JTAG Mode MIO[6:2] = GND
  4. Power on the ZedBoard
  5. Install JTAG cable drivers
  6. 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.


Using lsusb

The Linux command lsusb will tell us which USB ports are available.

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.

Digilent Adept

We will install the following 64bit applications:

Adept 2.15.3 Runtime, X64 Linux

Adept 2.1.1 Utilities, X64 Linux


Digilent Plugins for Xilinx Tools

We will install the following 64bit application:

Digilent Plug-in, 64bit Linux


The following files have been downloaded.


After unzipping and unpacking the file structure looks like this.



Installing Digilent Adept software

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.

Copy Digilent plugins

We will copy the plugins to the directory:

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





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





Finish the installation


Before 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.

Top   Previous   Next


Posted at 15:58 by svenand

anjosi
September 18, 2014   12:51 PM PDT
 
Thanks 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 PDT
 
I had a problem in install the software.

[root@bogon digilent.adept.runtime_2.15.3-x86_64]# sh ./install.sh
Adept Runtime Installer
64-bit operating system detected
In which directory should libraries be installed? [/usr/local/lib64/digilent/adept] y
Installing runtime libraries.....
error: invalid filename - lib64/libdabs.so
error: failed to install lib64/libdabs.so
Murad
July 11, 2014   09:32 AM PDT
 
The connection is working just fine now...I had the USB connected to the (USB OTG) instead of the (PROG)...The steps in this blog are all I had to do.
Thanks again

Murad
Murad
July 11, 2014   08:32 AM PDT
 
Thanks a lot for your prompt response. I understand. Enjoy Your Vacation!
svenand
July 11, 2014   08:23 AM PDT
 
Hi 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 PDT
 
Thanks 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 PDT
 
Hi 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.
Marty
June 4, 2014   04:25 AM PDT
 
Were you able to connect a microzed board in Vivado 2014.1? I was unable to get the Xilinix Platform cable firmware to load using the method described about, but I used the one here:
http://javispedro.com/fpga/xilinx-usb-linux.html
I am able to see the device in the Vivado hardware manager and upload programs from here. In the SDK, I am unable to get the JTAG STDIO to work.
Nadine
June 3, 2014   12:51 PM PDT
 
Hi 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?
 

Leave a Comment:

Name


Homepage (optional)


Comments




Previous Entry Home Next Entry