Renode
Renode is the first public tool to try when firmware behavior depends on a modeled MCU board, RTOS peripherals, UART, GPIO, timers, storage, or multi-core SoC state.
Use Renode when
- the artifact is MCU/RTOS firmware and a board or close SoC model exists
- UART/GPIO/timer/storage/network peripheral behavior matters
- QEMU lacks the exact board, or CPU-only emulation hangs on MMIO
- you need deterministic virtual time and GDB remote debugging
- you can write or adapt a
.repl platform description for the minimum needed peripherals
Do not treat CPU stepping as board parity. Prove the peripheral behavior relevant to the objective.
Core objects
.repl: platform description; CPUs, memory maps, buses, UARTs, GPIOs, timers, and peripherals.
.resc: Renode monitor script; creates machines, loads platforms, loads binaries, configures analyzers, starts emulation.
- Monitor: interactive command surface for machines, sysbus, peripherals, memory, UART analyzers, and GDB server.
- Robot Framework: useful for validation harnesses that assert UART/peripheral output; keep it as test infrastructure, not the only evidence.
Minimal monitor flow
mach create
machine LoadPlatformDescription @platforms/boards/<board>.repl
sysbus LoadELF @firmware.elf
showAnalyzer sysbus.uart0
machine StartGdbServer 3333
start
Useful commands:
peripherals
sysbus WhatPeripheralIsAt 0x40000000
sysbus ReadDoubleWord 0x40000000
sysbus WriteDoubleWord 0x40000000 0x1
sysbus.cpu Step
pause
quit
For raw binaries, set load address and reset vector deliberately; ELF is safer when available because it carries sections and entry point.
Custom platform guidance
When no board exists:
- Build the smallest
.repl from known CPU, RAM/flash, and MMIO ranges.
- Add UART first if console output is needed.
- Add timers/interrupt controller before assuming RTOS scheduler failure.
- Stub unknown peripherals only enough to pass non-target checks.
- Label the result as partial parity and list unmodeled peripherals.
Sources for modeling clues: vendor datasheet, SVD, linker script, map file, DTB, SDK headers, strings, disassembly xrefs to MMIO addresses, and logic/UART captures.
GDB
machine StartGdbServer 3333
Then connect with the matching toolchain:
arm-none-eabi-gdb firmware.elf
(gdb) target remote :3333
Use GDB to prove reset handler, RTOS task creation, peripheral driver paths, memory state, and breakpoints on fault handlers.
Evidence
- exact
.repl/.resc or monitor command sequence
- board/profile source and any custom modeled/stubbed devices
- UART transcript, GPIO/peripheral read/write, memory state, or GDB breakpoint
- whether proof is instruction execution, runtime boot, peripheral parity, or system parity
Failure pivots
- no UART: wrong UART instance, firmware uses semihosting/RTT, clocks not modeled, or boot never reaches init
- stuck in default handler: missing IRQ/timer/peripheral model
- fault after reset: wrong load address, vector table, stack pointer, Thumb bit, or memory map
- GDB oddities on multicore boards: start/select the correct CPU-specific GDB server
1---2name: renode3description: Auth/lab ref: Renode board and SoC simulation for MCU/RTOS firmware, UART/GPIO/peripheral modeling, GDB remote debugging, REPL platforms, and RESC scripts.4license: MIT5---67# Renode89Renode is the first public tool to try when firmware behavior depends on a modeled MCU board, RTOS peripherals, UART, GPIO, timers, storage, or multi-core SoC state.1011## Use Renode when1213- the artifact is MCU/RTOS firmware and a board or close SoC model exists14- UART/GPIO/timer/storage/network peripheral behavior matters15- QEMU lacks the exact board, or CPU-only emulation hangs on MMIO16- you need deterministic virtual time and GDB remote debugging17- you can write or adapt a `.repl` platform description for the minimum needed peripherals1819Do not treat CPU stepping as board parity. Prove the peripheral behavior relevant to the objective.2021## Core objects2223- `.repl`: platform description; CPUs, memory maps, buses, UARTs, GPIOs, timers, and peripherals.24- `.resc`: Renode monitor script; creates machines, loads platforms, loads binaries, configures analyzers, starts emulation.25- Monitor: interactive command surface for machines, sysbus, peripherals, memory, UART analyzers, and GDB server.26- Robot Framework: useful for validation harnesses that assert UART/peripheral output; keep it as test infrastructure, not the only evidence.2728## Minimal monitor flow2930```text31mach create32machine LoadPlatformDescription @platforms/boards/<board>.repl33sysbus LoadELF @firmware.elf34showAnalyzer sysbus.uart035machine StartGdbServer 333336start37```3839Useful commands:4041```text42peripherals43sysbus WhatPeripheralIsAt 0x4000000044sysbus ReadDoubleWord 0x4000000045sysbus WriteDoubleWord 0x40000000 0x146sysbus.cpu Step47pause48quit49```5051For raw binaries, set load address and reset vector deliberately; ELF is safer when available because it carries sections and entry point.5253## Custom platform guidance5455When no board exists:56571. Build the smallest `.repl` from known CPU, RAM/flash, and MMIO ranges.582. Add UART first if console output is needed.593. Add timers/interrupt controller before assuming RTOS scheduler failure.604. Stub unknown peripherals only enough to pass non-target checks.615. Label the result as partial parity and list unmodeled peripherals.6263Sources for modeling clues: vendor datasheet, SVD, linker script, map file, DTB, SDK headers, strings, disassembly xrefs to MMIO addresses, and logic/UART captures.6465## GDB6667```text68machine StartGdbServer 333369```7071Then connect with the matching toolchain:7273```bash74arm-none-eabi-gdb firmware.elf75(gdb) target remote :333376```7778Use GDB to prove reset handler, RTOS task creation, peripheral driver paths, memory state, and breakpoints on fault handlers.7980## Evidence8182- exact `.repl`/`.resc` or monitor command sequence83- board/profile source and any custom modeled/stubbed devices84- UART transcript, GPIO/peripheral read/write, memory state, or GDB breakpoint85- whether proof is instruction execution, runtime boot, peripheral parity, or system parity8687## Failure pivots8889- no UART: wrong UART instance, firmware uses semihosting/RTT, clocks not modeled, or boot never reaches init90- stuck in default handler: missing IRQ/timer/peripheral model91- fault after reset: wrong load address, vector table, stack pointer, Thumb bit, or memory map92- GDB oddities on multicore boards: start/select the correct CPU-specific GDB server93