Files
mcu-codegen-template/docs/branch-index.md
T
2026-08-19 17:58:14 +08:00

65 lines
1.9 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.
# MCU 代码生成模板 — 分支索引
本仓库按 **「厂商-型号」** 组织分支,每个分支是一套完整的 MCU 工程模板(默认含 OTA + Bootloader)。
- 主仓库:[见宝 Git](https://git.jianbao-tech.com/pets-device/mcu-codegen-template)
- 码云镜像(推荐下载):[gitee.com/wu-chuyuan/mcu-codegen-template](https://gitee.com/wu-chuyuan/mcu-codegen-template)
---
## 分支列表
| 分支 | 厂商 | 型号 | Flash | 默认能力 | 状态 |
|------|------|------|-------|----------|------|
| [`Puya-PY32F040`](https://gitee.com/wu-chuyuan/mcu-codegen-template/tree/Puya-PY32F040) | 普冉 Puya | PY32F040 | 128KB | OTA 三模式 + Bootloader + jb_protocol | ✅ 可用 |
> 新模板上线后在此表追加一行即可。
---
## 如何获取某 MCU 模板
### 见宝工具箱 / 自动化脚本
```bash
git clone https://gitee.com/wu-chuyuan/mcu-codegen-template.git
cd mcu-codegen-template
git checkout Puya-PY32F040
```
### 仅下载指定分支(浅克隆)
```bash
git clone --branch Puya-PY32F040 --single-branch \
https://gitee.com/wu-chuyuan/mcu-codegen-template.git py32f040-template
```
---
## 分支命名规范
```
<厂商>-<型号>
```
示例:`Puya-PY32F040``ST-STM32F103C8`
- 默认包含 OTA,分支名**不加** `-ota` 后缀
- 同一芯片多种工程结构(如裸机 vs OTA)差异过大时,再考虑加后缀:`Puya-PY32F040-bare`
---
## 新增 MCU 模板(维护者)
1.`main` 拉新分支:`git checkout -b <厂商>-<型号> main`
2. 合入该 MCU 完整工程(App + Bootloader + Shared + Drivers + tools
3. 更新本文件分支表 + `main/README.md` 快速索引
4. `git push origin` 会同时推到见宝 Git 与码云镜像
---
## 各分支 README
每个 MCU 分支根目录有独立的 `README.md`(构建、打包、OTA 配置说明)。
设计细节见各分支 `Doc/` 目录。