04-16-2018 04:58 AM
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.
04-16-2018 09:52 PM
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.
04-17-2018 02:31 AM - edited 04-17-2018 02:32 AM
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 ?
04-17-2018 04:32 AM
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
04-18-2018 03:18 AM
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 !
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 ?