Install Diligent JTAG Drivers And SDK On Ubuntu 18:04

Updated: Apr 28

Download and install the SDK on Ubuntu

Please download Vivado 2020.1

Xilinx_Unified_2020.1_0602_1208_Lin64.bin


This includes the xsdb program.Now download and install Vivado on Ubuntu. Vivado includes the drivers for the JTAG cable.


# Install Vivado, run following commands


chmod +x Xilinx_Unified_2020.1_0602_1208_Lin64.bin

./Xilinx_Unified_2020.1_0602_1208_Lin64.bin


# To install the drivers on Linux, once Vivado is installed (we assume it’s been installed to /tools/Xilinx/), navigate to:

cd /tools/Xilinx/Vivado/2020.1/data/xicom/cable_drivers/lin64/install_script/install_drivers

# And then run the install_drivers script (with admin privileges) that resides in this directory: sudo ./install_drivers

# You will see following debug message

/tools/Xilinx/Vivado/2020.1/data/xicom/cable_drivers/lin64/install_script/install_drivers$ sudo ./install_drivers INFO: Installing cable drivers. INFO: Script name = ./install_drivers INFO: HostName = jimmy-VirtualBox INFO: Current working dir = /tools/Xilinx/Vivado/2020.1/data/xicom/cable_drivers/lin64/install_script/install_drivers INFO: Kernel version = 5.4.0-107-generic. INFO: Arch = x86_64. USB udev file exists and will not be updated. --File /etc/udev/rules.d/52-xilinx-ftdi-usb.rules exists. --File /etc/udev/rules.d/52-xilinx-ftdi-usb.rules version = 0001 --File 52-xilinx-ftdi-usb.rules exists. --File 52-xilinx-ftdi-usb.rules version = 0001 --File 52-xilinx-ftdi-usb.rules is already updated. --File /etc/udev/rules.d/52-xilinx-pcusb.rules exists. --File /etc/udev/rules.d/52-xilinx-pcusb.rules version = 0002 --File 52-xilinx-pcusb.rules exists. --File 52-xilinx-pcusb.rules version = 0002 --File 52-xilinx-pcusb.rules is already updated. INFO: Digilent Return code = 0 INFO: Xilinx Return code = 0 INFO: Xilinx FTDI Return code = 0 INFO: Return code = 0 INFO: Driver installation successful. CRITICAL WARNING: Cable(s) on the system must be unplugged then plugged back in order for the driver scripts to update the cables.


How to load and debug over JTAG

# We need set device board boot switch to 00, which is booting from JTAG # start xilinx hardware server, run following script /home/jimmy/petalinux/2021.1/peta/tools/xsct/bin/xsct # you will see following debug message

/home/jimmy/petalinux/2021.1/peta/tools/xsct/bin/xsct

rlwrap: warning: your $TERM is 'xterm-256color' but rlwrap couldn't find it in the terminfo database. Expect some problems.

****** Xilinx Software Commandline Tool (XSCT) v2021.1

**** SW Build 3240477 on 2021-06-05-19:57:09

** Copyright 1986-2021 Xilinx, Inc. All Rights Reserved.



xsct%

# run connect command to start hardware server


xsct% connect

attempting to launch hw_server

****** Xilinx hw_server v2021.1.0

**** Build date : Jun 5 2021 at 17:46:51

** Copyright 1986-2021 Xilinx, Inc. All Rights Reserved.


INFO: hw_server application started

INFO: Use Ctrl-C to exit hw_server application


INFO: To connect to this hw_server instance use url: TCP:127.0.0.1:3121


tcfchan#0

xsct%

# run targets command to get targets

xsct% targets

1 PS TAP

2 PMU

3 PL

5 PSU

6 RPU (Reset)

7 Cortex-R5 #0 (RPU Reset)

8 Cortex-R5 #1 (RPU Reset)

9 APU (L2 Cache Reset)

10 Cortex-A53 #0 (APU Reset)

11 Cortex-A53 #1 (APU Reset)

12 Cortex-A53 #2 (APU Reset)

13 Cortex-A53 #3 (APU Reset)

xsct%


# Open another terminal

# Setup PetaLinux Environment

cd ~petalinux-install-directory

source peta/settings.sh


​source peta/settings.sh

PetaLinux environment set to '/home/jimmy/petalinux/2021.1/peta'

INFO: Checking free disk space

INFO: Checking installed tools

INFO: Checking installed development libraries

INFO: Checking network and other services



# go to BSP source code directory

cd u96v2_sbc_base_2021_1

# Power on the device, and then run following commands

petalinux-boot --jtag --prebuild 3 --hw_server-url TCP:127.0.0.1:3121 -v


