前言

该文章主要介绍.gitignore注释文件

忽略编译生成的中间文件、产物和本地 IDE 配置

保留团队协作和编译必需的源文件和工程配置

提供明确指导,减少团队误提交无用文件

在使用 Git 管理 Keil MDK(μVision 5)工程时,需要忽略编译生成的临时文件、调试文件、用户配置等非必要内容。以下是忽略文件的详细列表及说明,可直接保存为 .gitignore 文件:

Keil MDK 工程的 .gitignore 文件

gitignore

# ================================
# 嵌入式开发通用 gitignore 模板
# 支持: Keil/IAR/STM32Cube/Renesas/HDSC/GCC-ARM/PlatformIO等
# ================================

# ================================
# 用户自定义忽略区域
# ================================
# 在此处添加项目特定的忽略规则




# ================================
# 构建输出目录
# ================================
build/
Build/
output/
Output/
Objects/
Obj/
Listings/
Lst/
Debug/
Release/
dist/
bin/
*.dir/
.cache/

# ================================
# 通用编译产物(所有工具链)
# ================================
*.o
*.obj
*.axf
*.elf
*.hex
*.bin
*.out
*.map
*.lst
*.lss
*.sym
*.srec
*.s19
*.mot

# ================================
# 中间文件(所有工具链)
# ================================
*.d
*.dep
*.crf
*.i
*.ii
*.s
*.su
*.bak
*.tmp

# ================================
# Keil MDK-ARM 专有文件
# ================================
# 用户配置(本地化)
*.uvoptx
*.uvopt
*.uvguix.*
*.uvgui.*
# 项目文件(需提交)
!*.uvprojx
!*.uvproj
# Keil 特有的中间文件
*.lnp
*.plg
*.scvd
*.rte
*.SBR
*.htm
*.__i
*._i
*.uvmpw

# ================================
# IAR Embedded Workbench
# ================================
*.ewt
*.ewd
*.ewp
*.eww
settings/
$PROJ_DIR$/Debug/
$PROJ_DIR$/Release/

# ================================
# STM32CubeMX / STM32CubeIDE
# ================================
*.ioc.bak
*.mxproject
.mxproject
.settings/
STM32CubeIDE/
TouchGFX/build/
TouchGFX/generated/

# ================================
# Renesas e² studio / CS+
# ================================
.metadata/
RemoteSystemsTempFiles/
# CS+ 特有文件
*.abs
*.poc
*.inc
*.ipr
*.org
*.sys
*.mtud
*.pack
.rlaunch
# RL78 链接器和项目文件
*.clnk
*.mtpj
*.rcpe

# ================================
# 华大半导体(HDSC)
# ================================
*.hdsproj.user
*.hdsc_workspace
*.hproject
HDSC_IDE/
*.afx
*.afr

# ================================
# GCC ARM 工具链
# ================================
*.a

# ================================
# CMake 构建系统
# ================================
CMakeFiles/
CMakeCache.txt
cmake_install.cmake
Makefile
*.cmake
!CMakeLists.txt
compile_commands.json

# ================================
# PlatformIO
# ================================
.pio/
.pioenvs/
.piolibdeps/
.clang_complete
.gcc-flags.json

# ================================
# Segger Embedded Studio
# ================================
*.emProject.user
*.emSession

# ================================
# NXP MCUXpresso IDE
# ================================
.mcuxpressoide*/

# ================================
# TI Code Composer Studio (CCS)
# ================================
.ccsproject
.cproject
.project
*.projectspec
targetConfigs/
Debug_*/
Release_*/
*.xds
*.ccxml

# ================================
# Microchip MPLAB X / Microchip Studio
# ================================
.generated_files/
nbproject/private/
nbproject/Package-*.bash
nbproject/Makefile-*.mk
*.X/dist/
*.mc3
*.mcp
*.mcw

# ================================
# Infineon DAVE / ModusToolbox
# ================================
.mtbLaunchConfigs/
mtb_shared/
build/
libs/
*.cydsn/
*.cyprj.*
*.cywrk.*

# ================================
# Nordic nRF Connect SDK
# ================================
.nrfconnect/
.west/
twister-out/
sanitycheck/
zephyr/.config

# ================================
# Espressif ESP-IDF
# ================================
sdkconfig.old
sdkconfig.defaults
*.espressif/
managed_components/

# ================================
# Silicon Labs Simplicity Studio
# ================================
.SPC/
.slcp
*.slpb
*.slps
autogen/
gecko_sdk*/

# ================================
# 国产工具链
# ================================
# MounRiver Studio(沁恒 WCH)
.MounRiver_project/

# RT-Thread Studio
.rttstudio/
rtconfig.h

# EIDE(VSCode 插件)
.eide/
.eide.usr.ctx.json

# 新唐科技 Nuvoton
*.nuproj.user
NuvotonIDE/

# 灵动微电子 MindMotion
*.mmproj.user
MindMotion_IDE/

# 航顺芯片 HK32
*.hkproj.user

# 先楫半导体 HPMicro (RISC-V)
*.hpm_sdk/
hpm_build/

# 博流智能 Bouffalo Lab (RISC-V)
*.blproj.user
bouffalo_sdk/build/

# ================================
# 调试器配置文件
# ================================
*.ini
*.jlink
*.svd
*.tracespec
*.cdb
*.db
*.dbg
JLinkLog.txt
JLinkSettings.ini

# ================================
# IDE 自动生成文件
# ================================
# Visual Studio Code
.vscode/
# JetBrains IDE
.idea/
# Visual Studio
.vs/
# Eclipse
.cproject
.project
*.launch
# 通用配置文件
*.code-workspace
*.user
*.suo
*.sdf
*.opensdf
*.VC.db

# ================================
# 编辑器临时文件
# ================================
*~
*.swp
*.swo
*.~*

# ================================
# 操作系统文件
# ================================
.DS_Store
Thumbs.db
desktop.ini
.Spotlight-V100
.Trashes
ehthumbs.db

# ================================
# 版本控制辅助工具 & AI 编程工具
# ================================
# 代码历史记录和备份插件
.history/
.lh/
__history/
.code-workspace-history/

# AI 编程助手工具配置目录
.claude/          # Claude Code
.copilot/         # GitHub Copilot
.cursor/          # Cursor AI
.continue/        # Continue.dev
.tabnine/         # TabNine AI
.codeium/         # Codeium
.windsurf/        # Windsurf AI
.aider/           # Aider AI
.mentat/          # Mentat AI
.sourcegraph/     # Sourcegraph Cody
.bito/            # Bito AI
.devpilot/        # DevPilot
.amazon-q/        # Amazon Q Developer
.supermaven/      # Supermaven AI

