LabWired allows engineers to test compiled firmware on simulated MCU boards (CPU and peripherals)
AI Analysis Abstract LabWired is an MIT-licensed MCU firmware simulation core designed to accelerate firmware testing. It executes compiled firmware against simulated CPUs and peripherals, capturing output and register states, and supports repeatable checks in Continuous…
AI Analysis
Abstract
LabWired is an MIT-licensed MCU firmware simulation core designed to accelerate firmware testing. It executes compiled firmware against simulated CPUs and peripherals, capturing output and register states, and supports repeatable checks in Continuous Integration (CI) environments. The simulator models entire boards, including sensors and bus devices, rather than just the MCU chip, providing a comprehensive testing platform.
Key Highlights
- MIT-licensed MCU firmware simulation core for accelerated testing.
- Supports RISC-V, Arm Cortex-M (M0+, M3, M4, M7, M33), and Xtensa LX6/LX7 architectures.
- Models full MCU boards, including peripherals like sensors, displays, and bus devices.
- Captures UART and bus output, and register state for detailed analysis.
- Enables repeatable firmware testing within Continuous Integration (CI) pipelines.
- Significantly speeds up firmware testing compared to traditional methods on physical hardware.
Technical Details
- LabWired is an MIT-licensed MCU firmware simulation core developed by Andrii Shylenko.
- It runs compiled firmware against modeled CPUs and peripherals, capturing UART and bus output, and register state.
- Supported CPU architectures include RISC-V, Arm Cortex-M0+, Cortex-M3, Cortex-M4, Cortex-M7, Cortex-M33, and Xtensa LX6 and LX7 (e.g., some ESP32 parts).
- The simulator models the full board, not just the chip, including sensors, displays, and bus devices, allowing for checks on I2C traffic, SPI framing, and display output.
- A 'Fidelity Ledger' is provided to explain where the model's behavior deviates from real hardware.
- The core is primarily a CLI application, demonstrated by running PlatformIO Unity test firmware for a virtual nRF52840.
- A 'Browser Playground' offers an interactive web application for simulating boards like the NUCLEO-L476RG with connected peripherals.
- The Rust source code for the LabWired Core, including CPU, bus, memory, peripheral, and external device execution, is available on GitHub.
- The project includes over 200 board configurations in its example directory and a validation matrix for supported boards and peripherals.
Implications
- Accelerates firmware testing by removing the need for physical hardware, manual flashing, and on-board debugging.
- Reduces development cycles and effort, particularly for projects requiring support for multiple microcontroller boards.
- Enables comprehensive and automated testing of peripheral interactions and bus communications in a controlled environment.
- Facilitates seamless integration into CI/CD pipelines for continuous and repeatable firmware validation.
- Provides enhanced visibility into firmware execution through captured output and register states, aiding in debugging and verification.
Limitations
- The simulator's models may 'short-circuit real hardware' in certain areas, as detailed in the 'Fidelity Ledger', indicating that not all real-world hardware behaviors are perfectly replicated.
- While the core simulator and its validation assets are open-source, the application UI, hosted Playground behavior, and other product surfaces are not open-source.
- The source does not specify the exact RISC-V instruction set architectures (ISAs) or extensions that are supported, only mentioning 'RISC-V architecture'.
- Commercial plans with 'LabWired AI Tokens' are available, suggesting that certain advanced features or infrastructure usage may incur costs beyond the open-source core.