# You will see following debug message from host

petalinux-boot --jtag --prebuilt 3 --hw_server-url TCP:127.0.0.1:3121 -v

[INFO] Sourcing buildtools

XSDB Script:

INFO: Launching XSDB for file download and boot.

INFO: This may take a few minutes, depending on the size of your image.


connect -url TCP:127.0.0.1:3121

for {set i 0} {$i < 20} {incr i} {

if { [ta] != "" } break;

after 50

}

puts stderr "INFO: Configuring the FPGA..."

puts stderr "INFO: Downloading bitstream: /home/jimmy/petalinux/2021.1/u96v2_sbc_base_2021_1/pre-built/linux/implementation/download.bit to the target."

fpga "/home/jimmy/petalinux/2021.1/u96v2_sbc_base_2021_1/pre-built/linux/implementation/download.bit"

after 2000

targets -set -nocase -filter {name =~ "*PSU*"}

mask_write 0xFFCA0038 0x1C0 0x1C0

targets -set -nocase -filter {name =~ "*MicroBlaze PMU*"}


catch {stop}; after 1000

puts stderr "INFO: Downloading ELF file: /home/jimmy/petalinux/2021.1/u96v2_sbc_base_2021_1/pre-built/linux/images/pmufw.elf to the target."

dow "/home/jimmy/petalinux/2021.1/u96v2_sbc_base_2021_1/pre-built/linux/images/pmufw.elf"

after 2000

con

targets -set -nocase -filter {name =~ "*APU*"}

mwr 0xffff0000 0x14000000

mask_write 0xFD1A0104 0x501 0x0

after 5000

targets -set -nocase -filter {name =~ "*A53*#0"}


source /home/jimmy/petalinux/2021.1/u96v2_sbc_base_2021_1/project-spec/hw-description/psu_init.tcl

puts stderr "INFO: Downloading ELF file: /home/jimmy/petalinux/2021.1/u96v2_sbc_base_2021_1/pre-built/linux/images/zynqmp_fsbl.elf to the target."

dow "/home/jimmy/petalinux/2021.1/u96v2_sbc_base_2021_1/pre-built/linux/images/zynqmp_fsbl.elf"

after 2000

con

after 4000; stop; catch {stop}; psu_ps_pl_isolation_removal; psu_ps_pl_reset_config

targets -set -nocase -filter {name =~ "*A53*#0"}

puts stderr "INFO: Loading image: /home/jimmy/petalinux/2021.1/u96v2_sbc_base_2021_1/pre-built/linux/images/system.dtb at 0x00100000"

dow -data "/home/jimmy/petalinux/2021.1/u96v2_sbc_base_2021_1/pre-built/linux/images/system.dtb" 0x00100000

after 2000

targets -set -nocase -filter {name =~ "*A53*#0"}

puts stderr "INFO: Downloading ELF file: /home/jimmy/petalinux/2021.1/u96v2_sbc_base_2021_1/pre-built/linux/images/u-boot.elf to the target."

dow "/home/jimmy/petalinux/2021.1/u96v2_sbc_base_2021_1/pre-built/linux/images/u-boot.elf"

after 2000

targets -set -nocase -filter {name =~ "*A53*#0"}

puts stderr "INFO: Loading image: /home/jimmy/petalinux/2021.1/u96v2_sbc_base_2021_1/pre-built/linux/images/Image at 0x00200000"

dow -data "/home/jimmy/petalinux/2021.1/u96v2_sbc_base_2021_1/pre-built/linux/images/Image" 0x00200000

after 2000

targets -set -nocase -filter {name =~ "*A53*#0"}

puts stderr "INFO: Loading image: /home/jimmy/petalinux/2021.1/u96v2_sbc_base_2021_1/pre-built/linux/images/boot.scr at 0x20000000"

dow -data "/home/jimmy/petalinux/2021.1/u96v2_sbc_base_2021_1/pre-built/linux/images/boot.scr" 0x20000000

after 2000

targets -set -nocase -filter {name =~ "*A53*#0"}

puts stderr "INFO: Downloading ELF file: /home/jimmy/petalinux/2021.1/u96v2_sbc_base_2021_1/pre-built/linux/images/bl31.elf to the target."

dow "/home/jimmy/petalinux/2021.1/u96v2_sbc_base_2021_1/pre-built/linux/images/bl31.elf"

after 2000

con

puts stderr "INFO: Enter booti 0x00200000 - 0x00100000 in uboot terminal if auto boot fails"

exit

rlwrap: warning: your $TERM is 'xterm-256color' but rlwrap couldn't find it in the terminfo database. Expect some problems.: Inappropriate ioctl for device

