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!

Reply

Custom driver dependency

Accepted Solution Solved
Highlighted
Observer
Posts: 42
Registered: ‎03-03-2014
Accepted Solution

Custom driver dependency

Hi,

 

I created a custom driver for my custom IP that I managed to be automatically part of the BSP.

It works fine.

 

Now I will have other IPs that will share common resources that I intend to put in a shared .h file.

What I understood is that in the mdd file of each driver I could add the OPTION DEPENDS = to reference the common driver.

But the problem is that I can see how to have the common driver automatically included in the BSP ??!!

 

Could someone give me some clues ?

 

Thanks in advance.

 

Stéphane

 


Accepted Solutions
Xilinx Employee
Posts: 217
Registered: ‎10-21-2010

Re: Custom driver dependency

Hi,

 

Yes, SDK specifies BSP/include as include path to the compiler (this should be in the application build console/log), so header files from this directory are used.

View solution in original post


All Replies
Xilinx Employee
Posts: 217
Registered: ‎10-21-2010

Re: Custom driver dependency

Hi,

When you specify a dependency driver thru "OPTION DEPENDS", it should be automatically included in the BSP. In the common driver, you can have "OPTION supported_peripherals = ();". Please see $XILINX_SDK/data/embeddedsw/XilinxProcessorIPLib/drivers/v_vcresampler_v3_0/data/v_vcresampler.mdd for an example. This driver depends on video_common.

Observer
Posts: 42
Registered: ‎03-03-2014

Re: Custom driver dependency

[ Edited ]

Hi Sadanan,

 

The custom driver is automatically added to BSP because the HW plateform uses the associate IP, where the driver is available in the \driver repository Inside the IP's repository.

 

As there is no IP for the common driver, how does SDK knows where to find the common driver when it sees the dependency in my custom IP ?

 

Thanks !

 

Stephane.

Xilinx Employee
Posts: 217
Registered: ‎10-21-2010

Re: Custom driver dependency

The common driver is automatically added to BSP, since the custom driver specifies it as a dependency driver thru OPTION DEPENDS. SDK looks for the common driver in standard repositories

Observer
Posts: 42
Registered: ‎03-03-2014

Re: Custom driver dependency

Hi,

 

Ok, I added the common driver path to SDK's repositories section and the common driver is automatically added to the BSP, my source code dependencies are resolved !

 

Another question:

 

In the BSP the same file is either stored in BSP/include and in BSP/libsrc/common_driver/src.

For what I understand, I have to modify the common driver .h to configure my custom driver and my application, so I have to edit the BSP/libsrc/common_driver/src file, after that SDK automatically updates the one in BSP/include. When I use a #include "commondriver.h" in my source code, SDK refers to the one in the BSP/include repository.

 

Am I right ?

 

Stéphane.

 

Xilinx Employee
Posts: 217
Registered: ‎10-21-2010

Re: Custom driver dependency

Hi,

 

Yes, SDK specifies BSP/include as include path to the compiler (this should be in the application build console/log), so header files from this directory are used.

Observer
Posts: 42
Registered: ‎03-03-2014

Re: Custom driver dependency

Hi Sadanan,

 

Ok, perfect !

 

I'm good for now, thanks for your help.

 

Stéphane.