# ================================
# 日志和报告
# ================================
*.log
*.BAT

# ================================
# 其他工具配置
# ================================
.clang-format
.clang-tidy
tags
TAGS
cscope.*


gitignore.en

# ================================
# Embedded Development Universal gitignore Template (English Detailed Version)
# Supports: Keil/IAR/STM32Cube/Renesas/HDSC/GCC-ARM/PlatformIO and other mainstream platforms
# Scope: ARM Cortex-M/RISC-V/8051 and other microcontroller development
# ================================

# ================================
# User Custom Ignore Area
# ================================
# Add your project-specific ignore rules here, such as:
#   - Private configuration files (keys, credentials, etc.)
#   - Large test data files
#   - Tool-generated intermediate files
#   - Personal configurations in team collaboration




# ================================
# Build Output Directories
# ================================
# Default build output directories for Keil/IAR/GCC toolchains, containing intermediate and final firmware files
build/
Build/
output/
Output/
# Keil default object files directory
Objects/
# IAR default object files directory
Obj/
# Keil default assembly listing directory
Listings/
# IAR default listing directory
Lst/
# Debug build directory
Debug/
# Release build directory
Release/
# Distribution directory
dist/
# Binary files directory
bin/
# CMake generated directories
*.dir/
# Cache directory
.cache/

# Generic Build Artifacts (All Toolchains)
# Object File
*.o
# Windows-style object file
*.obj
# ARM Executable Format (contains debug info)
*.axf
# Executable and Linkable Format (generic executable)
*.elf
# Intel HEX format firmware (commonly used for MCU flashing)
*.hex
# Raw binary firmware (no address info)
*.bin
# Generic output file
*.out
# Memory map file (symbol addresses, linker info)
*.map
# Assembly listing file (disassembly code)
*.lst
# Extended assembly listing file
*.lss
# Symbol table file (for debugging)
*.sym
# Motorola S-Record format firmware
*.srec
# S19 format firmware (Motorola S-Record variant)
*.s19
# Motorola firmware format
*.mot

# Intermediate Files (All Toolchains)
# Dependency file (auto-generated by compiler)
*.d
# Dependency file (legacy format)
*.dep
# Cross Reference file
*.crf
# Preprocessed C file (macro-expanded)
*.i
# Preprocessed C++ file
*.ii
# Assembly intermediate file
*.s
# Stack usage analysis file
*.su
# Backup file
*.bak
# Temporary file
*.tmp

# Keil MDK-ARM Specific Files
# User personalization config files (window layout, breakpoints, watch variables, localized settings)
# Keil MDK5 user options file (includes debug settings, window layout)
*.uvoptx
# Keil MDK4 user options file
*.uvopt
# Keil GUI layout file (window position, size, etc., machine-specific)
*.uvguix.*
# Legacy GUI layout file
*.uvgui.*

# Project files (these need to be committed to version control)
# Keil MDK5 project file (important! includes compiler settings, linker scripts, file list)
!*.uvprojx
# Keil MDK4 project file
!*.uvproj

# Keil-specific build and debug intermediate files
# Linker command file (auto-generated, records linker options)
*.lnp
# Build log file
*.plg
# System Viewer description file
*.scvd
# Run Time Environment config file
*.rte
# Source Browser file (symbol browsing info)
*.SBR
# HTML report files generated by Keil (code coverage, code review, etc.)
*.htm
# Compiler preprocessor intermediate file (macro-expanded file)
*.__i
# Another preprocessor intermediate file
*._i
# Multi-project workspace file (localized)
*.uvmpw

# IAR Embedded Workbench Specific Files
# IAR workbench config file
*.ewt
# IAR debugger config file
*.ewd
# IAR project file (sometimes needs to be committed)
*.ewp
# IAR workspace file
*.eww
# IAR local settings directory
settings/
# IAR macro variable path for debug directory
$PROJ_DIR$/Debug/
# IAR macro variable path for release directory
$PROJ_DIR$/Release/

# STM32CubeMX / STM32CubeIDE Specific Files
# STM32CubeMX project file backup (.ioc file itself should be committed)
*.ioc.bak
# STM32CubeMX metadata file
*.mxproject
# CubeMX project config
.mxproject
# Eclipse settings directory (STM32CubeIDE is Eclipse-based)
.settings/
# STM32CubeIDE workspace directory
STM32CubeIDE/

# TouchGFX GUI development framework related
# TouchGFX build output
TouchGFX/build/
# TouchGFX auto-generated code (can be regenerated)
TouchGFX/generated/

# Renesas e² studio / CS+ Specific Files
# Eclipse metadata directory (e² studio is Eclipse-based)
.metadata/
# Remote debug temporary files
RemoteSystemsTempFiles/

# CS+ (CubeSuite+) IDE specific files
# Absolute path file
*.abs
# Compilation intermediate file
*.poc
# Auto-generated include file
*.inc
# Debug info file
*.ipr
# Relocatable file
*.org
# System file
*.sys
# CS+ compilation intermediate data/debug cache
*.mtud
# MCU Pack file (auto-downloaded, no need to commit)
*.pack
# Debug config file
.rlaunch

# RL78 linker and project files (VSCode development environment)
# Linker command file (auto-generated)
*.clnk
# Project configuration file
*.mtpj
# Configuration file
*.rcpe

# HDSC (Huada Semiconductor) Specific Files
# HDSC IDE project files (HD32 series MCUs like HC32F460, HC32L110, etc.)
# User personalization project config
*.hdsproj.user
# HDSC IDE workspace config
*.hdsc_workspace
# HDSC project metadata
*.hproject
# HDSC IDE generated directory
HDSC_IDE/

# HD32 series specific files
# HDSC specific debug file
*.afx
# HDSC specific report file
*.afr

# GCC ARM Toolchain Specific Files
# Static library file (Archive)
*.a

# CMake Build System
# CMake generated build files directory
CMakeFiles/
# CMake cache file (contains configuration info)
CMakeCache.txt
# CMake install script
cmake_install.cmake
# CMake generated Makefile (do not edit manually)
Makefile
# CMake generated script files
*.cmake
# Exception: CMakeLists.txt needs to be committed (this is source file)
!CMakeLists.txt
# Clang toolchain compilation commands database
compile_commands.json

# PlatformIO (Open-source embedded development platform)
# PlatformIO build directory
.pio/
# PlatformIO environment directory (old version)
.pioenvs/
# PlatformIO library dependencies directory
.piolibdeps/
# Clang code completion config
.clang_complete
# GCC compilation flags config
.gcc-flags.json

