
- Installs
- 554
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/leokemp223/embed-ai-tool --skill flash-jlink- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads flash-jlink automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
J-Link 烧录
适用场景
- 工作区已有可用固件产物,且目标板连接了 SEGGER J-Link 探针。
- 需要使用 J-Link Commander 进行烧录和校验,而非 OpenOCD。
- 需要利用 J-Link RTT(Real-Time Transfer)进行高速日志捕获。
- 需要扫描工作区中的
.jlink配置文件或.vscode/launch.json中的 J-Link 设置。
必要输入
- 固件产物路径,或包含
artifact_path的Project Profile。 --device参数指定目标芯片型号(如STM32F407VG),J-Link Commander 要求必须指定。- 可选的接口类型(SWD 或 JTAG,默认 SWD)和烧录速度。
- 若产物为 BIN,还需要
--base-address烧录基地址。
自动探测
- 脚本启动即自动复用工程根目录
.em_skill.json中上次成功的 profile 作为默认参数(显式参数优先,无需先手动传--resume);--resume仅用于断言缓存必须存在,无缓存则非零退出。无缓存或用户明确要求重新探测时,脚本自动回退到正常扫描。 - 按
ELF > HEX > BIN选择固件产物。 - 脚本自动查找 JLinkExe,按配置文件、PATH、常见安装路径的顺序搜索。
--scan-configs扫描工作区.jlink文件和.vscode/launch.json中的 J-Link 配置。- 不会猜测设备名;当
--device缺失时阻塞并返回ambiguous-context。
执行步骤
- 先阅读 references/usage.md,确认本次是环境探测、配置扫描,还是执行烧录。
- 若不确定 J-Link 环境状态,先运行自带脚本 scripts/jlink_flasher.py 的
--detect模式确认。 - 若不确定设备型号或接口配置,使用
--scan-configs扫描工作区线索。 - 使用
--artifact+--device执行烧录,可选--interface和--speed。 - 对 BIN 文件,必须同时提供
--base-address。 - 需要 RTT 日志时,使用
--rtt启动 RTT 捕获。 - 读取脚本输出的烧录结果报告,重点关注校验状态和失败分类。
失败分流
- 当
JLinkExe不可用时,返回environment-missing。 - 当无法安全解析到产物,或
BIN缺少烧录基地址时,返回artifact-missing。 - 当 J-Link 无法发现探针或目标时,返回
connection-failure。 - 当配置文件无效或设备名不被 J-Link 识别时,返回
project-config-error。 - 当烧录开始但校验或复位失败时,返回
target-response-abnormal。 - 当
--device缺失且无法从工作区推断时,返回ambiguous-context。
平台说明
- JLinkExe 在 Linux/macOS 下为
JLinkExe,Windows 下为JLink.exe。 - SEGGER 默认安装路径:Linux
/opt/SEGGER/JLink/,WindowsC:\Program Files\SEGGER\JLink\。 - 自带脚本使用 Python 标准库和 subprocess 调用 JLinkExe,跨平台兼容。
- RTT 功能为 J-Link 独有,不占用 UART,适合无串口场景。
输出约定
- 输出 JLinkExe 命令、设备名、接口类型、产物路径和校验结果。
- 在
Project Profile中保留或更新artifact_path、artifact_kind、jlink_device、jlink_interface。 - 烧录成功后推荐
serial-monitor或debug-jlink。
交接关系
- 当下一步要看运行日志时,将成功烧录结果交给
serial-monitor。 - 当用户需要 GDB 调试时,将结果交给
debug-jlink。 - 当需要 RTT 日志替代串口时,可直接使用本 skill 的
--rtt模式。
FAQ
What does the flash-jlink skill do?
当需要使用 SEGGER J-Link 探针烧录固件,或启动 RTT 日志捕获时使用。
How do I install flash-jlink?
Run npx skills add https://github.com/leokemp223/embed-ai-tool --skill flash-jlink in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/flash-jlink/ (personal) or .claude/skills/flash-jlink/ (project).
Which AI agents can use flash-jlink?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is flash-jlink safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains flash-jlink?
It is published by leokemp223 in leokemp223/embed-ai-tool. It has 554 recorded installs.
More from leokemp223/embed-ai-tool
build-keil
leokemp223/embed-ai-tool
当需要通过 Keil MDK 命令行编译嵌入式工程,调用自带脚本解析工程文件、执行构建并定位固件产物时使用。
build-platformio
leokemp223/embed-ai-tool
当需要通过 PlatformIO 命令行编译嵌入式工程,调用自带脚本解析环境配置、执行构建并定位固件产物时使用。
workflow
leokemp223/embed-ai-tool
当需要串联多个 skill 完成编译+烧录+监控或编译+烧录+调试等流水线任务时使用。
flash-keil
leokemp223/embed-ai-tool
当需要通过 Keil MDK 内置调试器烧录固件到目标板时使用,利用工程中已配置的调试器和 Flash 算法执行下载。
Popular other skills
hyperframes-cli
heygen-com/hyperframes
The HyperFrames CLI by job - scaffold, check, look at frames, edit the timeline, preview, render locally or in the cloud, publish, project history - plus reading its JSON and recovering from build or render failures.
triage
mattpocock/skills
Move issues and external PRs through a state machine of triage roles, categorise, verify, grill if needed, and write agent-ready briefs.
ask-matt
mattpocock/skills
Ask which skill or flow fits your situation. A router over the skills in this repo.
to-questionnaire
mattpocock/skills
Turn a decision you can't fully answer into a questionnaire for someone else to fill in.
loop-me
mattpocock/skills
Grill me about specs for the workflows I want to build, within this workspace.