[Software]基于Windriver的PCIe驱动开发

注:
本博客的前提是此PCIe设备已成功安装INF驱动。
Windriver快速生成驱动程序、驱动的安装和测试等可详见上一篇博客 基于Windriver快速驱动开发

  1. 选择PCIe板卡并双击。
    选择PCIe板卡
  2. 如下图所示,点击“Generate Code”按钮,弹出“Select Code Generation Options”窗口。
    点击“Generate Code”按钮
  3. “Select Code Generation Options”设置。
    Add device-specfic customization根据不同板卡选择不同,此处选择了Xilinx BMD design,也可以选择No custmomization;
    code-generation language默认为ANSI C;
    本人电脑安装的是VS 2010,此处target development environment选择MS Developer Studio .NET 2010(for X86);
    IDE则选择MS Developer Studio .NET;“Select Code Generation Options”设置
  4. 选择默认选项。默认选项
  5. 项目命名后保存至新建的项目文件夹中。
    在这里插入图片描述
  6. 提示关闭WinDriver,防止 运行VS编译后的应用程序时出现资源冲突 的问题。
    提示关闭WinDriver
  7. 生成的VS工程会自动打开,即可看到生成的PCIe驱动代码。
    若未自动打开,找到第五步中项目文件夹,打开.sln文件(PCIE20201114->x86->msdev_2010->pcie_diag.sln)
    PCIe驱动工程
  8. 按F5启动调试。若项目报错,则根据对应的错误提示修改代码,直至无错后会生成如下图所示的交互界面。
    注:由于存在第六步中的问题,一定要关闭Windriver软件再启动项目。
    交互界面
    当然可修改相应的代码,实现自己想要实现的功能。
xilliix pcie dma 驱动 (基于 xilnx xdma ip核 4.0 的WDF驱动--- # XDMA Windows Driver This project is Xilinx's sample Windows driver for 'DMA/Bridge Subsystem for PCI Express v4.0' (XDMA) IP. *Please note that this driver and associated software are supplied to give a basic generic reference implementation only. Customers may have specific use-cases and/or requirements for which this driver is not suitable.* ### Dependencies * Target machine running Windows 7 or Windows 10 * Development machine running Windows 7 (or later) * Visual Studio 2015 (or later) installed on development machine * Windows Driver Kit (WDK) version 1703 (or later) installed on development machine ## Directory Structure ``` / |__ build/ - Generated directory containing build output binaries. |__ exe/ - Contains sample client application source code. | |__ simple_dma/ - Sample code for AXI-MM configured XDMA IP. | |__ streaming_dma/ - Sample code for AXI-ST configured XDMA IP. | |__ user_events/ - Sample code for access to user event interrupts. | |__ xdma_info/ - Utility application which prints out the XDMA core ip | | configuration. | |__ xdma_rw/ - Utility for reading/writing to/from xdma device nodes such | | as control, user, bypass, h2c_0, c2h_0 etc. | |__ xdma_test/ - Basic test application which performs H2C/C2H transfers on | all present channels. |__ inc/ - Contains public API header file for XDMA driver. |__ libxdma/ - Static kernel library for XDMA IP. |__ sys/ - Reference driver source code which uses libxdma |__ README.md - This file. |__ XDMA.sln - Visual Studio Solution. ```
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值