# Segger Embedded Studio
# Segger IDE user config file
*.emProject.user
# Segger IDE session file
*.emSession

# NXP MCUXpresso IDE
# MCUXpresso IDE workspace directory
.mcuxpressoide*/

# TI Code Composer Studio (CCS)
# Texas Instruments official IDE for MSP430, MSP432, TM4C, CC series MCU development
# CCS project configuration file
.ccsproject
# Eclipse C/C++ project configuration
.cproject
# Eclipse project file
.project
# Project specification file
*.projectspec
# Target configuration directory (debugger settings)
targetConfigs/
# Debug build output directory
Debug_*/
# Release build output directory
Release_*/
# XDS debugger configuration file
*.xds
# Target configuration XML file
*.ccxml

# Microchip MPLAB X / Microchip Studio
# Microchip official IDE for PIC, AVR, SAM series MCU development
# Auto-generated files directory
.generated_files/
# NetBeans private configuration directory
nbproject/private/
# Packaging scripts
nbproject/Package-*.bash
# Auto-generated Makefiles
nbproject/Makefile-*.mk
# MPLAB X distribution directory
*.X/dist/
# MPLAB Code Configurator 3 configuration
*.mc3
# MPLAB 8 project file
*.mcp
# MPLAB 8 workspace file
*.mcw

# Infineon DAVE / ModusToolbox
# Infineon official IDE for XMC, PSoC, AURIX series MCU development
# ModusToolbox launch configurations
.mtbLaunchConfigs/
# ModusToolbox shared library directory
mtb_shared/
# Build output directory
build/
# Library files directory
libs/
# PSoC Creator design directory
*.cydsn/
# PSoC Creator project file
*.cyprj.*
# PSoC Creator workspace file
*.cywrk.*

# Nordic nRF Connect SDK
# Nordic official development tools for nRF52/53/91 series Bluetooth/IoT MCUs
# nRF Connect configuration directory
.nrfconnect/
# West build system configuration
.west/
# Zephyr test framework output
twister-out/
# Sanity check output
sanitycheck/
# Zephyr kernel configuration
zephyr/.config

# Espressif ESP-IDF
# Espressif official development framework for ESP32, ESP8266 series WiFi/Bluetooth MCUs
# SDK configuration backup file
sdkconfig.old
# SDK default configuration
sdkconfig.defaults
# ESP-IDF toolchain directory
*.espressif/
# Managed components directory
managed_components/

# Silicon Labs Simplicity Studio
# Silicon Labs official IDE for EFM32, EFR32 series MCUs
# Simplicity project configuration
.SPC/
# Simplicity project file
.slcp
# Simplicity project build file
*.slpb
# Simplicity project settings
*.slps
# Auto-generated code directory
autogen/
# Gecko SDK directory
gecko_sdk*/

# Domestic Chinese Toolchains
# MounRiver Studio (WCH official IDE for CH32 series)
# MounRiver project config directory
.MounRiver_project/

# RT-Thread Studio (RT-Thread RTOS development environment)
# RT-Thread Studio config directory
.rttstudio/
# RT-Thread config header file (auto-generated)
rtconfig.h

# EIDE (VSCode plugin, Embedded IDE)
# EIDE project config directory
.eide/
# EIDE user context config
.eide.usr.ctx.json

# Nuvoton (M0/M4 series MCUs)
# Nuvoton IDE user configuration
*.nuproj.user
# Nuvoton IDE generated directory
NuvotonIDE/

# MindMotion (MM32 series MCUs)
# MindMotion IDE user configuration
*.mmproj.user
# MindMotion IDE generated directory
MindMotion_IDE/

# HK32 (航顺芯片 HK32 series MCUs)
# HK32 IDE user configuration
*.hkproj.user

# HPMicro (HPM series RISC-V MCUs)
# HPM SDK cache directory
*.hpm_sdk/
# HPM build output directory
hpm_build/

# Bouffalo Lab (BL series RISC-V MCUs)
# Bouffalo Lab IDE user configuration
*.blproj.user
# Bouffalo SDK build directory
bouffalo_sdk/build/

# Debugger Configuration Files
# Debug script config (may contain hardware-specific settings, localized)
*.ini
# J-Link debug script (sometimes needs to be committed for shared debug config)
*.jlink
# System View Description (peripheral register description file, sometimes downloaded with IDE)
*.svd
# Trace tracking config file
*.tracespec
# Debugger database
*.cdb
# Generic database file
*.db
# Debug info file
*.dbg
# J-Link debug log
JLinkLog.txt
# J-Link config file
JLinkSettings.ini

# IDE Auto-Generated Files (Generic)
# Visual Studio Code config directory
# VSCode config directory (settings.json/launch.json, etc.)
.vscode/

# JetBrains IDE config directory
# JetBrains IDE config directory (CLion/IntelliJ, etc.)
.idea/

# Visual Studio config directory
# Visual Studio config directory
.vs/

# Eclipse config files (e² studio, STM32CubeIDE, etc. are Eclipse-based)
# Eclipse C/C++ project config (may need to be committed depending on requirements)
.cproject
# Eclipse project file (may need to be committed depending on requirements)
.project
# Eclipse launch configuration file (debugger config, localized)
*.launch

# Generic user config files
# VSCode workspace file
*.code-workspace
# User personalization config file (common across multiple IDEs)
*.user
# Visual Studio user options file
*.suo
# Visual Studio IntelliSense database
*.sdf
*.opensdf
# Visual Studio database
*.VC.db

# Editor Temporary Files
# Linux/Unix editor backup files (vim/emacs)
*~
# Vim swap file (during editing session)
*.swp
# Vim swap file (backup)
*.swo
# Wildcard-matched backup files
*.~*

# Operating System Files
# macOS Finder metadata file
.DS_Store
# Windows thumbnail cache
Thumbs.db
# Windows folder config (custom icons, sorting, etc.)
desktop.ini
# macOS Spotlight index
.Spotlight-V100
# macOS trash
.Trashes
# Windows thumbnail cache (encrypted version)
ehthumbs.db

# Version Control Auxiliary Tools & AI Programming Tools
# Code history and backup plugins (VSCode/JetBrains, etc.)
# VSCode Local History plugin generated history, records file modification history
.history/
# Local History plugin alternative format directory
.lh/
# Some editors' history directory
__history/
# VSCode workspace history
.code-workspace-history/

