receiving-code-review
OBobra/superpowers298k2,631 new stars in the last 7 days
当需要通过 Keil MDK 内置调试器烧录固件到目标板时使用,利用工程中已配置的调试器和 Flash 算法执行下载。
Project Profile 中标明 build_system: keil 或工作区中存在 .uvprojx / .uvproj 文件。.uvprojx / .uvproj 工程文件路径(或从 Project Profile 获取)。.em_skill.json 中上次成功的 profile 作为默认参数(显式参数优先,无需先手动传 --resume);--resume 仅用于断言缓存必须存在,无缓存则非零退出。无缓存或用户明确要求重新探测时,脚本自动回退到正常扫描。build-keil 的 UV4.exe 探测逻辑(配置文件 → 环境变量 → 常见路径 → PATH)。<DriverSelection> 识别调试器类型(ST-Link、J-Link、CMSIS-DAP、ULINK)。python scripts/keil_flasher.py --detect --flash --project <工程文件> --target <目标名>
Project Profile,推荐下一步 skill。environment-missing:Keil MDK 未安装或 UV4.exe 不可用。connection-failure:调试器连接失败(USB 未连接、驱动问题、目标板未上电)。project-config-error:工程文件中的 Flash 配置无效或目标名不存在。脚本执行完成后,必须将以下关键信息提取并呈现给用户:
示例输出格式:
烧录成功 ✅
工程: Demo02.uvprojx → 目标: Demo02
芯片: STM32F103RC | 调试器: ST-Link
固件: Demo02.axf (519.6 KB)
状态: Erase Done → Programming Done → Verify OK → Application running
serial-monitor(查看串口输出)或 debug-gdb-openocd(在线调试)。build-keil 接收编译成功的工程信息。serial-monitor(查看串口输出)或 debug-gdb-openocd(在线调试)。OBobra/superpowers298k2,631 new stars in the last 7 days
OBobra/superpowers298k2,631 new stars in the last 7 days
OBobra/superpowers298k2,631 new stars in the last 7 days
MAmattpocock/skills288k10,178 new stars in the last 7 days
MAmattpocock/skills288k10,178 new stars in the last 7 days
MAmattpocock/skills288k10,178 new stars in the last 7 days