zynq petalinux userspace IO

来源:互联网 发布:南昌大学软件学院 编辑:程序博客网 时间:2024/05/16 13:21

基于软硬件环境:

 petalinux 2016.1

vivado2015.4

修改版ZedBoard。


参考文档链接:

下载链接地址:http://download.csdn.net/detail/shichaog/9558629


整个工程的下载地址:

http://pan.baidu.com/s/1gfbhyU3

UIO的说明如下:

URL:https://www.kernel.org/doc/htmldocs/uio-howto/about.html#how_uio_works


和参考文档不同是需要修改设备树。

subsystems/linux/configs/device-tree/pl.dtsi

pl.dsti修改为如下:

/ {    amba_pl: amba_pl {        #address-cells = <1>;        #size-cells = <1>;        compatible = "simple-bus";        ranges ;        myip_interrupt_0: myip_interrupt@43c00000 {/*          compatible = "xlnx,myip-interrupt-1.0";*/            compatible = "generic-uio";            interrupt_parent = <&intc>;            interrupts = <0 29 4>;            reg = <0x43c00000 0x10000>;            xlnx,s00-axi-addr-width = <0x4>;            xlnx,s00-axi-data-width = <0x20>;        };    };};

system-conf.dtsi的chosen节点的bootargs修改成如下:
    chosen {        bootargs = "console=ttyPS0,115200 earlyprintk uio_pdrv_genirq.of_id=generic-uio";        stdout-path = "serial0:115200ns";    };

成功的截图如下:



1 0