# AI programming assistant configuration files (not recommended to commit, contains personal habits and API keys)
# Claude Code AI programming assistant config directory (includes session history, personalization, etc.)
.claude/
# GitHub Copilot cache and config directory (Microsoft official AI assistant)
.copilot/
# Cursor AI editor config directory (includes AI sessions, personal preferences, etc.)
.cursor/
# Continue.dev AI programming assistant config (open-source AI programming tool)
.continue/
# TabNine AI code completion tool config and cache
.tabnine/
# Codeium AI programming assistant config (free AI tool)
.codeium/
# Windsurf AI programming assistant config
.windsurf/
# Aider AI programming assistant config (command-line AI tool)
.aider/
# Mentat AI programming assistant config
.mentat/
# Sourcegraph Cody AI assistant config
.sourcegraph/
# Bito AI programming assistant config
.bito/
# DevPilot AI programming assistant config (Baidu product)
.devpilot/
# Amazon Q Developer AI assistant config (AWS product)
.amazon-q/
# Supermaven AI code completion tool config
.supermaven/

# Log and Report Files
# Generic log files (build logs, debug logs, etc.)
*.log
# Keil/ARMCC auto-generated batch scripts
*.BAT

# Other Tools and Configurations
# Clang code formatting config (decide whether to commit based on team standards)
.clang-format
# Clang static analysis config
.clang-tidy
# Ctags symbol index file
tags
# Etags symbol index file
TAGS
# Cscope code browsing tool index files
cscope.*

gitignore.cn

# ================================
# 嵌入式开发通用 gitignore 模板(中文详细注释版)
# 支持: Keil/IAR/STM32Cube/Renesas/HDSC/GCC-ARM/PlatformIO等主流平台
# 适用范围: ARM Cortex-M/RISC-V/8051等微控制器开发
# ================================

# ================================
# 用户自定义忽略区域
# ================================
# 在此处添加项目特定的忽略规则,例如:
#   - 私密配置文件(密钥、凭证等)
#   - 大型测试数据文件
#   - 特定工具生成的中间文件
#   - 团队协作中的个人配置




# ================================
# 构建输出目录
# ================================
# Keil/IAR/GCC等工具链的默认构建输出目录,包含中间文件和最终固件
build/
Build/
output/
Output/
# Keil默认对象文件目录
Objects/
# IAR默认对象文件目录
Obj/
# Keil默认汇编列表目录
Listings/
# IAR默认列表目录
Lst/
# 调试版本构建目录
Debug/
# 发布版本构建目录
Release/
# 分发目录
dist/
# 二进制文件目录
bin/
# CMake生成的目录
*.dir/
# 缓存目录
.cache/

# 通用编译产物(所有工具链通用)
# 目标文件
*.o
# Windows风格目标文件
*.obj
# ARM可执行格式(包含调试信息)
*.axf
# 通用可执行文件格式
*.elf
# Intel HEX格式固件(常用于MCU烧录)
*.hex
# 原始二进制固件(无地址信息)
*.bin
# 通用输出文件
*.out
# 内存映射文件(符号地址、链接器信息)
*.map
# 汇编列表文件(反汇编代码)
*.lst
# 扩展汇编列表文件
*.lss
# 符号表文件(用于调试)
*.sym
# Motorola S-Record格式固件
*.srec
# S19格式固件(Motorola S-Record变体)
*.s19
# Motorola固件格式
*.mot

# 中间文件(所有工具链通用)
# 依赖关系文件(编译器自动生成)
*.d
# 依赖关系文件(旧格式)
*.dep
# 交叉引用文件
*.crf
# 预处理后的C文件(宏展开)
*.i
# 预处理后的C++文件
*.ii
# 汇编中间文件
*.s
# 栈使用分析文件
*.su
# 备份文件
*.bak
# 临时文件
*.tmp

# Keil MDK-ARM 专有文件
# 用户个性化配置文件(窗口布局、断点、监视变量等,本地化设置)
# Keil MDK5用户选项文件(包含调试设置、窗口布局)
*.uvoptx
# Keil MDK4用户选项文件
*.uvopt
# Keil GUI布局文件(窗口位置、大小等,机器特定)
*.uvguix.*
# 旧版GUI布局文件
*.uvgui.*

# 项目文件(这些需要提交到版本控制)
# Keil MDK5项目文件(重要!包含编译器设置、链接脚本、文件列表)
!*.uvprojx
# Keil MDK4项目文件
!*.uvproj

# Keil特有的构建和调试中间文件
# 链接器命令文件(自动生成,记录链接器选项)
*.lnp
# 构建日志文件
*.plg
# 系统查看器描述文件
*.scvd
# 运行时环境配置文件
*.rte
# 源码浏览器文件(符号浏览信息)
*.SBR
# Keil生成的HTML报告文件(代码覆盖率、代码审查等)
*.htm
# 编译器预处理中间文件(宏展开后的文件)
*.__i
# 另一种预处理中间文件
*._i
# 多项目工作区文件(本地化)
*.uvmpw

# IAR Embedded Workbench 专有文件
# IAR工作台配置文件
*.ewt
# IAR调试器配置文件
*.ewd
# IAR项目文件(有时需要提交)
*.ewp
# IAR工作区文件
*.eww
# IAR本地设置目录
settings/
# IAR宏变量路径的调试目录
$PROJ_DIR$/Debug/
# IAR宏变量路径的发布目录
$PROJ_DIR$/Release/

# STM32CubeMX / STM32CubeIDE 专有文件
# STM32CubeMX工程文件的备份(.ioc文件本身需要提交)
*.ioc.bak
# STM32CubeMX元数据文件
*.mxproject
# CubeMX项目配置
.mxproject
# Eclipse设置目录(STM32CubeIDE基于Eclipse)
.settings/
# STM32CubeIDE工作区目录
STM32CubeIDE/

# TouchGFX GUI开发框架相关
# TouchGFX构建输出
TouchGFX/build/
# TouchGFX自动生成的代码(可重新生成)
TouchGFX/generated/

# Renesas e² studio / CS+ 专有文件
# Eclipse元数据目录(e² studio基于Eclipse)
.metadata/
# 远程调试临时文件
RemoteSystemsTempFiles/

# CS+ (CubeSuite+) IDE专有文件
# 绝对路径文件
*.abs
# 编译中间文件
*.poc
# 自动生成的包含文件
*.inc
# 调试信息文件
*.ipr
# 可重定位文件
*.org
# 系统文件
*.sys
# CS+编译中间数据/调试缓存
*.mtud
# MCU Pack文件(自动下载,无需提交)
*.pack
# 调试配置文件
.rlaunch

# RL78 链接器和项目文件(VSCode开发环境)
# 链接器命令文件(自动生成)
*.clnk
# 项目配置文件
*.mtpj
# 配置文件
*.rcpe

