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: 
Highlighted
Observer adeneo_sju
Observer
804 Views
Registered: ‎03-03-2014

Custom driver dependency

Jump to solution

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

 

0 Kudos
1 Solution

Accepted Solutions
Xilinx Employee
Xilinx Employee
1,114 Views
Registered: ‎10-21-2010

Re: Custom driver dependency

Jump to solution

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.

6 Replies
Xilinx Employee
Xilinx Employee
772 Views
Registered: ‎10-21-2010

Re: Custom driver dependency

Jump to solution

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.

0 Kudos
Observer adeneo_sju
Observer
763 Views
Registered: ‎03-03-2014

Re: Custom driver dependency

Jump to solution

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.

0 Kudos
Xilinx Employee
Xilinx Employee
749 Views
Registered: ‎10-21-2010

Re: Custom driver dependency

Jump to solution

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

0 Kudos
Observer adeneo_sju
Observer
737 Views
Registered: ‎03-03-2014

Re: Custom driver dependency

Jump to solution

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.

 

0 Kudos
Xilinx Employee
Xilinx Employee
1,115 Views
Registered: ‎10-21-2010

Re: Custom driver dependency

Jump to solution

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 adeneo_sju
Observer
716 Views
Registered: ‎03-03-2014

Re: Custom driver dependency

Jump to solution

Hi Sadanan,

 

Ok, perfect !

 

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

 

Stéphane.

0 Kudos