Simulator
EoSim — Virtual Platform Simulator
158 Platforms · GPIO Visualizer · HIL Bridge · GDB Support
A full-system virtual platform simulator for EoS firmware. Run unmodified EoS binaries on 158 simulated platforms — with a graphical GPIO pin visualizer, UART terminal, hardware-in-the-loop (HIL) bridge, and GDB debugging support.
For a shorter introduction to EoSim, see the EoSim overview. This page is the engineering detail.
- Python
- MIT licensed
- High — Core Service
- 158Simulated Platforms
- 100%Binary Compatible
- < 5 msBoot-to-Prompt
- HILHardware-in-the-Loop
How It Works
- 1
List Available Platforms
EoSim ships with 158 pre-configured virtual platforms covering all major EoS reference boards. Use eosim list to browse them by architecture, MCU family, or peripheral set.
# List all platforms eosim list # Filter by architecture eosim list --filter cortex-m4 # Search by board name eosim search stm32f4
- 2
Run Your Firmware
Point EoSim at your compiled .elf or .eos binary. It loads the firmware, maps peripherals to the simulated board, and starts executing — no hardware required.
# Run firmware on STM32F4 Discovery eosim run build/firmware.elf --platform stm32f4-discovery # Run with graphical GPIO visualizer eosim run build/firmware.elf --platform stm32f4-discovery --gui # Run with UART output to terminal eosim run build/firmware.elf --platform stm32f4-discovery --uart0
- 3
Debug with GDB
EoSim exposes a GDB stub on port 3333. Connect any GDB client to set breakpoints, inspect registers, and step through your firmware — exactly as you would on real hardware.
# Start EoSim with GDB server eosim run firmware.elf --platform stm32f4 --gdb # GDB server listening on :3333 # In another terminal: arm-none-eabi-gdb firmware.elf (gdb) target remote :3333 (gdb) break sensor_task (gdb) continue (gdb) print temp_reading
- 4
Use the GPIO Visualizer
The --gui flag opens a graphical pin state visualizer showing all GPIO pins, their current state (high/low/PWM), and a logic analyzer trace. Perfect for debugging SPI, I²C, and UART protocols.
# Open GUI with logic analyzer eosim run firmware.elf --platform stm32f4 --gui --trace spi1,uart2 # Export trace to VCD for GTKWave eosim run firmware.elf --platform stm32f4 --trace-out trace.vcd
- 5
Hardware-in-the-Loop (HIL) Bridge
The HIL bridge connects EoSim's virtual peripherals to real hardware. Simulate the firmware logic while driving real sensors, actuators, or communication buses — the best of both worlds.
# HIL bridge: virtual firmware + real I2C sensor eosim run firmware.elf --platform stm32f4 \ --hil i2c1:/dev/i2c-1 \ --hil uart2:/dev/ttyUSB0 - 6
Drive Simulations from AI Agents (MCP)
EoSim exposes a Model Context Protocol server so AI coding agents can drive simulations directly — list platforms, flash firmware, launch sims, and read console output to verify against ground truth instead of hallucinating. JSON-RPC 2.0 over stdio, no extra dependencies.
# Start the MCP server (from an MCP client config) python -m eosim.mcp # Tools: list_platforms · sim_flash · sim_launch · console_tail # # list_platforms({arch: "arm"}) → discover targets # sim_flash({platform, firmware}) → stage image (dry-run by default) # sim_launch({platform, firmware, dry_run: false}) → boot, get session_id # console_tail({session_id, lines: 50}) → read boot output and faults
Usage Examples
# Run all tests in EoSim (headless) eosim test tests/ --platform stm32f4-discovery --timeout 120 # Output: # Running 500 test cases on stm32f4-discovery... # [PASS] test_uart_loopback (12 ms) # [PASS] test_spi_sensor_read (8 ms) # [PASS] test_eai_kws_inference (45 ms) # [PASS] test_edb_insert_query (23 ms) # ... # 500/500 passed in 98 s
Features
158 Virtual Platforms
Pre-configured simulations of STM32, NXP i.MX, Raspberry Pi, ESP32, RISC-V SiFive, NVIDIA Jetson, and more.
Binary Compatible
Run unmodified .elf or .eos binaries — no recompilation or simulation-specific code.
GPIO Visualizer
Graphical pin state display with logic analyzer trace for SPI, I²C, UART, and PWM.
GDB Stub
Built-in GDB server on port 3333. Set breakpoints, inspect memory, and step through code.
HIL Bridge
Connect virtual peripherals to real hardware via /dev/i2c-*, /dev/ttyUSB*, etc.
Headless Mode
Run without GUI for CI pipelines. JSON test result output for automation.
MCP Server for AI Agents
Model Context Protocol server (python -m eosim.mcp): list_platforms, sim_flash, sim_launch, console_tail — agents drive sims and verify against ground truth.
Multi-Board Simulation
Simulate multiple boards communicating via virtual UART, SPI, or TCP/EIPC.
Trace Export
Export GPIO traces to VCD format for GTKWave analysis.
Role in the EoS Ecosystem
EoSim dramatically accelerates EoS development by eliminating the hardware dependency during the development and testing cycle. Developers can write, test, and debug firmware on their laptop before a single physical board is available. CI pipelines can run hundreds of firmware test cases in minutes. The HIL bridge means that when real hardware is needed, EoSim can still handle the firmware logic while real sensors and actuators are connected. EoSim is what makes EoS development scalable — a team of 10 developers doesn't need 10 physical boards of every type.
Depends On
- EoS Kernel — simulates the full EoS kernel including scheduler, HAL, and IPC
- eBuild — compiles the firmware binary that EoSim loads and executes
- EoStudio — the IDE's Simulate button launches EoSim
Enables / Powers
- All EoS developers — test firmware without hardware
- CI/CD pipelines — automated firmware testing at scale
- Hardware-in-the-loop testing — virtual firmware + real peripherals
- Education — students learn EoS without needing physical boards
Open source on GitHub
MIT licensed and developed in the open. Issues, discussions, and pull requests welcome.
- Python
- MIT
Every EmbeddedOS repository, with install commands, is listed on the downloads page.
In the EoS stack
EoSim is highlighted in the layer below.
- App layer
- UI / browser layer
- Data layer
- AI runtime
- Neural interface
- IPC fabric
- EoS kernel + HAL
- eos-platform profile
- eBootloader
- Build / IDE / Sim
Pairs well with
Sibling components that EoSim commonly works alongside.
Technical Specifications
| Simulated Platforms | 158 (STM32, NXP i.MX, Raspberry Pi, ESP32, RISC-V, NVIDIA Jetson, …) |
| Simulation Engine | QEMU-based with EoS-specific peripheral models |
| GDB Protocol | GDB Remote Serial Protocol on configurable port (default: 3333) |
| Trace Format | VCD (Value Change Dump) for GTKWave; JSON for automation |
| HIL Transports | I²C (/dev/i2c-*), UART (/dev/ttyUSB*), SPI (/dev/spidev*) |
| Boot-to-Prompt | < 5 ms for Cortex-M targets |
| License | MIT |
