work_script/CP02/flash_guide.md
Ching L 6ad3ab93a7 feat(cp02): add build GUI, flash guide, and comment removal tool
Add build_gui.html for visual command generation, flash_guide.md for
flashing reference, and remove_chinese_comments.py for cleaning source
files. Update extract_firmware.sh to use output directory instead of
prefix, and update README with all new tools.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 13:57:52 +08:00

39 lines
1.1 KiB
Markdown
Raw Permalink 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.

# IonBridge 烧录指南
所有命令在 IonBridge 项目根目录下执行(`cd /Users/ching/develop/IonBridge`)。
## 非 Secure 设备(开发板)
```bash
# Build + Flash firmware + littlefs
make build variant=cp02
make flash littlefs=1 PORT=/dev/tty.usbmodem2101
# 只烧 firmware
make build variant=cp02
make flash PORT=/dev/tty.usbmodem2101
# 查看日志
make monitor PORT=/dev/tty.usbmodem2101
```
## Secure 设备量产板Secure Boot + Flash Encryption
```bash
# Build + Flash firmware + littlefs
make build variant=cp02 production=1
make flash littlefs=1 sign_key=/Users/ching/Downloads/1331040606001272_sign_key.pem PORT=/dev/tty.usbmodem2101
# 只烧 littlefs不更新 firmware不需要重新 build
make flash_littlefs_partition secure=1 PORT=/dev/tty.usbmodem2101
# 查看日志
make monitor PORT=/dev/tty.usbmodem2101
```
## 备注
- `sign_key` 可用 `psn` 代替:`psn=1331040606001272`(自动查找 `sign_keys/` 下的 key
- Secure 设备用 `production=1` 构建后,`secure=1` 会自动检测
- `PORT` 根据实际设备端口修改