Showing results for 
Search instead for 
Did you mean: 

Standard GitIgnore / Project Setup for Sharing STM32Cube Projects with Github

Associate III

Hi, my team works with STM32CubeIDE and shares projects via github. We've been running into somewhat frequent errors where projects settings don't get shared properly when pulling the files down from github. On the flipside, there are a bunch of automatically generated files that change frequently with builds, code generation, etc, that bloat the git log unnecessarily if they are shared.

Is there a standard gitignore that we should be using for STM32CubeIDE projects. Are there any rules of thumb for how to set up stuff like project folder structure, project variables, etc, such that they get properly shared?

ST Employee

Other than your .cproject, .project, .ioc (if used) and linker file, and obviously the actual project source code, nothing else needs to be version-managed.

Depending on the use case, you can find it convenient to version-control .launch configurations (mainly debugger settings) or project .settings (which contain things like SFR viewer favorites settings), but those are often specific for a single developer.

Thanks. Is there a standard gitignore file for STM32 projects you can share with us? There are a lot of autogenerated file types and it would be much easier to get a comprehensive list straight from the source than to try and account for each filetype manually by browsing through the project 

Associate III

Hey just following up on this again. 

If there is no official gitignore published by ST, does anyone have one they've used in development that has worked for them?

Add this to the .gitignore file

# STM32CubeIDE