AR# 54322


14.4 EDK-SDK: Changes to BSP sources are lost after make clean. How can I make the libraries local


Is there a way to get a local copy from the BSP repository to prevent losing all previously applied changes every time the BSP is cleaned?

Is there an alternative to making changes in the original BSP sources inside the EDK/SDK installation path?


For example if I add or change #define DEBUG and #undef NDEBUG in a library in order to enable the debug messages, the changes are lost immediately after a make clean of the BSP project.
This change requires a BSP rebuild prior to a rebuild of the test application with the above #defines in order to enable the debug messages.



Changes in the library being overwritten are expected behavior.
This happens in the libgen process which takes a copy of the drivers, then puts them in the BSP and builds the different libraries required.
There is a work-around available.
You will need to make the lib driver source local and use it in place of the global repository.
Those steps are similar to the "make IP local" option available in XPS but this process involves more manual actions in SDK.
The following steps use the example of axicdma_v2_01_a:
  1. In your application source code area or in XPS, create a directory called "drivers"
  2. Copy axicdma_v2_01_a from EDK\sw\XilinxProcessorIPLib\drivers to your local drivers directory.
  3. Rename the directory to for example axicdma_v2_01_f
    The naming convention is [0-9]_[0-9][0-9]_[a-z] only, so something like "99_99_f" or "2_01_a_mod" will not work.
  4. In SDK select xilinx tools -> repositories then either local repositories -> new OR global repositories -> new,
  5. Point to the directory containing the "drivers" directory (i.e. the parent, not the directory "drivers" itself) -> OK
  6. Rescan repositories
  7. -> OK
  8. Right click the BSP -> "board support package settings" > drivers > expand the driver version column > select the newer version created using the drop down.
  9. -> OK
A Rebuild should happen, if not select clean BSP, then build BSP.
Note: every time you modify your local version in "drivers", you will need to start a rebuild of the BSP (because libgen takes copies of the driver into the BSP directory)
There is more information in the documentation and in SDK built-in help (under SDK -> help -> help contents).
Look for the task "
Setting Up Software Repositories"
AR# 54322
Date 02/09/2015
Status Active
Type General Article
People Also Viewed