# flashbridge **Repository Path**: liudegui/flashbridge ## Basic Information - **Project Name**: flashbridge - **Description**: claude/codex烧写工具 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-08-28 - **Last Updated**: 2026-09-20 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # FlashBridge FlashBridge 是 RS500 无人值守烧写与串口调试系统。服务器侧 Codex/Claude 生成任务, PC 守护进程通过 SSH + SFTP 拉取固件、校验 MD5、执行白名单脚本,再回传结果与串口日志。 ## 1. 流程 ```text Codex/Claude → flash-firmware Skill → SSH/SFTP 任务目录 → PC flash_agent → MD5 校验 → USB/串口 → RS500 ← result.toml + 启动日志/MSH 回显 ``` | 任务 | 上位机 | |---|---| | 全片 / app 固件 | `flash_firmware.py` | | wholedata | `flash_wholedata.py` | | MSH 命令 | `msh_exec.py` | ## 2. 安装 前置:PC 使用 Windows、Python 3.11+、Git for Windows;服务器使用 Linux、Python 3.10+。 PC: ```powershell git clone http://172.16.40.222/dgliu/flashbridge.git cd flashbridge py -3 -m pip install -r requirements.txt wscript.exe "start-flashbridge.vbs" ``` 服务器同时安装 Codex/Claude Skill: ```bash git clone http://172.16.40.222/dgliu/flashbridge.git /tmp/flashbridge python3 -m pip install --user tomli tomli-w cd /tmp/flashbridge/skill/flash-firmware python3 install.py --target both --force ``` wholedata 固件必须这样编译;缺少前缀时不会生成 Vendor Bulk 后端: ```bash cd /home/dgliu/RS500/project_config/bsp/raysentek/rs500_fpga_board/ DM_BULK_BURN=1 scons -j12 hdr_version=1 asic=1 ``` ## 3. 使用 在服务器 Codex/Claude 中直接描述任务: ```text 烧写 rt-thread_hdr_all.bin 烧写 wholedata.bin 执行 MSH 命令 version 执行 MSH 命令 "whd_diag deep nand" ``` PC 常用命令: ```powershell python -m supervisor --status python -m supervisor --stop python -m supervisor --kill ``` 私有配置放 `runtime/config.local.toml`;通常可依赖 `~/.ssh/config` 和串口自动发现。 ## 4. 排障 | 现象 | 处理 | |---|---| | `SFTP identity incomplete` | 补 `~/.ssh/config` 的 `User` / `IdentityFile` | | wholedata 找不到 Vendor 端点 | 确认固件使用 `DM_BULK_BURN=1 scons ...` 编译 | | `FLASH_FAILED` | 查看 result `detail` 和 PC 的逐次烧写日志 | | `MSH_INCOMPLETE` | 设备未进 msh、命令未结束或超时;长命令增加 `--timeout` | | 串口未发现 | 检查 CH342/FTDI 驱动、USB 连接和端口占用 | 详细说明见 `docs/usage.md`,PC/服务器部署见 `docs/ai_install_guide_*.md`。 ## 5. 发布 | 入口 | 地址 | |---|---| | GitLab | http://172.16.40.222/dgliu/flashbridge | | Gitee | https://gitee.com/liudegui/flashbridge | | 0.5.9 源码包 | http://172.16.40.222/dgliu/flashbridge/repository/archive.zip?ref=0.5.9 | | AI 市场 | http://172.16.48.253:9010/刘德贵/flashbridge |