# ============================================================================= # STM32 / ARM GCC / STM32CubeIDE — standardized firmware .gitignore # Track: sources + final firmware images (*.elf *.bin *.hex *.srec) # Ignore: build intermediates, IDE noise, logs, captures, backups # # NOTE: Only root /Debug /Release /Build are build dirs. # Do NOT use **/Debug — on Windows (core.ignorecase) that also matches # source folders like Libs/**/DEBUG/. # ============================================================================= # ----------------------------------------------------------------------------- # Build dirs (project root only): ignore all, then re-include firmware images # ----------------------------------------------------------------------------- /Debug/* !/Debug/ /Release/* !/Release/ /Build/* !/Build/ # ----------------------------------------------------------------------------- # Object / dependency / analysis outputs (any path) # ----------------------------------------------------------------------------- *.o *.obj *.d *.su *.cyclo # ----------------------------------------------------------------------------- # Generated make fragments (CubeIDE) # ----------------------------------------------------------------------------- *.mk makefile Makefile objects.list objects.mk sources.mk subdir.mk # ----------------------------------------------------------------------------- # Linker listings (not needed in repo) # ----------------------------------------------------------------------------- *.map *.list # ----------------------------------------------------------------------------- # Backups / temp # ----------------------------------------------------------------------------- **/Backup/ *.bak *.tmp *.swp *.swo *~ # ----------------------------------------------------------------------------- # IDE / tooling (local machine) # ----------------------------------------------------------------------------- .settings/ .mxproject .externalToolBuilders/ .metadata/ .idea/ *.launch *.code-workspace # ----------------------------------------------------------------------------- # Logs / analyzer captures # ----------------------------------------------------------------------------- log.txt log*.txt *.log *.asc # ----------------------------------------------------------------------------- # OS junk # ----------------------------------------------------------------------------- .DS_Store Thumbs.db # ============================================================================= # Keep final firmware images under root build dirs # ============================================================================= !/Debug/*.elf !/Debug/*.bin !/Debug/*.hex !/Debug/*.srec !/Release/*.elf !/Release/*.bin !/Release/*.hex !/Release/*.srec !/Build/*.elf !/Build/*.bin !/Build/*.hex !/Build/*.srec # IDE local .vscode/