This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Sharing code between multiple projects using Git version control

Hi e2e'rs

We're switching to Git and are trying to determine the best way to setup our Git repositories for sharing common code between multiple types of products and DSPs. So far we've settled on these top level repositories.

.

|-- CommonCode

|-- ProductA

|     |-- PlatformAConfiguration

|     |     |-- .project, .cfg, .xdl, etc

|     |     |-- RTSC Platform

|     |--PlatformAUniqueCode

|     |     |-- .project, .cproject, etc

|     |     |-- src, inc folders containing .c and .h files

|- ProductB

|     |-- PlatformBConfiguration

|     |     |-- .project, .cfg, .xdl, etc

|     |     |-- RTSC Platform

 |    |--PlatformBUniqueCode

 |    |     |-- .project, .cproject, etc

 |    |     |-- src, inc folders containing .c and .h files

Option A: We tried linking files from CommonCode to ProductA and ProductB, but then discovered that when an error occurs in a linked file, CCS5.5 can't find the file when you click on the error (or warning) in the "Problems" window.

Option B: Treat CommonCode as a library. This doesn't work either because since you only have one .project, .csproject etc at the top of this folder, you can't specify different types of DSP's. This wouldn't be a problem if there was a way for the project files in PlatformBUniqueCode to tell the project files in CommonCode to build a library for a C6678 instead of for a C6472 for example. 

Option A would require a lot of steps to link the large amount of files, and then we'd still have the issue on not being able to get CCS to bring up the error'd code.

Option B sounds like the best since it doesn't have Option A's issues, but we need to solve to issue of building the library with different DSP targets.

Option C: Haven't thought of it yet, but don't hesitate to suggest it!  :o)

Any thoughts or suggestions would be greatly appreciated.

Cheers2u

Eddie