INFO: Configuring the FPGA...

INFO: Downloading bitstream: /home/jimmy/petalinux/2021.1/u96v2_sbc_base_2021_1/pre-built/linux/implementation/download.bit to the target.

INFO: Downloading ELF file: /home/jimmy/petalinux/2021.1/u96v2_sbc_base_2021_1/pre-built/linux/images/pmufw.elf to the target.

INFO: Downloading ELF file: /home/jimmy/petalinux/2021.1/u96v2_sbc_base_2021_1/pre-built/linux/images/zynqmp_fsbl.elf to the target.

INFO: Loading image: /home/jimmy/petalinux/2021.1/u96v2_sbc_base_2021_1/pre-built/linux/images/system.dtb at 0x00100000

INFO: Downloading ELF file: /home/jimmy/petalinux/2021.1/u96v2_sbc_base_2021_1/pre-built/linux/images/u-boot.elf to the target.

INFO: Loading image: /home/jimmy/petalinux/2021.1/u96v2_sbc_base_2021_1/pre-built/linux/images/Image at 0x00200000

INFO: Loading image: /home/jimmy/petalinux/2021.1/u96v2_sbc_base_2021_1/pre-built/linux/images/boot.scr at 0x20000000

INFO: Downloading ELF file: /home/jimmy/petalinux/2021.1/u96v2_sbc_base_2021_1/pre-built/linux/images/bl31.elf to the target.

INFO: Enter booti 0x00200000 - 0x00100000 in uboot terminal if auto boot fails


# You will see following debug message from minicom/hyperterminal


Xilinx Zynq MP First Stage Boot Loader

Release 2021.1 Jun 6 2021 - 07:07:32

NOTICE: ATF running on XCZU3EG/silicon v4/RTL5.1 at 0xfffea000

NOTICE: BL31: v2.4(release):v1.1-7609-g851523ea2

NOTICE: BL31: Built : 08:27:07, Apr 28 2021

U-Boot 2021.01 (Jun 01 2021 - 11:54:06 +0000)

Board: Xilinx ZynqMP

DRAM: 2 GiB

PMUFW: v1.1

EL Level: EL2

Chip ID: zu3eg

NAND: 0 MiB

MMC: mmc@ff160000: 0, mmc@ff170000: 1

In: serial

Out: serial

Err: serial

Bootmode: JTAG_MODE

Reset reason: EXTERNAL

Net: No ethernet found.

Hit any key to stop autoboot: 0

JTAG: Trying to boot script at 20000000

## Executing script at 20000000

Trying to load boot images from jtag

Wrong Ramdisk Image Format

Ramdisk image is corrupt or invalid

Trying to load boot images from pxe

Trying to load boot images from dhcp

Trying to load boot images from jtag

Wrong Ramdisk Image Format

Ramdisk image is corrupt or invalid

Trying to load boot images from mmc0

Importing environment(uEnv.txt) from mmc0...

## Info: input data size = 26 = 0x1A

Wrong Image Format for bootm command

ERROR: can't get kernel image!

Wrong Ramdisk Image Format

Ramdisk image is corrupt or invalid

Wrong Ramdisk Image Format

Ramdisk image is corrupt or invalid

## Flattened Device Tree blob at 00100000

Booting using the fdt blob at 0x100000

Loading Device Tree to 000000007dcfd000, end 000000007dd0f5db ... OK


Starting kernel ...


[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]

[ 0.000000] Linux version 5.10.0-xilinx-v2021.1 (oe-user@oe-host) (aarch64-xilinx-linux-gcc (GCC) 10.2.0, GNU ld (GNU Binutils) 2.35.1) #1 SMP Fri Jun 4 15:57:16 UTC 2021

[ 0.000000] Machine model: xlnx,zynqmp

[ 0.000000] earlycon: cdns0 at MMIO 0x00000000ff010000 (options '115200n8')

[ 0.000000] printk: bootconsole [cdns0] enabled

[ 0.000000] efi: UEFI not found.

[ 0.000000] cma: Reserved 512 MiB at 0x000000005dc00000

[ 0.000000] Zone ranges:

[ 0.000000] DMA32 [mem 0x0000000000000000-0x000000007fefffff]

[ 0.000000] Normal empty

[ 0.000000] Movable zone start for each node

[ 0.000000] Early memory node ranges

[ 0.000000] node 0: [mem 0x0000000000000000-0x000000003ecfffff]

[ 0.000000] node 0: [mem 0x000000003ee48000-0x000000007fefffff]

[ 0.000000] Zeroed struct page in unavailable ranges: 512 pages

[ 0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000007fefffff]

[ 0.000000] psci: probing for conduit method from D



20 views0 comments