
- Installs
- 553
- 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 build-iar- 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 build-iar 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.
构建 IAR Embedded Workbench 工程
适用场景
Project Profile中标明build_system: iar或工作区中存在.ewp/.eww文件。- 用户希望对 IAR EWARM 工程执行编译、重编译或确认固件产物。
- 烧录或调试流程需要新的
.out(ELF)、HEX或BIN。 - 需要在编译前确认 IAR 环境是否就绪(iarbuild.exe、工具链)。
必要输入
- 工作区路径或
.ewp工程文件路径,或一份已有的Project Profile。 - 可选的配置名称(configuration)和 IAR 安装路径。
自动探测
- 脚本启动即自动复用工程根目录
.em_skill.json中上次成功的 profile 作为默认参数(显式参数优先,无需先手动传--resume);--resume仅用于断言缓存必须存在,无缓存则非零退出。无缓存或用户明确要求重新探测时,脚本自动回退到正常扫描。 - 脚本自动搜索常见 IAR 安装路径和环境变量(
IAR_ROOT、EWARM_ROOT)定位 iarbuild.exe。 - 解析
.ewp工程文件中的 configuration 列表,提取工具链(ARM/RISCV)、芯片型号、输出目录和输出文件名。 - 若未指定配置,默认使用工程中的第一个 configuration。
- 在输出目录中搜索 .out(ELF)、HEX、BIN 产物,按
ELF > HEX > BIN排序。 - 若存在多个同样合理的工程文件或配置,列出候选而不是静默猜测。
执行步骤
- 先阅读 references/usage.md,确认本次是环境探测、工程扫描、列出配置,还是执行编译。
- 若不确定环境是否就绪,先运行自带脚本 scripts/iar_builder.py 的
--detect模式确认。 - 若不确定工程文件位置,使用
--scan搜索工作区。 - 使用
--list-configs --project X.ewp确认可用配置,再用--project+--config执行编译。 - 读取脚本输出的构建结果和产物扫描报告,重点关注首选产物(.out/ELF > HEX > BIN)、错误/警告统计和失败分类。
- 将构建配置、产物路径、芯片型号和工具链信息写回
Project Profile,并在需要时交给下游 skill。
失败分流
- 当 IAR 未安装或 iarbuild.exe 不可用时,返回
environment-missing。 - 当工程文件损坏、配置名无效或编译因配置问题失败时,返回
project-config-error。 - 当编译看似成功但未找到可烧录或可调试产物时,返回
artifact-missing。 - 当存在多个同样合理的工程文件或配置,且任意选择都不安全时,返回
ambiguous-context。
平台说明
- IAR Embedded Workbench 仅在 Windows 上原生运行,iarbuild.exe 命令行编译需要 Windows 环境。
- 自带脚本在非 Windows 平台上仍可执行工程解析(
--list-configs)、工程扫描(--scan)和产物扫描(--scan-artifacts),但实际编译会被阻塞。 - 输出中的产物路径应保持为绝对路径,方便下游烧录和调试 skill 直接复用。
输出约定
- 输出编译命令、工程文件、配置名、芯片型号、工具链和首选产物路径。
- 输出错误和警告统计,以及关键编译日志证据。
- 用
artifact_path、artifact_kind、target_mcu和toolchain更新Project Profile。 - 成功后推荐
flash-openocd或debug-gdb-openocd。
交接关系
- 当下一步意图是给硬件烧录程序时,将成功构建结果交给
flash-openocd。 - 当下一步需要符号信息或调试会话时,将成功构建结果交给
debug-gdb-openocd。
FAQ
What does the build-iar skill do?
当需要通过 IAR Embedded Workbench 命令行编译嵌入式工程,调用自带脚本解析工程文件、执行构建并定位固件产物时使用。
How do I install build-iar?
Run npx skills add https://github.com/leokemp223/embed-ai-tool --skill build-iar 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/build-iar/ (personal) or .claude/skills/build-iar/ (project).
Which AI agents can use build-iar?
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 build-iar 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 build-iar?
It is published by leokemp223 in leokemp223/embed-ai-tool. It has 553 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.