Files
serverinfotest/firmware/README.md
DESKTOP-PUHFO60\dsx2016 116615818b Document mandatory local git after flash/export.
Align README with CYD project guide: upload, export firmware, then local commit.
2026-10-27 20:17:48 +08:00

56 lines
1.5 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.
# 预编译固件(可随时刷写)
| 目录 | 板子 |
|------|------|
| [`cyd/`](cyd/) | **2.8"** CYD ESP32-2432S028R(ILI9341) |
| [`cyd_35r/`](cyd_35r/) | **3.5"** CYD ESP32-3248S035C(ST7796 + GT911) |
功能:**本机/服务器信息面板**(USB 串口收 `SI|...`,屏上显示 CPU/GPU/RAM/DISK)
版本信息见各目录下 `VERSION.txt`。
也可在 [`../../cydweb`](../../cydweb)(CYD Flasher)里通过浏览器串口刷写本目录固件。
## 直接刷写(无需重新编译)
1. USB 连接板子
2. 执行:
```powershell
cd firmware\cyd # 3.5": firmware\cyd_35r
.\flash.ps1
# 或指定端口
.\flash.ps1 -Port COM3
```
也可运行 `flash.bat`。
依赖其一即可:
- 已安装 PlatformIO(`pio`,自带 esptool)
- 或 `pip install esptool`
## 手动 esptool
```bash
esptool.py --chip esp32 --port COM3 --baud 921600 write_flash -z ^
--flash_mode dio --flash_freq 40m --flash_size 4MB ^
0x1000 bootloader.bin ^
0x8000 partitions.bin ^
0xe000 boot_app0.bin ^
0x10000 firmware.bin
```
## 从源码重新打包进本目录
在仓库根目录:
```powershell
.\firmware\export_from_build.ps1 # 2.8 -> firmware/cyd
.\firmware\export_from_build.ps1 -Env cyd_35r # 3.5 -> firmware/cyd_35r
.\firmware\export_from_build.ps1 -SkipBuild
```
刷完后在 PC 上运行 `..\..\host\send_sysinfo.ps1` 推送本机信息。
导出固件后记得在仓库根目录 **本地 `git commit`**(见根 `README.md`「本地 git」;不 push,除非明确要求)。