操作系統:Ubuntu 18.04.4 LTS
命令lsb_release -a
安裝Vitis
https://www.xilinx.com/support/download/index.html/content/xilinx/en/downloadNav/vitis.html
在線安裝網速很慢,離線下載安裝包,Xilinx_Vitis_2019.2_1106_2127.tar 30.76GB
解壓縮
tar xvf Xilinx_Vitis_2019.2_1106_2127.tar
安裝,需要至少120G磁盤空間,最好150G以上
cd Xilinx_Vitis_2019.2_1106_2127/
./xsetup
安裝完成
安裝petalinux
略
進入正題
首先打開Vivado 2019.2,File->New Project
Next,項目名稱edt_zcu102_demo
默認
接下來的兩個界面Add Sources和Add Constraints都直接Next,然後選擇Boards,選擇ZCU102,Next
Finish,之後項目自動打開,點Create Block Design
設計名稱edt_zcu102_demo,然後OK
Add IP,如下圖紅色箭頭所示
輸入znyq進行過濾,並選擇Zynq UltraScale+ MPSoC
點擊Run Block Automation
默認,點OK
雙擊紅框位置,查看自動化效果
點左側PS-PL Configuration,展開,並將紅框中的勾選框取消勾選,結果如圖,OK
空白處右鍵,點擊Validate Design
驗證成功提示
右鍵Design Sources下的文件,點擊Create HDL Wrapper
默認,點OK
創建完成之後,展開edt_zcu102_demo_wrapper,右鍵左側紅箭頭,然後點Generate Output Products…
默認,點Generate
並生成最終的edt_zcu102_wrapper.xsa文件【TODO:此過程參考另一個教程】
使用petalinux生成linux鏡像
petalinux和bsp(Board Support Packages)文件這裏下載https://www.xilinx.com/support/download/index.html/content/xilinx/en/downloadNav/embedded-design-tools.html
我的petalinux安裝在~/Desktop/petalinux/下
執行命令source ~/Desktop/petalinux/settings.sh
進入bsp文件所在目錄
創建工程命令petalinux-create -t project -s xilinx-zcu102-v2019.2-final.bsp
根據edt_zcu102_wrapper.xsa文件所在目錄(注意不是文件,也不要拷貝.xsa至當前目錄下)重新配置petalinux-config --get-hw-description='/home/caochenghua/project_1edt_zcu102/'
參考文獻
ug1209-embedded-design-tutorial.pdf
下載地址https://www.xilinx.com/support/documentation/sw_manuals/xilinx2019_2/ug1209-embedded-design-tutorial.pdf