I have started to develop software under the Vitis IDE from Xilinx and I have found a problem regarding source codes versioning (in my case in Mercurial). The source code in Vitis IDE can be divided into two parts:
- application code, which is fully controlled by the software developer
- so called platform code (drivers for peripherals, bsp and os) which is automatically generated based on special hardware dependent xsa file via tcl script.
Based on that I have decided to versioning following files:
- application source files (.c, .h)
- xsa file
- tcl script
So I have created a repository called RESOURCES with following structure:
- hw_config - contains the xsa file
- script - contains the tcl script
- src - contains the source files of the application
Based on the content of RESOURCES repository the tcl script creates Xilinx Vitis workspace in WORKSPACE directory with following structure:
- application code (uses a copy of src from RESOURCES)
- platform code
This approach has a serious disadvantage consisting in the fact that the changes in the application source codes are being done in WORKSPACE but only the RESOURCES is under version control. So it is necessary to copy the changes from WORKSPACE into RESOURCES to be able to commit them. I think that this is uncomfortable and error prone. So I have been thinking about some better solution. I have got an idea to prepare some script which will monitor changes in the WORKSPACE and in case any change is noticed it will initiate copying of the content of the WORKSPACE into the RESOURCES. Do you think it is good approach? Thanks in advance for any suggestions.