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:
- In your application source code area or in XPS, create a directory called "drivers"
- Copy axicdma_v2_01_a from EDK\sw\XilinxProcessorIPLib\drivers to your local drivers directory.
- 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.
- In SDK select xilinx tools -> repositories then either local repositories -> new OR global repositories -> new,
- Point to the directory containing the "drivers" directory (i.e. the parent, not the directory "drivers" itself) -> OK
- Rescan repositories
- -> OK
- Right click the BSP -> "board support package settings" > drivers > expand the driver version column > select the newer version created using the drop down.
- -> 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"