# 华大半导体(HDSC)专有文件
# HDSC IDE项目文件(HD32系列MCU,如HC32F460、HC32L110等)
# 用户个性化项目配置
*.hdsproj.user
# HDSC IDE工作区配置
*.hdsc_workspace
# HDSC项目元数据
*.hproject
# HDSC IDE生成目录
HDSC_IDE/

# HD32系列特定文件
# HDSC特定的调试文件
*.afx
# HDSC特定的报告文件
*.afr

# GCC ARM 工具链专有文件
# 静态库文件
*.a

# CMake 构建系统
# CMake生成的构建文件目录
CMakeFiles/
# CMake缓存文件(包含配置信息)
CMakeCache.txt
# CMake安装脚本
cmake_install.cmake
# CMake生成的Makefile(不要手动编辑)
Makefile
# CMake生成的脚本文件
*.cmake
# 例外:CMakeLists.txt需要提交(这是源文件)
!CMakeLists.txt
# Clang工具链使用的编译命令数据库
compile_commands.json

# PlatformIO(开源嵌入式开发平台)
# PlatformIO构建目录
.pio/
# PlatformIO环境目录(旧版)
.pioenvs/
# PlatformIO库依赖目录
.piolibdeps/
# Clang代码补全配置
.clang_complete
# GCC编译标志配置
.gcc-flags.json

# Segger Embedded Studio
# Segger IDE用户配置文件
*.emProject.user
# Segger IDE会话文件
*.emSession

# NXP MCUXpresso IDE
# MCUXpresso IDE工作区目录
.mcuxpressoide*/

# TI Code Composer Studio (CCS)
# 德州仪器官方IDE,用于MSP430、MSP432、TM4C、CC系列MCU开发
# CCS项目配置文件
.ccsproject
# Eclipse C/C++项目配置
.cproject
# Eclipse项目文件
.project
# 项目规格文件
*.projectspec
# 目标配置目录(调试器配置)
targetConfigs/
# 调试版本输出目录
Debug_*/
# 发布版本输出目录
Release_*/
# XDS调试器配置文件
*.xds
# 目标配置XML文件
*.ccxml

# Microchip MPLAB X / Microchip Studio
# Microchip官方IDE,用于PIC、AVR、SAM系列MCU开发
# 自动生成的文件目录
.generated_files/
# NetBeans私有配置目录
nbproject/private/
# 打包脚本
nbproject/Package-*.bash
# 自动生成的Makefile
nbproject/Makefile-*.mk
# MPLAB X分发目录
*.X/dist/
# MPLAB Code Configurator 3配置
*.mc3
# MPLAB 8项目文件
*.mcp
# MPLAB 8工作区文件
*.mcw

# Infineon DAVE / ModusToolbox
# 英飞凌官方IDE,用于XMC、PSoC、AURIX系列MCU开发
# ModusToolbox启动配置
.mtbLaunchConfigs/
# ModusToolbox共享库目录
mtb_shared/
# 构建输出目录
build/
# 库文件目录
libs/
# PSoC Creator设计目录
*.cydsn/
# PSoC Creator项目文件
*.cyprj.*
# PSoC Creator工作区文件
*.cywrk.*

# Nordic nRF Connect SDK
# Nordic官方开发工具,用于nRF52/53/91系列蓝牙/物联网MCU
# nRF Connect配置目录
.nrfconnect/
# West构建系统配置
.west/
# Zephyr测试框架输出
twister-out/
# 健全性检查输出
sanitycheck/
# Zephyr内核配置
zephyr/.config

# Espressif ESP-IDF
# 乐鑫官方开发框架,用于ESP32、ESP8266系列WiFi/蓝牙MCU
# SDK配置备份文件
sdkconfig.old
# SDK默认配置
sdkconfig.defaults
# ESP-IDF工具链目录
*.espressif/
# 托管组件目录
managed_components/

# Silicon Labs Simplicity Studio
# 芯科科技官方IDE,用于EFM32、EFR32系列MCU
# Simplicity项目配置
.SPC/
# Simplicity项目文件
.slcp
# Simplicity项目构建文件
*.slpb
# Simplicity项目设置
*.slps
# 自动生成代码目录
autogen/
# Gecko SDK目录
gecko_sdk*/

# 国产工具链
# MounRiver Studio(沁恒WCH官方IDE,用于CH32系列)
# MounRiver项目配置目录
.MounRiver_project/

# RT-Thread Studio(睿赛德RTOS开发环境)
# RT-Thread Studio配置目录
.rttstudio/
# RT-Thread配置头文件(自动生成)
rtconfig.h

# EIDE(VSCode插件,Embedded IDE)
# EIDE项目配置目录
.eide/
# EIDE用户上下文配置
.eide.usr.ctx.json

# 新唐科技Nuvoton(M0/M4系列MCU)
# Nuvoton IDE用户配置
*.nuproj.user
# Nuvoton IDE生成目录
NuvotonIDE/

# 灵动微电子MindMotion(MM32系列MCU)
# MindMotion IDE用户配置
*.mmproj.user
# MindMotion IDE生成目录
MindMotion_IDE/

# 航顺芯片(HK32系列MCU)
# HK32 IDE用户配置
*.hkproj.user

# 先楫半导体HPMicro(HPM系列RISC-V MCU)
# HPM SDK缓存目录
*.hpm_sdk/
# HPM构建输出目录
hpm_build/

# 博流智能Bouffalo Lab(BL系列RISC-V MCU)
# Bouffalo Lab IDE用户配置
*.blproj.user
# Bouffalo SDK构建目录
bouffalo_sdk/build/

# 调试器配置文件
# 调试脚本配置(可能包含硬件相关设置,本地化)
*.ini
# J-Link调试脚本(有时需要提交共享的调试配置)
*.jlink
# 系统视图描述(外设寄存器描述文件,有时随IDE下载)
*.svd
# 跟踪追踪配置文件
*.tracespec
# 调试器数据库
*.cdb
# 通用数据库文件
*.db
# 调试信息文件
*.dbg
# J-Link调试日志
JLinkLog.txt
# J-Link配置文件
JLinkSettings.ini

# IDE自动生成文件(多种IDE通用)
# Visual Studio Code配置目录
# VSCode配置目录(settings.json/launch.json等)
.vscode/

# JetBrains IDE配置目录
# JetBrains IDE配置目录(CLion/IntelliJ等)
.idea/

# Visual Studio配置目录
# Visual Studio配置目录
.vs/

