Introduction
本文介绍了在Linux下安装zedboard驱动解决vivado无法通过jtag连接到板子上的问题。
终于步入了helloworld阶段。之前折腾了下zedboard板子sd卡启动系统的问题,今天编写helloworld,运行。但是发现最后一步push到板子上时,vivado找不到板子。搜到了reddit的一篇讨论帖,解决了问题,这里对帖子内容进行简单的整理说明。
主要问题是驱动问题。
硬件软件环境
操作系统: Debian 9 x86_64
板子: zedboard AES-Z7EV-7Z020-G REV-D
出现的错误
vivado的console输出:
[Labtoolstcl 44-469] There is no current hw_target
操作步骤
dmesg
拔插前后,输出dmesg
查看是否有变化,如果没有变化,应该是usb口的问题,而不是xilinx的问题,尝试换下usb口试试
安装Digilent Adept runtime和utilities
官方网址
百度网盘driver文件夹里的deb
可以从官网下载deb或者rpm或者tar.gz的包安装。安装Runtime- Latest 和Utilities – Latest 就行。
运行
djtgcfg enum
看到类似输出表示板子连接成功:
Found 1 device(s)
Device: Zed
Product Name: Digilent Zed
User Name: Zed
Serial Number: 2102XXXXXX
查看udev规则是否存在
查看/etc/udev/rules.d/52-xilinx-digilent-usb.rules
文件是否存在,如果不存在,运行vivado自带的驱动安装脚本:
Vivado/2016.4/data/xicom/cable_drivers/lin64/install_script/install_drivers/install_drivers
原帖子里说的是运行install_digilent.sh的脚本,我测试后,发现需要运行install_drivers才行。
重启机器,重新打开vivado测试
正常的输出:
start_gui
open_hw
INFO: [IP_Flow 19-234] Refreshing IP repositories
INFO: [IP_Flow 19-1704] No user IP repositories specified
INFO: [IP_Flow 19-2313] Loaded Vivado IP repository '/home/find/d/fpga/Vivado/2016.4/data/ip'.
connect_hw_server
INFO: [Labtools 27-2285] Connecting to hw_server url TCP:localhost:3121
INFO: [Labtools 27-2222] Launching hw_server...
INFO: [Labtools 27-2221] Launch Output:
****** Xilinx hw_server v2016.4
**** Build date : Jan 23 2017-19:28:34
** Copyright 1986-2016 Xilinx, Inc. All Rights Reserved.
open_hw_target
INFO: [Labtoolstcl 44-466] Opening hw_target localhost:3121/xilinx_tcf/Digilent/210248483451
current_hw_device [lindex [get_hw_devices xc7z020_1] 0]
refresh_hw_device -update_hw_probes false [lindex [get_hw_devices xc7z020_1] 0]
Reference
udev arch wiki
Xilinx Vivado on Linux Reddit帖子