Skip to main content

Module server

Module server 

Source
Expand description

en: A gdbstub Target for a CH32 RISC-V core reached over a DtmAccess transport. Supports registers, memory read/write, halt/continue/single-step, and breakpoints. A break GDB requests as software (Z0) is placed by the cheapest working mechanism, in order: a RAM ebreak memory-patch; else a hardware execute trigger when the core has a free slot (no wear); else a flash software breakpoint that rewrites the containing flash page (works on triggerless cores, at the cost of flash wear). Hardware breakpoints use the RISC-V trigger module (measured: 4 slots on QingKe V4F/CH32V307 and V4C/CH32X035, live-fire confirmed; 0 on V4B/CH32V203, V2A/CH32V003, V3/CH32V103 - detected dynamically). Flash software breakpoints need a verified FLASH-controller page profile (256-byte families for now; V003/V103 are a follow-up). Attach does not modify flash; flash breakpoints are removed and pages restored on detach (docs/cli.ja.md §4.6). ja: DtmAccess 上の CH32 RISC-V core 用 gdbstub Target。register・memory R/W・ halt/continue/step・breakpoint。GDB が software(Z0)で要求した break は、動く中で最も安い 手段の順(RAM ebreak patch → 空き HW trigger〔摩耗なし〕→ flash page 書き換えの flash SW breakpoint〔trigger 無し core でも効くが flash 摩耗あり〕)で張る。hardware breakpoint は RISC-V trigger module(実測: V4F/V307・V4C/X035 は 4 slot 実発火、V4B/V203・V2A/V003・V3/V103 は 0。動的検出)。flash SW breakpoint は検証済み FLASH-controller profile が必要(現状 256byte family、V003/V103 は後続)。attach で flash を書き換えず、flash breakpoint は detach 時に外して page を復元する。

Structs§

Ch32Target
en: gdbstub target that OWNS its transport T (owning, not borrowing, keeps the type free of a lifetime so it fits BlockingEventLoop::Target). Recover the transport with Ch32Target::into_inner to detach cleanly afterwards. ja: transport T を所有する gdbstub target(所有にすることでライフタイムが付かず BlockingEventLoop::Target に収まる)。後始末は Ch32Target::into_inner で回収する。