Skip to main content
Senior
January 2, 2023
Solved

How to share libs between projcts, same workspace.

  • January 2, 2023
  • 4 replies
  • 1909 views

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 

This topic has been closed for replies.
Best answer by Pavel A.

@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.

4 replies

Pavel A.
January 2, 2023

> 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.

dhsAuthor
Senior
January 4, 2023

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.
Pavel A.Best answer
January 4, 2023

@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.

Rim LANDOLSI
ST Employee
January 4, 2023

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