Skip to content

Feature: RV32I progbuf-based memory access support#2185

Open
ALTracer wants to merge 4 commits intoblackmagic-debug:mainfrom
ALTracer:feature/riscv32-progbuf-memory-rw
Open

Feature: RV32I progbuf-based memory access support#2185
ALTracer wants to merge 4 commits intoblackmagic-debug:mainfrom
ALTracer:feature/riscv32-progbuf-memory-rw

Conversation

@ALTracer
Copy link
Contributor

@ALTracer ALTracer commented Feb 1, 2026

Detailed description

  • This is a new feature.
  • The existing problem is unreadable memory (RAM, flash, bus registers) on some 32-bit RISC-V microcontrollers, with SBA unimplemented and AAM unsupported.
  • The PR solves it by providing methods of reading and writing single elements 8/16/32-bit wide via progbuf postexec of AAR per RISC-V Debug Spec v0.13; no CSR access is needed.

Tested on BMDA and blackpill-f411ce against GD32VF103.
Initial version used DATA0 DM MMR access from progbuf, second version is GPR-only. This is 2x slower than AAM on GD32VF103 (which is implements), but Hart has 4 data registers and 2 progbuf registers so I intend to also implement the auto-incrementing snippets mentioned in Spec using abstractauto[0] (retrigger on DM DATA0 reads/writes).

Your checklist for this pull request

Closing issues

@ALTracer ALTracer force-pushed the feature/riscv32-progbuf-memory-rw branch from 09ecc87 to 9dd58fb Compare February 2, 2026 05:09
@ALTracer ALTracer force-pushed the feature/riscv32-progbuf-memory-rw branch from 9dd58fb to 03c45ad Compare February 7, 2026 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant