cancel
Showing results for 
Search instead for 
Did you mean: 

Package management, why to copy all files?

JKapp.1
Associate II

I'm highly confused. Coming from Keil MDK, I really enjoyed the CMSIS-Pack approach to manage dependencies. A MCU (and vendor) independent and efficient approach which works in command line and various IDEs (Keil MDK, VSCode with plugin, Eclipse). See Arm Keil Microcontroller Development Kit (MDK) Getting Started GuideArm Keil | CMSIS PacksCMSIS: Introduction, and Arm Keil | Arm CMSIS.

The key advantage was that there's a global config file to define all dependencies (like CMSIS-Core vxxx, or BSP, etc) in a certain version and then the package manager downloads these packages on demand. There's no need to check in all libraries/dependencies into the source control or add them to the source tree at all - they are just linked automatically.

Now that the ST packages all use CMSIS, why do all examples contain hundreds of MB of libraries that could be installed via a package manager? That feels like a huge step back.

Maybe I'm misunderstanding something, there's the "Embedded Software Packages" menu in CubeIDE, but I can't add packages to the current project, so how are they supposed to be used?

Thanks,

Jan

5 REPLIES 5

An advantage of copying is that your project is self-contained.

It can also mean that you can't get hit by unexpected updates breaking things!

But CubeMX/CubeIDE does give you the option to link rather than copy:

AndrewNeil_0-1736421908812.png

 

Hi @Andrew Neil 

I'm not interested in self-containing folders with 200 MB of libs and 1 MB of source code. I don't want to have that in my source control. I don't want to copy folders and run build on them - I'm assuming that a proper toolchain and package manager are installed (better: are containerized and run in CI/CD), that's the basis of any professional firmware development IMO.

I don't get hit by any unexpected updates when using a package manager with fixed version, that's the whole thing, reproducibility.

Linking is not the right thing, it just refers to a location on the disk, right? Is there an option to define the dependencies along the cproject so that a new user opens that file and just gets asked to download the dependencies? Is it possible to change the version of a lib easily? In Keil this just works out of the box.

Am I getting you right, that there's no option in CubeIDE to add packages? Everything is done in CubeMX? If yes what about this (or other Cube support packages): STMicroelectronics/fp-sns-datalog2: The FP-SNS-DATALOG2 function pack represents an evolution of FP-SNS-DATALOG1 and provides a comprehensive solution for saving data from any combination of sensors and microphones configured up to the maximum sampling rate. Please check st.com where a more recent v...

I can't open that with CubeMX, it's just a CubeIDE project - so it's not possible to change to referenced/linked libraries?

Thanks!


@JKapp.1 wrote:

I'm not interested in self-containing folders 


But some people are - which is why it's always a choice!

Personally, it's the way I prefer - so I haven't looked into the alternative under CubeIDE/CubeMX

JKapp.1
Associate II

Does not feel like a real choice - all examples are the "self-containing" option. Sure that's easier to share and especially for beginners that's nice to start but I'm looking for a professional and efficient solution.

My employer and the DevOps team would loudly laugh at me if I told them to either hard link dependencies manually or check them in to git for every single project. And I agree, that's not the right approach (for us).

Three questions:

Thanks.

TDK
Guru

What you want is not supported in the current CubeMX framework. You can add links to folders if you want, and put files there, but there is no "package manager" like feature that will automatically link and download the version of the library you want.

The "Embedded Software Packages" get downloaded into a main repository folder and from there are copied to your project folder on code generation. If you want to do this manually, you can link to the repository folder instead, but this would be a manual step.

If you feel a post has answered your question, please click "Accept as Solution".