UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Observer noahhuetter
Observer
215 Views
Registered: ‎06-27-2017

Include C driver source in IP core

Hi all

I can package my HDL code into a complete IP core and use it in my block designs. My core has an AXI lite interface and I wrote a driver (simple .c and .h sources) that I'd like to include in the SDK project (bare metal Zynq design).

These two files are added as Software Drivers in a "xilinx_softwaredriver" file group in the IP. The integrator now requires a MLD or MDD file for use with the SDK.

Are there any examples/guides on how to achieve that? Any template? Or am I wrong in the assumption that I can include my drivers in the IP core?

Thanks in advance!

0 Kudos
6 Replies
Moderator
Moderator
185 Views
Registered: ‎09-12-2007

Re: Include C driver source in IP core

You can create a driver/data/driver.mdd file. You can use the baremetal drivers delivered with SDK as reference, Or ug1138

The MDD has an associated TCL file of the same name (In same data folder)

The BSP uses the supported peripheral info in the MDD against the info in the HDF to link the IP with the driver. So make sure the IP NAME matches your custom HDL IP

 

Let me know if you have any questions?

0 Kudos
Observer noahhuetter
Observer
142 Views
Registered: ‎06-27-2017

Re: Include C driver source in IP core

Okay, I managed to write the tcl and mdd file. The hw/bsp and application projects are generated but I can't include my driver header file (No such file or directory). In the hardware project I see my header under

drivers/driver/src/my_driver.h

How do I configure the SDK to search for the header? Also the source file is not compiled automatically (located at the same location as the header). How do I add the source file to the build dependencies?

0 Kudos
Moderator
Moderator
131 Views
Registered: ‎09-12-2007

Re: Include C driver source in IP core

Can you share the driver and hdf

0 Kudos
Observer noahhuetter
Observer
101 Views
Registered: ‎06-27-2017

Re: Include C driver source in IP core

Hi Stephen

Unfortunately I can't share the hdf file because of confidentiality reasons. I can however ensure that the driver mdd/tcl/c and h file are contained in the hdf file. They get loaded into SDK as well (see attahced screenshot) but don't get compiled and the toolchain can't find the header pfc.h.

 

 

Screenshot from 2019-06-17 15-43-55.png
0 Kudos
Moderator
Moderator
85 Views
Registered: ‎09-12-2007

Re: Include C driver source in IP core

Can you right click on your bsp in project explorer view in SDK and select board support package settings

Select drivers and scroll down to your IP and make sure your driver is selected ( or might be set to generic)

0 Kudos
Observer noahhuetter
Observer
73 Views
Registered: ‎06-27-2017

Re: Include C driver source in IP core

The driver is visible and enabled in the BSP. Perhaps a bug in 2018.2?

Screenshot from 2019-06-18 19-53-09.png

0 Kudos