cancel
Showing results for 
Search instead for 
Did you mean: 

How to share libs between projcts, same workspace.

dhs
Senior

I developed some libs to control a custom LCD.

At the beginning the workspace only had one project, 01_main, and files related to my lcd and driver were located there, later I started another project 02_rtos, so I copied LCD files into new project.

I need to create more projects, libs could be modified from any project, so I create the lib folder, it has the only version of my files, I created this folder with "Link to alternate location"

0693W00000Y7ERpQAN.pngEverything is working but, My questions:

Is this approach ok? or Is should do something else, please note a want to keep workspace on GitHub, this modify in some way the folder organization approach?

0693W00000Y7EMfQAN.png0693W00000Y7ENJQA3.png 

Daniel H Sagarra
1 ACCEPTED SOLUTION

Accepted Solutions
Pavel A.
Evangelist III

@dhs​ 

> they are preferred over git on embedded projects?

They are preferred by large companies with > 100 people working on a project and dedicated IT. Yes, including embedded projects.

They also need more effort to maintain, but are more powerful and flexible, solving dilemmas like yours with ease.

View solution in original post

4 REPLIES 4
Pavel A.
Evangelist III

> I created this folder with "Link to alternate location"

If it works for you with git, why not.

The "libs" folder can be converted to a git submodule, so it can be shared among other repos/projects.

Other version management systems such as Perforce, Synergy, Clearcase have a different way to maintain and track common files.

Rim LANDOLSI
ST Employee

Hello dhs,

There are at least two approaches to share libs between projects:

1- Share the lib with the project and Link to alternate location created (as you did)

2- Create a static library project. It takes some setup time, but after that it's a more efficient way to manage.

Thanks,

Rim

Dear, thank you feedback,

I didn't know about Perforce, Synergy or Clearcase, they are preferred over git on embedded projects?

Daniel H Sagarra
Pavel A.
Evangelist III

@dhs​ 

> they are preferred over git on embedded projects?

They are preferred by large companies with > 100 people working on a project and dedicated IT. Yes, including embedded projects.

They also need more effort to maintain, but are more powerful and flexible, solving dilemmas like yours with ease.