arXiv cs.AI· Minghui Zhao, Yiming Li, Sophie Zhu, Maxwell Khor, Lauren Ouyang, Hai "Helen" Li, Yiran Chen, Tingjun Chen·· 4 小时前AI 评分52
EmbedGym:让编码智能体无需物理硬件即可开发和调试嵌入式固件
EmbedGym: Letting Coding Agents Develop and Debug Embedded Firmware Without Physical Hardware
AI 导读
EmbedGym 是一个交互式虚拟硬件环境,让编码智能体无需物理硬件即可开发和调试嵌入式固件。它用指令级 MCU 模拟器执行与真实板卡相同的二进制,接入 41 个外设模型、模拟电路仿真器和虚拟 WiFi/BLE 端点,并配套 598 个任务、覆盖 6 组 MCU-框架组合的 EmbedGym-Bench。
正文 · 原文
Abstract: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.
| Subjects: | Software Engineering (cs.SE); Artificial Intelligence (cs.AI) |
| Cite as: | arXiv:2611.21845 [cs.SE] |
| (or arXiv:2611.21845v1 [cs.SE] for this version) | |
| https://doi.org/10.48550/arXiv.2611.21845 arXiv-issued DOI via DataCite (pending registration) |
Submission history
From: Minghui Zhao [view email]
[v1]
Mon, 16 Nov 2026 20:02:12 UTC (3,444 KB)
来源:arXiv cs.AI · arxiv.org