xilinx SDK2017.4 7Z202开发板编写helloworld程序

本文介绍如何在7Z020开发板上,使用xilinx SDK2017.4软件编写helloworld的步骤。

1.打开xilinx2017.4(找不到快捷方式的话可以打开xilinx/sdk/2017.4/bin的xsdk.bat)

2.选择工作空间,点击ok。xilinx SDK2017.4 7Z202开发板编写helloworld程序

打开之后如下图
xilinx SDK2017.4 7Z202开发板编写helloworld程序

3.选择窗口file-new-other,弹出窗口,选择xilinx下的Hardware Platform Spe’ci’fication,点击next。

xilinx SDK2017.4 7Z202开发板编写helloworld程序

5.创建工程名字,选择一个写好的hdf文件,点击finish

xilinx SDK2017.4 7Z202开发板编写helloworld程序

6.创建bsp文件,点击file-new-Board Support Package,选择硬件平台hello_world,CPU选择ps7_cortexa9_1,点击finish

xilinx SDK2017.4 7Z202开发板编写helloworld程序

7.创建完成之后会出现一个bsp的配置界面,选择左侧的standalone,修改stdin和stdout为ps7_uart_1,然后点击ok。

xilinx SDK2017.4 7Z202开发板编写helloworld程序

8.创建application project:点击file-new-Application Project,输入工程名,硬件平台选择hello_world,Processor选择ps7_cortexa9_0,bsp选择使用已存在的。然后点击finish。

xilinx SDK2017.4 7Z202开发板编写helloworld程序

8.在explorer栏右击hello_world_app,debug as,debug configurations,在弹出的框中右击system debugger,new。

xilinx SDK2017.4 7Z202开发板编写helloworld程序
在Target Setup和Application项中按下图配置。
xilinx SDK2017.4 7Z202开发板编写helloworld程序
xilinx SDK2017.4 7Z202开发板编写helloworld程序
点击apply,再点击close

9.创建输出hello_world:

在explore中找到hello_world_app/src/main.cc,修改代码如下:
xilinx SDK2017.4 7Z202开发板编写helloworld程序
点击保存。

10.下载程序

连接好7z020的电源线,usb转串口线,下载器usb。安装好对应驱动程序。,右击hello_world_app,选择run as system debugger,提前打开串口调试助手,喧杂对应端口,波特率设置115200,即可收到字符串(也可用软件自带的terminal接受数据)
xilinx SDK2017.4 7Z202开发板编写helloworld程序
可以看到,现在我们成功收到数据,至此,程序结束。