# Eclipse配置文件(e² studio、STM32CubeIDE等基于Eclipse)
# Eclipse C/C++项目配置(根据需求可能需要提交)
.cproject
# Eclipse项目文件(根据需求可能需要提交)
.project
# Eclipse启动配置文件(调试器配置,本地化)
*.launch

# 通用用户配置文件
# VSCode工作区文件
*.code-workspace
# 用户个性化配置文件(多种IDE通用)
*.user
# Visual Studio用户选项文件
*.suo
# Visual Studio智能感知数据库
*.sdf
*.opensdf
# Visual Studio数据库
*.VC.db

# 编辑器临时文件
# Linux/Unix编辑器备份文件(vim/emacs)
*~
# Vim交换文件(编辑会话期间)
*.swp
# Vim交换文件(备份)
*.swo
# 通配符匹配的备份文件
*.~*

# 操作系统文件
# macOS Finder元数据文件
.DS_Store
# Windows缩略图缓存
Thumbs.db
# Windows文件夹配置(自定义图标、排序等)
desktop.ini
# macOS Spotlight索引
.Spotlight-V100
# macOS回收站
.Trashes
# Windows缩略图缓存(加密版本)
ehthumbs.db

# 版本控制辅助工具和AI编程助手
# 代码历史记录和备份插件(VSCode/JetBrains等)
# VSCode Local History插件生成的历史记录,记录文件的修改历史
.history/
# Local History插件备用格式目录
.lh/
# 部分编辑器的历史记录目录
__history/
# VSCode工作区历史记录
.code-workspace-history/

# AI编程助手工具生成的配置文件(不建议提交,包含个人习惯和API密钥)
# Claude Code AI编程助手配置目录(包含会话历史、个性化设置等)
.claude/
# GitHub Copilot缓存和配置目录(微软官方AI助手)
.copilot/
# Cursor AI编辑器配置目录(包含AI会话、个人偏好等)
.cursor/
# Continue.dev AI编程助手配置(开源AI编程工具)
.continue/
# TabNine AI代码补全工具配置和缓存
.tabnine/
# Codeium AI编程助手配置(免费AI工具)
.codeium/
# Windsurf AI编程助手配置
.windsurf/
# Aider AI编程助手配置(命令行AI工具)
.aider/
# Mentat AI编程助手配置
.mentat/
# Sourcegraph Cody AI助手配置
.sourcegraph/
# Bito AI编程助手配置
.bito/
# DevPilot AI编程助手配置(百度出品)
.devpilot/
# Amazon Q Developer AI助手配置(AWS出品)
.amazon-q/
# Supermaven AI代码补全工具配置
.supermaven/

# 日志和报告文件
# 通用日志文件(构建日志、调试日志等)
*.log
# Keil/ARMCC自动生成的批处理脚本
*.BAT

# 其他工具和配置
# Clang代码格式化配置(根据团队规范决定是否提交)
.clang-format
# Clang静态分析配置
.clang-tidy
# Ctags符号索引文件
tags
# Etags符号索引文件
TAGS
# Cscope代码浏览工具索引文件
cscope.*



# 汇编源文件、源码文件和必要工程文件除外,其他产物均忽略

.gitignore 文件适用于 Keil MDK-ARM、Renesas e² studio / CS+ 工程。

嵌入式开发 .gitignore 完全指南

一套完整的嵌入式开发 .gitignore 模板,支持 Keil MDK-ARM、IAR、STM32CubeMX、Renesas e² studio / CS+、华大半导体 HDSC IDE 及各种国产工具链。


前言

为什么需要完善的 .gitignore 文件?

  • 避免提交编译生成的中间文件:节省仓库空间,避免无意义的合并冲突
  • 保护团队协作和版本控制:确保只提交源文件和工程配置
  • 提供明确指导:帮助团队成员理解哪些文件需要提交
  • 支持多平台开发:涵盖主流 MCU 厂商和工具链

⚠️ 重要更新 (2025-11-25)

已修复严重Bug:行尾注释导致规则失效

在 2025-11-25 之前的版本存在一个严重问题:使用了行尾注释格式,导致 Git 无法正确匹配忽略规则。

问题示例(旧版本格式):

Objects/          # Keil 默认对象文件目录
Debug/            # 调试目录
*.uvguix.*        # GUI 布局文件

问题原因:Git 不支持行尾注释!Git 会把注释前的空格也当成规则的一部分,导致匹配失败。上面的 Objects/ 实际上匹配的是 Objects/ (包含 10 个空格),所以 Objects/test.o 不会被忽略。

新版本格式(已修复):

# Keil默认对象文件目录
Objects/
# 调试目录
Debug/
# GUI布局文件
*.uvguix.*

如果您之前下载过本模板,请立即更新到最新版本!

📖 详细的问题排查和解决方案请查看:TROUBLESHOOTING.md


支持的开发平台

MCU 厂商与工具链

厂商 MCU 系列 支持的 IDE
ST 意法 STM32 全系列 Keil MDK、IAR、STM32CubeMX、STM32CubeIDE、TouchGFX
华大半导体 HC32 系列 Keil MDK、HDSC IDE
瑞萨电子 RL78、RX、RA e² studio、CS+
NXP 恩智浦 LPC、Kinetis、i.MX RT MCUXpresso IDE、Keil MDK
沁恒微电子 CH32 系列 MounRiver Studio
兆易创新 GD32 系列 Keil MDK、IAR

开发工具

类型 支持的工具
商业 IDE Keil MDK-ARM、IAR Embedded Workbench、Segger Embedded Studio
开源/免费 PlatformIO、Eclipse、VSCode + EIDE
构建系统 CMake、Make、GCC ARM Toolchain
国产 IDE MounRiver Studio、RT-Thread Studio

文件版本说明

本项目提供 3 个版本的 gitignore 模板:

文件名 说明 适用场景
gitignore 精简版(~270行) 日常快速使用,包含简短注释
gitignore.cn 中文详细注释版(~310行) 学习参考,了解每条规则的详细说明
gitignore.en 英文详细注释版(~310行) 国际化项目、英文团队使用

使用方法:复制任意版本到项目根目录,重命名为 .gitignore 即可。


忽略规则详解

一、建议保留的文件

✅ 必须提交
文件类型 示例 说明
项目工程文件 .uvprojx, .ewp, .ioc 工程结构、构建目标、编译器选项
源码文件 .c, .cpp 主程序、模块实现
头文件 .h 函数声明、宏定义、结构体
汇编文件 .s, .S 启动文件、低级初始化
内存布局文件 .sct, .ld, .icf 分散加载文件,定义内存地址
第三方库源码 driver.c/h 未通过 Pack Installer 安装的库
⚠️ 可选提交
文件类型 说明 建议
.cproject / .project Eclipse 工程配置(构建选项、编译器宏) 团队统一 IDE 时提交
.launch 调试/启动配置(调试器、烧录配置) 共享调试配置时提交
.jlink J-Link 调试脚本 硬件配置统一时提交
.pack 自动下载的芯片支持包 通常不提交,在 README 中说明

二、建议忽略的文件

1. 编译输出文件
# 可执行文件 / 烧录文件
*.axf              # ARM 可执行文件
*.elf              # ELF 格式可执行文件
*.hex              # Intel HEX 格式固件
*.bin              # 二进制固件
*.mot              # Motorola S-Record 格式
*.out              # 通用输出文件

# 编译中间文件
*.o                # 目标文件
*.obj              # Windows 风格目标文件
*.lst              # 汇编列表文件
*.map              # 内存映射文件
*.d                # 依赖关系文件
*.dep              # 依赖文件(旧格式)

# 构建目录
build/
Build/
output/
Output/
Objects/
Debug/
Release/
2. IDE / 编辑器本地文件
# Keil MDK-ARM
*.uvoptx           # 用户选项(断点、窗口布局)
*.uvopt            # 旧版用户选项
*.uvguix.*         # GUI 布局文件
*.uvgui.*          # 旧版 GUI 布局

# IAR Embedded Workbench
*.ewt              # 工作台配置
*.ewd              # 调试器配置
settings/          # 本地设置目录

# STM32CubeMX / CubeIDE
*.ioc.bak          # CubeMX 备份文件
.mxproject         # CubeMX 元数据
.settings/         # Eclipse 设置目录
STM32CubeIDE/      # CubeIDE 工作区

# TouchGFX
TouchGFX/build/    # TouchGFX 构建输出
TouchGFX/generated/ # 自动生成代码

# VS Code
.vscode/           # VSCode 配置目录

# JetBrains IDE
.idea/             # CLion 等 IDE 配置

# EIDE
.eide/             # EIDE 项目配置
.eide.usr.ctx.json # EIDE 用户上下文
3. AI 编程助手工具配置(新增支持 14+ 工具)

随着 AI 编程工具的普及,这些工具会在项目目录生成配置文件,通常包含个人 API 密钥和会话历史,不应提交到仓库:

# 代码历史记录插件
.history/          # VSCode Local History
.lh/               # Local History 插件
__history/         # 部分编辑器历史目录
.code-workspace-history/  # VSCode 工作区历史

# AI 编程助手(按字母排序)
.aider/            # Aider AI(命令行工具)
.amazon-q/         # Amazon Q Developer(AWS 出品)
.bito/             # Bito AI
.claude/           # Claude Code(Anthropic 出品)
.codeium/          # Codeium(免费 AI 工具)
.continue/         # Continue.dev(开源)
.copilot/          # GitHub Copilot(微软出品)
.cursor/           # Cursor AI 编辑器
.devpilot/         # DevPilot(百度出品)
.mentat/           # Mentat AI
.sourcegraph/      # Sourcegraph Cody
.supermaven/       # Supermaven AI
.tabnine/          # TabNine AI
.windsurf/         # Windsurf AI
4. 调试器配置文件
*.ini              # 调试脚本配置
*.jlink            # J-Link 调试脚本
*.svd              # 外设寄存器描述文件
JLinkLog.txt       # J-Link 日志
JLinkSettings.ini  # J-Link 配置
5. 临时或备份文件
*.tmp              # 临时文件
*~                 # Unix 编辑器备份
*.bak              # 备份文件
*.swp              # Vim 交换文件
*.swo              # Vim 备份交换文件
*.db               # 数据库缓存
6. 系统相关文件
.DS_Store          # macOS Finder 缓存
Thumbs.db          # Windows 缩略图缓存
desktop.ini        # Windows 文件夹属性
.Spotlight-V100    # macOS Spotlight 索引
.Trashes           # macOS 回收站

三、平台特定说明

Keil MDK-ARM 专有文件
# 用户配置(本地化,不提交)
*.uvoptx           # MDK5 用户选项
*.uvopt            # MDK4 用户选项
*.uvguix.*         # GUI 布局
*.uvgui.*          # 旧版 GUI 布局

# 项目文件(必须提交)
!*.uvprojx         # MDK5 项目文件
!*.uvproj          # MDK4 项目文件

# Keil 特有中间文件
*.lnp              # 链接器命令文件
*.plg              # 构建日志
*.scvd             # System Viewer 描述
*.rte              # Run Time Environment 配置
*.SBR              # Source Browser 文件
*.htm              # HTML 报告文件
*.__i              # 预处理中间文件
*._i               # 预处理中间文件
Renesas e² studio / CS+ 专有文件
# e² studio(基于 Eclipse)
.metadata/         # Eclipse 元数据
RemoteSystemsTempFiles/  # 远程调试临时文件

# CS+ 自动生成文件
*.abs              # 绝对路径文件
*.poc              # 编译中间文件
*.inc              # 自动生成 include 文件
*.ipr              # 工程信息文件(本地环境相关)
*.org              # 旧备份文件
*.sys              # 系统文件
*.mot              # Motorola S-Record 固件
*.mtud             # CS+ 增量编译缓存

# Renesas Pack / Device 文件
*.pack             # MCU Pack 文件(自动下载)
.rlaunch           # 调试配置(本地机器相关)
*.scvd             # 系统视图描述文件
华大半导体(HDSC)专有文件
# HDSC IDE 项目文件
*.hdsproj.user     # 用户个性化配置
*.hdsc_workspace   # 工作区配置
*.hproject         # 项目元数据
HDSC_IDE/          # IDE 生成目录

# HD32 系列特定文件
*.afx              # HDSC 调试文件
*.afr              # HDSC 报告文件
TI Code Composer Studio (CCS)

德州仪器官方IDE,用于MSP430、MSP432、TM4C、CC系列MCU开发:

.ccsproject        # CCS项目配置
.cproject          # Eclipse项目配置
.project           # Eclipse项目文件
*.projectspec      # 项目规格文件
targetConfigs/     # 调试器目标配置
Debug_*/           # 调试版本输出
Release_*/         # 发布版本输出
*.xds              # XDS调试器配置
*.ccxml            # 目标配置XML
Microchip MPLAB X / Microchip Studio

Microchip官方IDE,用于PIC、AVR、SAM系列MCU开发:

.generated_files/       # 自动生成文件
nbproject/private/      # NetBeans私有配置
nbproject/Package-*.bash
nbproject/Makefile-*.mk
*.X/dist/          # 分发目录
*.mc3              # MCC 3配置
*.mcp              # MPLAB 8项目
*.mcw              # MPLAB 8工作区
Infineon DAVE / ModusToolbox

