2026-03-31 11:39 AM - edited 2026-03-31 1:11 PM
Hi all,
What is the recommended way to not crush our repository and dynamically pull/generate the project's Drivers and Middleware folders? For instance, our repository has both Bootloader + Application code projects in a repo (and other MCU projects/layouts for the same board).
Is there something similar to Platform.IO (or C#'s NuGet packages) where the platform maintains those 3rd-party files in a volatile location and pulls them if they don't exist on your machine? Especially for the sake of not checking into the repo duplication of +15 MB worth of files for each project.
Please excuse me if this was already asked. I didn't quite find a solid answer.
I'm ok with making a command line script that auto-pulls them too, if that's a possibility.
2026-03-31 3:04 PM
Git isn't the only version control system known to the humankind. There is another sort of source/version control which constructs "virtual" source tree views from sparse sources located elsewhere. For example: Perforce, Synergy, Clearcase.
Even git has ways to check out a subtree to minimize the size of working directory (git subtree, submodules) or share a repo with another working directory (git worktrees) There are tools like Google's "repo", Bazel and others.
2026-03-31 5:12 PM
Hi @Pavel A., you bring up a good point for other future viewers regarding other version control systems.
Like many organizations, our official repository is Git. Yes, we are using the Submodules feature to circumvent this. My inquiry was primarily for, is there an STMicro method for doing such actions? For instance, MPLab reuses cached common libraries across projects as well to an extent
2026-03-31 6:02 PM
If you've noticed, CubeMX (and CubeIDE 1.x) gives the user option to link the project to shared drivers & middlewares files in the "repository" instead of copying them into the project tree. So these components can be shared across projects.
2026-04-03 3:29 AM
Here's how I share common code between Projects:
To be honest, I prefer to have Projects self-contained.