Skip to content

v1.0.0-rc.1

Pre-release
Pre-release

Choose a tag to compare

@begeistert begeistert released this 06 Jun 07:33
6711908

First public release candidate of RP2040Sharp — a high-performance Raspberry Pi
RP2040 emulator written entirely in modern C# (.NET 10). It runs real, unmodified
RP2040 firmware
, including MicroPython, and reaches an interactive REPL in ~3–4 s of
simulated time (~460 MIPS on Apple Silicon).

This is a release candidate: the emulator is feature-complete and the full test
suite is green, but the public API may still receive small adjustments before the final
1.0.0. Feedback and bug reports are very welcome.

This project is a C# port and re-imagination of the excellent
rp2040js by Uri Shaked.

✨ Highlights

  • ARM Cortex-M0+ — full Thumb-1 instruction set, exceptions, NVIC, SysTick, PendSV
  • Dual-core — Core 1 launches via the SIO FIFO multicore handshake (RP2040 §2.8.3)
  • GDB stub — debug Core 0 with arm-none-eabi-gdb over target remote :3333
    (registers, memory, stepi, breakpoints, detach)
  • Real RP2040 B1 BootROM embedded; ROM table lookups and bit-manip helpers run natively
  • Flash erase/program via native hooks — MicroPython's LittleFS filesystem works
  • MicroPython boots to an interactive REPL over emulated USB-CDC

🧩 Peripherals

GPIO, SIO (spinlocks, interpolators, divider), UART0/1, SPI0/1, I2C0/1
(master + slave-mode simulation), ADC, PWM (all 8 slices), PIO0/1
(state machines + GPIO), DMA (all channels, DREQ sources), Timer/Alarms, Watchdog,
RTC, USB CDC-ACM host, Clocks, Resets. XOSC/ROSC/PLL/PSM/VREG are register stubs.

📦 Packages

Package Description
RP2040Sharp Core emulator — CPU, bus, peripherals, machine (AOT-compatible)
RP2040Sharp.TestKit Fluent harness for writing firmware integration tests
dotnet add package RP2040Sharp --prerelease

🔌 Embedding (circuit simulators)

A per-pin GPIO API (SetGpioExternalIn, GetGpioOut, GetGpioOutputEnable) makes the
core easy to drop into circuit simulators.

⚠️  Known limitations

- XOSC/ROSC/PLL/PSM/VREG are register stubs (report stable/locked; no frequency model)
- Flash programming uses C# hooks rather than the SSI XIP hardware path
- USB host support is CDC-only (for the MicroPython REPL)

🙏 Acknowledgements

Based on the original work from rp2040js (https://github.com/wokwi/rp2040js)
© 2021 Uri Shaked. C# port © 2026 Iván Montiel Cardona. MIT licensed.