英飞凌官方IDE,用于XMC、PSoC、AURIX系列MCU开发:

.mtbLaunchConfigs/ # 启动配置
mtb_shared/        # 共享库目录
libs/              # 库文件
*.cydsn/           # PSoC Creator设计
*.cyprj.*          # PSoC项目文件
*.cywrk.*          # PSoC工作区
Nordic nRF Connect SDK

Nordic官方开发工具,用于nRF52/53/91系列蓝牙/物联网MCU:

.nrfconnect/       # nRF Connect配置
.west/             # West构建系统
twister-out/       # Zephyr测试输出
sanitycheck/       # 健全性检查
zephyr/.config     # Zephyr内核配置
Espressif ESP-IDF

乐鑫官方开发框架,用于ESP32、ESP8266系列WiFi/蓝牙MCU:

sdkconfig.old      # SDK配置备份
sdkconfig.defaults # SDK默认配置
*.espressif/       # 工具链目录
managed_components/ # 托管组件
Silicon Labs Simplicity Studio

芯科科技官方IDE,用于EFM32、EFR32系列MCU:

.SPC/              # 项目配置
.slcp              # 项目文件
*.slpb             # 构建文件
*.slps             # 项目设置
autogen/           # 自动生成代码
gecko_sdk*/        # Gecko SDK
国产工具链
# MounRiver Studio(沁恒 WCH 官方 IDE)
.MounRiver_project/

# RT-Thread Studio(睿赛德 RTOS 开发环境)
.rttstudio/
rtconfig.h         # 自动生成的配置头文件

# EIDE(VSCode 插件)
.eide/
.eide.usr.ctx.json

# 新唐科技 Nuvoton(M0/M4系列)
*.nuproj.user
NuvotonIDE/

# 灵动微电子 MindMotion(MM32系列)
*.mmproj.user
MindMotion_IDE/

# 航顺芯片(HK32系列)
*.hkproj.user

# 先楫半导体 HPMicro(RISC-V)
*.hpm_sdk/
hpm_build/

# 博流智能 Bouffalo Lab(RISC-V)
*.blproj.user
bouffalo_sdk/build/

自定义区域

在模板文件顶部,预留了自定义忽略区域,方便添加项目特定规则:

# /*********************************************
# * 自定义忽略文件区域(User Custom Ignore Area)
# * 在此处添加项目特定的忽略规则
# *********************************************/

# 示例:私密配置文件
secrets.h
api_keys.h

# 示例:大型测试数据
test_data/
*.pcap

# 示例:本地配置
*.local
.env.local

使用建议

团队协作规范

  1. 统一工具链版本

    • 在 README 中明确使用的 IDE 和编译器版本
    • 例如:Keil MDK 5.39、IAR 9.30、STM32CubeMX 6.10
  2. 共享必要配置

    • 如果硬件配置统一,可以提交 .jlink 调试脚本
    • 使用 !*.jlink 强制包含特定文件
  3. CI/CD 自动构建

    • 固件文件(.hex/.bin)由 CI/CD 自动生成
    • 不要手动提交编译产物

Pack 安装管理

对于通过 Pack Installer 安装的库:

  • ❌ 不要提交 .pack 文件
  • ✅ 在 README 中记录需要安装的 Pack 名称和版本

示例说明:

## 依赖的 Pack 包

本项目需要以下 Pack 包:

- **STM32F4xx_DFP** v2.17.0
- **CMSIS** v5.9.0
- **ARM::CMSIS-RTOS2** v2.1.3

安装方法:Keil → Pack Installer → 搜索并安装

常见问题

Q1: 已经误提交了编译产物怎么办?

# 从 Git 历史中删除文件
git filter-branch --force --index-filter \
  'git rm --cached --ignore-unmatch path/to/file' \
  --prune-empty --tag-name-filter cat -- --all

# 强制推送(谨慎操作)
git push origin --force --all

Q2: 如何检查某个文件是否被忽略?

git check-ignore -v path/to/file

Q3: 如何查看所有被忽略的文件?

git status --ignored

Q4: 全局 gitignore 怎么设置?

# 设置全局 gitignore
git config --global core.excludesfile ~/.gitignore_global

# 编辑内容(操作系统和编辑器文件)
echo ".DS_Store" >> ~/.gitignore_global
echo "Thumbs.db" >> ~/.gitignore_global
echo ".vscode/" >> ~/.gitignore_global

更新日志

2025-11-24

  • ✨ 新增 TI Code Composer Studio (CCS) 支持(MSP430/MSP432/TM4C/CC系列)
  • ✨ 新增 Microchip MPLAB X / Microchip Studio 支持(PIC/AVR/SAM系列)
  • ✨ 新增 Infineon DAVE / ModusToolbox 支持(XMC/PSoC/AURIX系列)
  • ✨ 新增 Nordic nRF Connect SDK 支持(nRF52/53/91系列)
  • ✨ 新增 Espressif ESP-IDF 支持(ESP32/ESP8266系列)
  • ✨ 新增 Silicon Labs Simplicity Studio 支持(EFM32/EFR32系列)
  • ✨ 新增国产MCU支持:新唐科技、灵动微电子、航顺芯片、先楫半导体、博流智能
  • 📝 更新 README.md 和 blog.md 文档

2025-01-24

  • ✨ 新增华大半导体(HDSC)HC32 系列支持
  • ✨ 新增 STM32CubeMX/CubeIDE/TouchGFX 支持
  • ✨ 新增国产工具链(MounRiver/RT-Thread Studio/EIDE)
  • ✨ 新增 14+ 主流 AI 编程助手工具忽略规则
  • ✨ 添加顶部自定义忽略区域
  • ✨ 提供中文详细注释版(gitignore.cn)
  • ✨ 提供英文详细注释版(gitignore.en)
  • 📝 重写 README.md 项目说明文档

结语

一个好的 .gitignore 文件是嵌入式项目版本控制的基础。

记住核心原则

  • ✅ 提交:源代码、工程配置、链接脚本
  • ❌ 忽略:编译产物、个人配置、自动生成文件

希望这套模板能够帮助你的嵌入式开发工作更加顺畅!


📦 项目地址:GitHub/Gitee

如有问题或建议,欢迎提交 Issue 和 PR!

Logo

智能硬件社区聚焦AI智能硬件技术生态,汇聚嵌入式AI、物联网硬件开发者,打造交流分享平台,同步全国赛事资讯、开展 OPC 核心人才招募,助力技术落地与开发者成长。

更多推荐