2021-06-28 01:55 PM
I had a project and pushed it up to a github repository that I just created. STM has so many files under many directories (CMSIS, etc.) I didn't feel it necessary to add all these files. I added the .ioc and all my source and header files. What other files should travel along and be placed in the repository so that someone can effectively download the project and get up and running? It seems complicated and STM32Cube allows you to import an .ioc file but when it does it scraps out the main.c sections that were in the main file that went with the project up to git????
Thanks
2021-06-28 02:26 PM
I would, at a minimum, include all files required to compile the project. This includes most of the CMSIS/Middleware/Drivers directories.
I would also add Eclipse files like .project and .mxproject so it can be imported while retaining project settings.
> It seems complicated and STM32Cube allows you to import an .ioc file but when it does it scraps out the main.c sections that were in the main file that went with the project up to git????
The IOC doesn't store user code in it.
2021-06-28 06:34 PM
> STM has so many files under many directories (CMSIS, etc.) I didn't feel it necessary to add all these files.
This is because the default option in Cube is to copy all the library files into the project, and you've left it as is.
Since the libraries themselves became available on github, a smarter choice is to check out these libraries separately and use them as git submodules.
This allows to share the libraries among any number of projects and keep them away from your own repo.
Before generating a project in Cube, change the option to copy library files to references.
Of course, if you use managed Eclipse CDT projects (default for CubeIDE) - store the .project and .cproject files.
As TDK wrote, .ioc does not contain code and is not used after generation, so you can move it away to a sub-dir. I never keep mxproject files, IMHO they only cause trouble. /* How to re-generate after editing Cube stuff (pinout) is another long story */
> so that someone can effectively download the project and get up and running
How to share your projects with other people (possibly using other OS) is yet another long story. Different teams have their own conventions...
-- pa
2021-06-29 12:55 AM
more important is to ignore .settings folder, this folder includes only user settings.
2021-06-30 07:43 AM
Hello pa.....
Can you point me to the github link for the libraries? And I do not see the copy library files to references option under Project Properties option....Do I need to create a project first and if so should it just be a C project or should it be an STM project?
Thanks
Steve
2021-06-30 03:29 PM
> Can you point me to the github link for the libraries?
With pleasure. https://github.com/STMicroelectronics/STM32Cube_MCU_Overall_Offer
> And I do not see the copy library files to references option under Project Properties option
See below - this is for a standalone CubeMX, CubeIDE has something similar