arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2611.21845cs.SEcs.AI
收藏

EmbedGym:让编码智能体无需物理硬件即可开发和调试嵌入式固件

EmbedGym: Letting Coding Agents Develop and Debug Embedded Firmware Without Physical Hardware

Duke University(杜克大学);Tesla STEM High School(特斯拉STEM高中)

Minghui Zhao, Yiming Li, Sophie Zhu, Maxwell Khor, Lauren Ouyang, Hai "Helen" Li, Yiran Chen, Tingjun Chen

AI总结:

本文提出EmbedGym虚拟硬件环境,让编码智能体无需物理硬件开发调试嵌入式固件,构建含598个任务的EmbedGym-Bench,实验显示其可提升固件通过率,轻量级模型用它可媲美前沿模型且成本低30-70倍。

摘要:

现代编码智能体在通用软件基准测试中表现良好,因为它们可以在闭环中运行代码和单元测试。然而,嵌入式固件开发打破了这一闭环:一个能编译的程序仍可能在真实硬件上失败,原因包括引脚极性、总线协议、时序或网络漏洞,这些是文本终端的智能体无法观察到的。现有的嵌入式编码智能体要么跳过硬件执行,要么使用延迟达数秒的仅GPIO模拟器,要么在静态环境中测试物理开发板。本文提出EmbedGym,这是一种交互式虚拟硬件环境,可让编码智能体无需物理硬件即可开发和调试嵌入式固件。EmbedGym使用指令级微控制器单元(MCU)模拟器来执行将烧录到物理开发板上的相同二进制文件,将其连接到41个外设模型、一个模拟电路模拟器以及虚拟WiFi/蓝牙低功耗(BLE)端点,并为智能体提供更改传感器输入、按下按钮和检查硬件状态的接口。在此基础上,我们构建了EmbedGym-Bench,它包含598个跨6个MCU框架对的任务,由隐藏的定时测试向量进行评分,使用五阶段多智能体工作流从数据手册和驱动程序库中合成外设模型和任务。我们在三个层面向编码智能体开放EmbedGym,并在超过14000条轨迹上评估了8个模型。即使编译成功率达到99.7%,仍有19.9%的已编译固件在运行时失败(个别目标最高达73%)。相比之下,在EmbedGym中进行交互式硬件测试使各模型的通过率提高了4.9%至14.7%(个别目标最高提高31%)。我们的结果还表明,使用EmbedGym的智能体优于现有的嵌入式智能体框架,而使用EmbedGym的轻量级模型以低30至70倍的成本达到了不使用EmbedGym的前沿模型的性能。

英文摘要:

Modern coding agents perform well on general software benchmarks because they can run code and unit tests in a closed loop. Embedded firmware development, however, breaks this loop: a program that compiles can still fail on real hardware due to pin polarity, bus protocol, timing, or networking bugs that an agent at a text terminal cannot observe. Existing embedded coding agents either skip hardware execution, drive GPIO-only simulators with multi-second delays, or test on physical boards in a static environment. In this paper, we present EmbedGym, an interactive virtual hardware environment that lets coding agents develop and debug embedded firmware without physical hardware. EmbedGym uses instruction-level microcontroller unit (MCU) emulators to execute the same binary that would be flashed onto a physical board, connects them to 41 peripheral models, an analog circuit simulator, and virtual WiFi/Bluetooth Low Energy (BLE) endpoints, and exposes an interface for agents to change sensor inputs, press buttons, and inspect hardware states. On top of it, we build EmbedGym-Bench, which consists of 598 tasks across 6 MCU-framework pairs graded by hidden timed test vectors, using a five-stage multi-agent workflow that synthesizes peripheral models and tasks from datasheets and driver libraries. We expose EmbedGym to a coding agent at three levels and evaluate eight models over more than 14K trajectories. Even when compilation succeeds 99.7% of the time, 19.9% of compiled firmwares fail at runtime (up to 73% on individual targets). In contrast, interactive hardware testing in EmbedGym increases pass rates across models by +4.9% to +14.7% (up to +31% on individual targets). Our results also show that an agent with EmbedGym outperforms prior embedded agent frameworks, and lightweight models with EmbedGym match frontier models without it at 30-70x lower cost.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