.gitignore for STM32CubeIDE
18 ignore rules for STM32CubeIDE, ready to copy into your repository.
Eclipse-based IDE for STM32 microcontrollers
The complete .gitignore for STM32CubeIDE
# Generated by LFGitignore - https://lfgitignore.com
# Created: 2026-09-17 17:01:12 UTC
# Technologies: STM32CubeIDE
### STM32CubeIDE ###
# Log file
*.log
Debug/
Release/
*.elf
*.map
*.bin
# Hex dump file
*.hex
*.srec
*.lst
# Object file
*.o
*.d
# Static library
*.a
# Stack usage file
*.su
*.crl
# TouchGFX generated sources
TouchGFX/generated
TouchGFX/build
TouchGFX/simulator/msvs/.vs
# Backup file
*.bak
What these STM32CubeIDE rules actually ignore
Every pattern below, and why it belongs in your .gitignore.
These are not necessary for version control.
| Pattern | What it ignores |
|---|---|
*.log |
Log file |
These are not needed in the repository as they are generated during the build process.
| Pattern | What it ignores |
|---|---|
Debug/ |
These are not needed in the repository as they are generated during the build process. |
Release/ |
These are not needed in the repository as they are generated during the build process. |
They should not be included in the repository as they are build artifacts.
| Pattern | What it ignores |
|---|---|
*.elf |
They should not be included in the repository as they are build artifacts. |
*.map |
They should not be included in the repository as they are build artifacts. |
*.bin |
They should not be included in the repository as they are build artifacts. |
*.hex |
Hex dump file |
*.srec |
They should not be included in the repository as they are build artifacts. |
*.lst |
They should not be included in the repository as they are build artifacts. |
*.o |
Object file |
*.d |
They should not be included in the repository as they are build artifacts. |
*.a |
Static library |
*.su |
Stack usage file |
*.crl |
They should not be included in the repository as they are build artifacts. |
TouchGFX files (in case your project has touchGFX)
| Pattern | What it ignores |
|---|---|
TouchGFX/generated |
TouchGFX generated sources |
TouchGFX/build |
TouchGFX files (in case your project has touchGFX) |
TouchGFX/simulator/msvs/.vs |
TouchGFX files (in case your project has touchGFX) |
These are not needed in the repository.
| Pattern | What it ignores |
|---|---|
*.bak |
Backup file |
How to use this .gitignore for STM32CubeIDE
- Copy the STM32CubeIDE rules above, or download the file directly.
- Create a file named .gitignore at the root of your Git repository and paste the rules into it.
- If some of those files are already tracked, run git rm -r --cached . then commit again — Git only applies ignore rules to untracked files.
- Commit the .gitignore so everyone on the team shares the same rules.