Sharing a module driver in two (or more) workspaces.

Discuss how to use the features of Atollic TrueSTUDIO, including the editor, assembler, C/C++ compiler, linker, debugger, static code analysis and team collaboration tools.

Moderators: Markus Girdland, Mattias Norlander

mtx_ing6
Posts: 2
Joined: Wed Dec 05, 2018 7:12 pm

Sharing a module driver in two (or more) workspaces.

Postby mtx_ing6 » Wed Dec 05, 2018 7:23 pm

Hi,

I'm developing a "driver" for a GPS module which will be used in three different projects, two of those projects are on the same Atollic workspace while the third project is in a separated workspace. I would like to have all three projects using the same module driver, so if i do a modification on the driver while working on a particular project the change will be available on the other projects.

How should i include the driver directory on the Path and Symbols of the projects? Using absolute paths or relative paths?
I had tried adding a File System path but it's an absolute path and i would like to use relative paths.

This is how i have the directory three:

* Driver_dir
* Workspace_A
**** Project_1
**** Project_2

* Workspace_B
**** Project_3

Any suggestions on a better project/workspaces layout?

Regards

kurta999
Posts: 17
Joined: Thu Sep 06, 2018 8:27 am
Location: Slovakia
Contact:

Re: Sharing a module driver in two (or more) workspaces.

Postby kurta999 » Thu Dec 06, 2018 6:27 am

We are using git submodules for this purpose. Sometime I just link the file when it's the same in more projects. Eg. initializing extarnal flash, or measuring mcu temperature

mtx_ing6
Posts: 2
Joined: Wed Dec 05, 2018 7:12 pm

Re: Sharing a module driver in two (or more) workspaces.

Postby mtx_ing6 » Fri Dec 21, 2018 4:48 pm

Hi,

Thanks for pointing out git submodules, i will give them a go, i got a question tho, if i want to edit the submodule code should i edit the original 'repo' and then update the project submodule, or is there a way to edit the submodule on the project itself and update the original submodule repo? I wasn't able to answer this question so far.

kurta999
Posts: 17
Joined: Thu Sep 06, 2018 8:27 am
Location: Slovakia
Contact:

Re: Sharing a module driver in two (or more) workspaces.

Postby kurta999 » Mon Dec 24, 2018 10:45 am

mtx_ing6 wrote:Hi,

Thanks for pointing out git submodules, i will give them a go, i got a question tho, if i want to edit the submodule code should i edit the original 'repo' and then update the project submodule, or is there a way to edit the submodule on the project itself and update the original submodule repo? I wasn't able to answer this question so far.


If I want to change something in a submodule, eg "logger", or "wifi driver", then I edit it in the current project where I'm working. It doesn't matter. After I did what I wanted, I made a commit & push to that submodule and that's already updated. You only have to pull this submodule in every project where are you using it to be up to date.
However, in special cases, I'm using symbolic links too.


Return to “Atollic TrueSTUDIO tool discussions”

Who is online

Users browsing this forum: Bing [Bot] and 1 guest