Zedboard学习(七)PS下第一个裸奔程序

Zedboard学习(七)PS下第一个裸奔程序,第1张

一、打开PlanAhead创建工程

1、选择Create New Project新建工程
Project name:hello
一路默认,只有Board项需要选择ZedBoard Zynq EvaluaTIon and Development Kit
Finish

Zedboard学习(七)PS下第一个裸奔程序,Zedboard学习(七)PS下第一个裸奔程序,第2张

创建工程之后的界面

Zedboard学习(七)PS下第一个裸奔程序,Zedboard学习(七)PS下第一个裸奔程序,第3张

二、添加资源

1.Click Add Sources in the Project Manager.
The Add Sources wizard opens.
2.Select the Add or Create Embedded Sources opTIon and click Next.

Zedboard学习(七)PS下第一个裸奔程序,Zedboard学习(七)PS下第一个裸奔程序,第4张

3.In the Add or Create Embedded Source window, click Create Sub-Design.

Zedboard学习(七)PS下第一个裸奔程序,Zedboard学习(七)PS下第一个裸奔程序,第5张

4.Type a name for the module and click OK. For this example, use the name system.
The module you created displays in the sources list.
5.Click Finish.
这个时候XPS会自动打开,硬件相关的配置可以在XPS中进行。

三、在XPS中配置硬件

1、The dialog box opens, and asks if you want to create a Base System using the BSB Wizard. Select Yes.

Zedboard学习(七)PS下第一个裸奔程序,Zedboard学习(七)PS下第一个裸奔程序,第6张

The first window of the BSB asks you to elect whether to create an AXI-based or PLB-based system.

Zedboard学习(七)PS下第一个裸奔程序,Zedboard学习(七)PS下第一个裸奔程序,第7张

2.Select AXI System and click OK.
3.In the Base System Builder wizard, create a project using the setTIngs described in the table. Where a setTIng or command has not been specified, accept the default values.

Zedboard学习(七)PS下第一个裸奔程序,Zedboard学习(七)PS下第一个裸奔程序,第8张

3 、Remove all peripherals from the list by selecting each one and clicking Remove.

Zedboard学习(七)PS下第一个裸奔程序,Zedboard学习(七)PS下第一个裸奔程序,第9张

4、Click Finish
5.Close the XPS window. The active PlanAhead tool session updates itself with the project settings.
关闭XPS之后,PlanAhead中会自动更新

四、将硬件信息导入到SDK

1.Under Design Sources in the Sources pane, select and right-click system (system.xmp) and select Create Top HDL.
PlanAhead generates the system_stub.v top-level module for the design.
2.In the PlanAhead tool, Select File > Export > Export Hardware for SDK.
The Export Hardware dialog box opens. By default, the Export Hardware check box is checked.
3.Check the Launch SDK check box.
4.Click OK; SDK opens.

五、在SDK中编写C代码

SDK打开之后的界面,当前的工程中已经包含了PS部分用到的外设的信息,剩下就是编写C代码,烧写到PS中。

Zedboard学习(七)PS下第一个裸奔程序,Zedboard学习(七)PS下第一个裸奔程序,第10张

1、In SDK, select File > New > Application Project.
工程名:Hello_world其他不管,直接Finish

2.Right-click Hello_world and select Run as > Run Configurations.

Zedboard学习(七)PS下第一个裸奔程序,Zedboard学习(七)PS下第一个裸奔程序,第11张

3.Right-click Xilinx C++/C++ ELF and click New.

4.The new run configuration is created named Hello_world Debug.
在run之前,先要打开串口,波特率115200

5、Click Run.
此时整个工程已经完成,可以看到串口助手中有Hello World字样

Zedboard学习(七)PS下第一个裸奔程序,Zedboard学习(七)PS下第一个裸奔程序,第12张

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/dianzi/2577974.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-08-07
下一篇 2022-08-07

发表评论

登录后才能评论

评论列表(0条)

保存