ぉ
ぉ沙皮狗的忧伤
2021-05-14
一、vivado配置
1、接着上一个帖子的工程继续操作

2、点击PS的IP核,配置uart

3、编译bit文件,生成xsa文件

4、打开vitis创建工程
File--->New--->Platform Project

填写工程名字,点击下一步

选择默认,点击下一步

选择之前生成的xsa文件,点击完成

选择device_tree,点击完成

右击点击test_system,然后点击Build Projec编译工程

将里面的设备树文件添加到内核设备树中,将启动fsbl.elf文件加入到BOOT.bin中

二、配置内核
1、内核配置,勾选相应的驱动
make menuconfig
Device Drivers --->
Character devices --->
Serial drivers --->
--- Serial device bus
Serial device TTY port controller
<*> Serial device bus --->
<*> Cadence (Xilinx Zynq) UART support
Cadence UART console support
2、配置设备树


3、编译代码

三、编写测试代码
根据第三个参数是r/w,来执行发送和接收,每次发送接收1024个字节,数据是0~255

运行测试代码

测试代码在附件中,自行查阅