stm32F10xExp/README.md
2025-04-06 22:18:13 +08:00

43 lines
1.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# STM32F10xExp
STM32F10xExp 是一个基于 STM32F10x 系列微控制器的开发项目,使用 KeilV 进行构建,并支持 `clangd` 代码补全和语法检查。用于联合vscode和keil开发stm32应用
## 使用 CMake 开启 clangd 支持
为项目启用 `clangd` 支持, `CMakeLists.txt` 文件中包含以下设置:
```cmake
# CMakeLists.txt
set(CMAKE_EXPORT_COMPILE_COMMANDS ON) # 生成 compile_commands.json
```
此设置将生成 `compile_commands.json` 文件,`clangd` 会使用该文件为您提供智能代码补全和语法检查功能。
### 快速开始
1. 克隆此仓库:
```bash
git clone https://git.zziyu.cn/Zengtudor/stm32F10xExp.git
```
2. 进入项目目录:
```bash
cd stm32F10xExp
```
3. 使用 CMake 生成clangd支持文件
```bash
mkdir build
cd build
cmake ..
```
## 贡献
欢迎任何形式的贡献!可以通过 Fork 该项目并提交合并请求来参与。
## 许可证
该项目采用 MIT 许可证,详细信息见 [LICENSE](LICENSE) 文件。