Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
115 commits
Select commit Hold shift + click to select a range
0d1c989
feat(arm): implement remaining Cortex-M0+ Thumb instructions
begeistert May 1, 2026
a53c94e
feat(arm): add instruction emitter helpers for new Thumb instructions
begeistert May 1, 2026
7e7ff1c
test(arm): add tests for new Thumb instructions
begeistert May 1, 2026
01950cb
feat(ppb): implement NVIC, SysTick, and SCB peripheral (Fase 2)
begeistert May 1, 2026
47d0766
feat(sio): implement Single-Cycle I/O peripheral (Fase 3)
begeistert May 1, 2026
68e411f
feat(machine): add RP2040Machine, APB bridge, UART, Timer, GPIO (Fase 4)
begeistert May 1, 2026
35d2859
feat(testkit): add RP2040.TestKit with fluent simulation API (Fase 5)
begeistert May 1, 2026
992c022
chore: add RP2040.TestKit to solution
begeistert May 1, 2026
b53973b
feat(peripherals): implement DMA, PWM, and ADC peripherals (Fase 6A/E/F)
begeistert May 1, 2026
303565a
feat(peripherals): implement SPI and I2C peripherals (Fase 6C/D)
begeistert May 1, 2026
f808645
feat(peripherals): implement PIO blocks and AHB bridge (Fase 6B)
begeistert May 1, 2026
6e948a7
feat(wasm): add BROWSER conditional for NativeMemory in BusInterconnect
begeistert May 1, 2026
21d54a9
chore(nuget): configure MinVer and shared package metadata
begeistert May 1, 2026
0b42891
ci(nuget): add publish workflow and pack verification step
begeistert May 1, 2026
ac81ecd
perf(core): seal CortexM0Plus and RandomAccessMemory
begeistert May 1, 2026
f8452ef
feat(peripherals): implement atomic register aliases in ApbBridge and…
begeistert May 1, 2026
717cd39
feat(peripherals): add system peripherals ported from rp2040js
begeistert May 1, 2026
b00b723
feat(sio): add CPUID, interpolators, multicore FIFO, GPIO_HI, SPINLOC…
begeistert May 1, 2026
7b719fa
feat(machine): wire all new peripherals into RP2040Machine
begeistert May 1, 2026
5bdf72a
feat(peripherals): complete remaining rp2040js gaps (Fase 7)
begeistert May 1, 2026
c9d26d9
feat(peripherals): implementar gaps Fase 1
begeistert May 1, 2026
0c137c9
feat(peripherals): implementar gaps Fase 2
begeistert May 1, 2026
45760db
feat(peripherals): complete UART/SPI/I2C gaps (Fase 3)
begeistert May 1, 2026
ac4c8a9
feat(tests): add RP2040.Peripherals.Tests project + fix PIO JMP/FDEBU…
begeistert May 1, 2026
1338f57
feat(usb): add USBCTRL peripheral with DPRAM and register model (Fase 5)
begeistert May 1, 2026
637673e
feat(pio): implement FIFO join (FJOIN_TX/FJOIN_RX) + verify stubs (Fa…
begeistert May 1, 2026
7ad5bf0
feat(dma): add DREQ handshake with per-beat gating (Fase 7)
begeistert May 1, 2026
f9b4b81
feat(rtc+gpio+pio+pwm): implement RTC tick/alarm, GPIO IRQ integratio…
begeistert May 1, 2026
c693a12
feat(peripherals): PIO sideset fix, Watchdog ITickable, SIO INTERP + …
begeistert May 1, 2026
024853d
feat(build): configurable Flash size, Directory.Build.props consolida…
begeistert May 1, 2026
49b1add
refactor(structure): merge Core + Peripherals into RP2040Sharp (Fase 11)
begeistert May 1, 2026
1a7c3b7
ci: add integration-tests job with MicroPython matrix and firmware cache
begeistert May 1, 2026
534c638
feat(tests): add MicroPython integration test project
begeistert May 1, 2026
1ca778d
feat(sio): implement BLEND, CLAMP, ADD_RAW and CROSS_RESULT interpola…
begeistert May 1, 2026
d1c3e24
fix(adc): READY always set in CS, threshold=0 acts as 1, fix round-ro…
begeistert May 1, 2026
2fb3a33
fix(pwm): set default DIV reset value to 0x10, sync REG_EN bits to CSR
begeistert May 1, 2026
2a27dc8
fix(timer): use unsigned elapsed-distance comparison for 32-bit alarm…
begeistert May 1, 2026
8dcb337
fix(dma): add NullTrigger helper and fire IRQ on zero-count trigger w…
begeistert May 1, 2026
de4748f
fix(spi): set TXRIS (bit 3) when SSP is enabled and after every transfer
begeistert May 1, 2026
5ccfe4f
fix(watchdog): correct REASON bit positions per RP2040 TRM §4.7.6
begeistert May 1, 2026
1e86943
fix(i2c): IC_COMP_PARAM_1 returns 0 per RP2040 datasheet
begeistert May 1, 2026
7aaf96a
fix(cpu): raise HardFault instead of throwing C# exception on undefin…
begeistert May 1, 2026
94da972
feat(bus): route SSI peripheral at 0x18000000 through the flash regio…
begeistert May 1, 2026
3272c21
docs(usb): document known gap vs rp2040js full USB implementation
begeistert May 1, 2026
ffe1868
feat(testkit): add RunUntilOutput helpers and Rp2040 machine accessor
begeistert May 1, 2026
03c2872
fix(cpu): correct decoder masks and exception-return paths for ARMv6-M
begeistert May 2, 2026
8bbff33
fix(clocks): FC0_RESULT must shift KHZ value into bits[28:5]
begeistert May 2, 2026
ff423f1
feat(machine): synthetic BootROM stub with ROM API for pico-sdk firmware
begeistert May 2, 2026
a9c3010
chore(ppb): trace VTOR writes for boot diagnostics
begeistert May 2, 2026
b711101
chore(integrationtests): resolve micropython.org UF2 URL dynamically
begeistert May 2, 2026
8b35a72
test(cpu): cover CBZ/CBNZ raw encodings and exception-return semantics
begeistert May 2, 2026
e2b7062
chore(demo): MicroPython REPL demo and BootROM stub generator
begeistert May 2, 2026
714d38f
feat(usb): device-side USB-CDC peripheral with host-side enumeration
begeistert May 2, 2026
50dee78
fix(boot): IO_QSPI/SIO must report SS_N high so bootrom skips BOOTSEL
begeistert May 3, 2026
2d4c2b9
feat(bus): IHandlesAtomicAliases lets devices opt out of AHB R-M-W
begeistert May 3, 2026
7d94f9c
feat(ppb,resets): callbacks for NVIC_ISER and peripheral unreset
begeistert May 3, 2026
cc36538
feat(machine): load real RP2040 B1 BootROM binary instead of syntheti…
begeistert May 3, 2026
0057cb0
feat(usb): full UsbPeripheral with reset, SOF, suspend/resume, and ho…
begeistert May 3, 2026
e9d0108
fix(cpu): set EventRegistered after ExceptionReturn so WFE wakes on r…
begeistert May 3, 2026
15b648e
chore(integrationtests,demo): point MicroPython probes at USB-CDC
begeistert May 3, 2026
e6eef59
fix(usb): emit SOF unconditionally; edge-trigger INTR_DEV_CONN_DIS; e…
begeistert May 3, 2026
fd6fd56
fix(usb): reset resume latch on bus reset; periodic resume via OnSof
begeistert May 3, 2026
a2ce231
fix(usb): send CRLF on device connected to trigger MicroPython REPL p…
begeistert May 3, 2026
20c0cf6
chore: remove verbose debug traces from CPU and peripheral code
begeistert May 3, 2026
89c89df
chore(demo): clean up debug traces; add MIPS / speedup performance re…
begeistert May 3, 2026
afbb74b
fix(tbman): set PLATFORM=ASIC_BIT(0x1) so running_on_fpga() returns f…
begeistert May 3, 2026
d17f6e5
chore: update copyright year to 2026
begeistert May 3, 2026
df905cb
feat(sio): expose per-pin GPIO methods for circuit simulator integration
begeistert May 4, 2026
9330106
perf(cpu): replace hook dict lookup with address-ceiling short-circuit
begeistert May 4, 2026
a03db93
perf(bus): SRAM-first read paths; remove _pageTable/_maskTable indire…
begeistert May 4, 2026
2e4bef9
feat(demo): phased MIPS breakdown and synthetic micro-benchmark
begeistert May 4, 2026
e863eb5
docs: rewrite README to reflect current emulator capabilities
begeistert May 4, 2026
6096562
fix(cpu): replace GCHandle pinned with NativeMemory.AllocZeroed
begeistert May 4, 2026
9a47c44
feat(machine): add UF2 parser to RP2040Machine
begeistert May 4, 2026
0a50d0a
refactor(demo): delegate UF2 parsing to RP2040Machine.Uf2ToFlash
begeistert May 4, 2026
64e6462
fix(pio): correct 8 instruction-set bugs and add regression tests
begeistert May 4, 2026
48bda88
feat(machine): implement Core1 multicore support
begeistert May 4, 2026
066e6c1
feat(adc): add START_MANY free-running mode and IRQ support
begeistert May 4, 2026
be70563
fix(pwm): initialise phaseDir=true when enabling phase-correct at CTR=0
begeistert May 4, 2026
9efb069
fix(i2c): assert TX_EMPTY interrupt on enable and after each TX byte
begeistert May 4, 2026
1351910
RP2040Machine: expose InstructionCount property
begeistert May 6, 2026
5fbc528
CortexM0Plus: add DispatchedInstructions counter (excludes WFI/WFE sl…
begeistert May 6, 2026
aa0df30
Revert "CortexM0Plus: add DispatchedInstructions counter (excludes WF…
begeistert May 6, 2026
f3ff819
fix(cpu): wake from WFI when pending interrupt exists with PRIMASK=1
begeistert May 7, 2026
93ded62
fix(gpio): DigitalValue returns OutputValue when pin is configured as…
begeistert May 7, 2026
7812718
feat(usb): expose TxFifoCount on UsbCdcHost; chore(cpu): add Instruct…
begeistert May 7, 2026
ff9c209
feat(testkit): batch RunCycles for peripheral ticking; add RunUntilOu…
begeistert May 7, 2026
bcb9a7f
feat(tests): add CircuitPython firmware download and CircuitPythonRunner
begeistert May 7, 2026
729cfc5
refactor(tests): route MicroPython REPL to USB-CDC; add WriteFile, So…
begeistert May 7, 2026
bbbe235
test(micropython): update existing tests; add script integration tests
begeistert May 7, 2026
6e653f7
test(circuitpython): add boot, REPL, and filesystem script integratio…
begeistert May 7, 2026
59ea0fe
test: embed pico-examples firmware and add peripheral integration tests
begeistert May 7, 2026
336afa3
fix: AddHighToSp and MovToSp incorrect forced alignment (ARMv6-M)
Copilot May 7, 2026
0a0d03c
fix: CPU bugs, PIO spec compliance, perf improvements, interactive RE…
Copilot May 7, 2026
3b62e2e
feat: embedded firmware integration tests for PIO, multicore, and Mic…
Copilot May 7, 2026
ef5f81a
chore: add OnLockup callback, fix comment clarity (code review feedback)
Copilot May 7, 2026
3039312
feat: implement dual core (Core1) and fix pio_blink test description
Copilot May 7, 2026
39e93e2
refactor: address review feedback - rename test, add comments
Copilot May 7, 2026
63be98d
feat: implement USB MSC + HID host drivers, FatVolume, WriteFileViaMsc
Copilot May 7, 2026
67fbac4
fix: address code review — uint Le32, null-forgiving fix, HID comment
Copilot May 7, 2026
519c6c2
feat(ssi): implement QSPI flash command emulation (erase, program, read)
begeistert May 7, 2026
d74c7f7
test(circuitpython): add WriteFile+SoftReset tests via FAT boot.py in…
begeistert May 7, 2026
3c87713
Merge remote-tracking branch 'origin/dev' into copilot/analyze-code-i…
Copilot May 7, 2026
b15fe6f
fix(usb): remove HID OUT zero-length completion loop
begeistert May 8, 2026
892c335
fix(pio): check autopull at start of OUT, not after
begeistert May 8, 2026
6d76b16
fix(test): correct rp2.PIO.OUT_LOW expected value
begeistert May 8, 2026
10b46c4
fix(test): set out_shiftdir=SHIFT_RIGHT in PIO loopback script
begeistert May 8, 2026
b03d152
feat(demo): add CircuitPython blink demo project
begeistert May 8, 2026
24f5159
feat(i2c): add slave-mode simulation
begeistert Jun 6, 2026
082b7af
fix(multicore): launch Core1 and advance time by max of both cores
begeistert Jun 6, 2026
1920a2c
feat(gdb): port GDB Remote Serial Protocol server from rp2040js
begeistert Jun 6, 2026
09fe943
docs(release): refresh roadmap, document GDB, exclude demos from NuGet
begeistert Jun 6, 2026
465e37a
refactor(usb): remove unused MSC/HID host drivers
begeistert Jun 6, 2026
50134eb
ci: remove SonarCloud from the test pipeline
begeistert Jun 6, 2026
dec81b8
ci: rework publish pipeline (based on AVR8Sharp)
begeistert Jun 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 91 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: Publish NuGet

# ─────────────────────────────────────────────────────────────────────────────
# Versioning is handled by MinVer (Directory.Build.props): a `v*` tag produces a
# stable release version, any other ref produces a preview version derived from
# the last tag + commit height. Packages are always built and uploaded as a
# workflow artifact; they are pushed to nuget.org only for `v*` tags (or when a
# manual run sets push_public=true). Compatible with GitHub and Gitea runners.
# ─────────────────────────────────────────────────────────────────────────────
on:
push:
tags:
- "v*"
workflow_dispatch:
inputs:
push_public:
description: "Push to nuget.org as well? (otherwise pack + artifact only)"
required: false
default: "false"

jobs:
publish:
runs-on: ubuntu-latest

steps:
# ── Checkout ────────────────────────────────────────────────────────────
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # MinVer derives the version from the full tag history

# ── .NET setup ──────────────────────────────────────────────────────────
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: "10.0.x"

# ── Restore ─────────────────────────────────────────────────────────────
- name: Restore
run: dotnet restore RP2040.sln

# ── Build ───────────────────────────────────────────────────────────────
- name: Build
run: dotnet build RP2040.sln -c Release --no-restore /p:ContinuousIntegrationBuild=true

# ── Test (unit only; integration tests download firmware) ───────────────
- name: Test
run: >
dotnet test tests/RP2040Sharp.Tests/RP2040Sharp.Tests.csproj
-c Release
--no-build
--logger "console;verbosity=normal"

# ── Pack ────────────────────────────────────────────────────────────────
- name: Pack RP2040Sharp
run: >
dotnet pack src/RP2040Sharp/RP2040Sharp.csproj
-c Release
--no-build
--output ./nupkgs

- name: Pack RP2040Sharp.TestKit
run: >
dotnet pack src/RP2040.TestKit/RP2040.TestKit.csproj
-c Release
--no-build
--output ./nupkgs

# ── Push to nuget.org (tags, or a manual push_public run) ───────────────
- name: Push to nuget.org
env:
API_KEY: ${{ secrets.NUGET_API_KEY }}
if: >
${{ github.server_url == 'https://github.com' &&
env.API_KEY != '' &&
(startsWith(github.ref, 'refs/tags/v') ||
github.event.inputs.push_public == 'true') }}
run: >
dotnet nuget push "./nupkgs/*.nupkg"
--source https://api.nuget.org/v3/index.json
--api-key "${{ secrets.NUGET_API_KEY }}"
--skip-duplicate

# ── Always upload the packages as an artifact ───────────────────────────
- name: Upload NuGet Packages
uses: actions/upload-artifact@v4
with:
name: nupkgs
path: ./nupkgs/*.nupkg
retention-days: 14
if-no-files-found: error
76 changes: 46 additions & 30 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,48 +15,64 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'zulu'
fetch-depth: 0 # MinVer needs full tag history for the pack step

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.100'

- name: Install SonarCloud scanner
run: dotnet tool install --global dotnet-sonarscanner

- name: Restore dependencies
run: dotnet restore

- name: Begin SonarQube Analysis
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
run: |
dotnet sonarscanner begin /k:"begeistert_RP2040Sharp" \
/o:"begeistert" \
/d:sonar.host.url="${SONAR_HOST_URL}" \
/d:sonar.token="${SONAR_TOKEN}" \
/d:sonar.cs.opencover.reportsPaths="**/coverage.opencover.xml" \
/d:sonar.exclusions="tests/**" \
/d:sonar.scanner.scanAll=false


- name: Build
run: dotnet build --configuration Release --no-restore

- name: Execute xUnit Tests
run: |
dotnet test --configuration Release --no-build --verbosity normal \
--collect:"XPlat Code Coverage" \
-- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=opencover
--filter "Category!=Integration"

- name: Pack (verify packability)
run: dotnet pack --configuration Release --no-build --output ./nupkgs

integration-tests:
name: Integration Tests (${{ matrix.micropython-version }})
runs-on: ubuntu-latest
needs: unit-tests
strategy:
fail-fast: false
matrix:
micropython-version:
- v1.19.1
- v1.20.0
- v1.21.0

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: End SonarQube Analysis
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: dotnet sonarscanner end /d:sonar.login="${SONAR_TOKEN}"
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.100'

- name: Cache MicroPython firmware
uses: actions/cache@v4
with:
path: /tmp/rp2040sharp-firmware-cache
key: micropython-firmware-${{ matrix.micropython-version }}

- name: Restore dependencies
run: dotnet restore

- name: Build
run: dotnet build --configuration Release --no-restore

- name: Run Integration Tests
run: |
dotnet test tests/RP2040Sharp.IntegrationTests/ \
--configuration Release --no-build --verbosity normal \
--filter "Category=Integration"
27 changes: 27 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<Project>
<PropertyGroup>
<Authors>Iván Montiel Cardona</Authors>
<Company>begeistert</Company>
<RepositoryUrl>https://github.com/begeistert/RP2040Sharp</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageProjectUrl>https://github.com/begeistert/RP2040Sharp</PackageProjectUrl>
<PackageTags>rp2040;raspberry-pi;emulator;cortex-m0plus;microcontroller;simulation</PackageTags>
<Copyright>Copyright © 2024-2026 Iván Montiel Cardona</Copyright>
<Deterministic>true</Deterministic>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<!-- MinVer: versioning automático desde git tags (v1.0.0) -->
<MinVerVerbosity>minimal</MinVerVerbosity>
<MinVerDefaultPreReleaseIdentifiers>preview</MinVerDefaultPreReleaseIdentifiers>
<!-- Shared across all projects -->
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<LangVersion>latest</LangVersion>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup Condition="'$(IsPackable)' != 'false'">
<PackageReference Include="MinVer" Version="6.0.0" PrivateAssets="all" />
<None Include="$(MSBuildThisFileDirectory)README.md" Pack="true" PackagePath="README.md" Visible="false" />
</ItemGroup>
</Project>
6 changes: 3 additions & 3 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
MIT License

Copyright (c) 2025 Iván Montiel Cardona
Copyright (c) 2025 Sergio Domínguez Rojas
Copyright (c) 2025 Uri Shaked
Copyright (c) 2026 Iván Montiel Cardona
Copyright (c) 2026 Sergio Domínguez Rojas
Copyright (c) 2026 Uri Shaked

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
Loading
Loading