flash-keil

Installation
SKILL.md

Keil MDK 烧录

适用场景

  • Project Profile 中标明 build_system: keil 或工作区中存在 .uvprojx / .uvproj 文件。
  • 用户希望将编译产物烧录到目标板,且工程已在 Keil 中配置好调试器(ST-Link、J-Link、CMSIS-DAP 等)。
  • 不需要额外安装 OpenOCD,直接使用 Keil MDK 内置的 Flash Download 功能。

必要输入

  • .uvprojx / .uvproj 工程文件路径(或从 Project Profile 获取)。
  • 可选的构建目标名称和 UV4.exe 路径。

自动探测

  • 脚本启动即自动复用工程根目录 .em_skill.json 中上次成功的 profile 作为默认参数(显式参数优先,无需先手动传 --resume);--resume 仅用于断言缓存必须存在,无缓存则非零退出。无缓存或用户明确要求重新探测时,脚本自动回退到正常扫描。
  • 复用 build-keil 的 UV4.exe 探测逻辑(配置文件 → 环境变量 → 常见路径 → PATH)。
  • 解析工程 XML 中的 <DriverSelection> 识别调试器类型(ST-Link、J-Link、CMSIS-DAP、ULINK)。
  • 若未指定目标,默认使用工程中的第一个 Target。
Installs
439
GitHub Stars
756
First Seen
Apr 19, 2026
flash-keil — leokemp223/embed-ai-tool