Repository navigation
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…be-rs#4206) Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…tion (probe-rs#4211) Co-authored-by: Cursor <cursoragent@cursor.com>
… `--chip-erase` always clears UICR (probe-rs#4226) Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Dániel Buga <bugadani@gmail.com> Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…e-rs#4478) Co-authored-by: Paulius Zaleckas <paulius.zaleckas@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…cted (probe-rs#4513) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: OnlyoutzZ <17393117531@163.com> Co-authored-by: nsingcommunity <nsingcommunity@nsingtech.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Dániel Buga <bugadani@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Add the CH585 chip family code (0x4B) to the WCH-Link `RiscvChip` table, so `AttachChip` no longer fails with `Unknown chip 0x4b` on these parts. Add a target description for CH585 and CH584. Both expose 448 KiB of code flash at 0x0; the 32 KiB data flash at 0x70000 is deliberately left out of the memory map because it is reached through the ISP library rather than the code address space. SRAM is 128 KiB on the CH585 and 96 KiB on the CH584. No flash algorithm is included, so these targets support debugging and memory access but not flashing yet. Verified on a CH585 with a WCH-LinkE: `info --verbose` reports family 0x4b, and `read`/`reset` work with `--chip CH585`. Co-Authored-By: Claude Code <noreply@anthropic.com>
Replace `CH585_Series.yaml` with `CH57X_Series.yaml`, `CH58X_Series.yaml`, and `CH59X_Series.yaml` covering WCH's QingKe V4A/V4C BLE MCU families: - `CH57X_Series.yaml`: CH571 (192 KiB Flash / 18 KiB RAM), CH573 (448 KiB Flash / 18 KiB RAM) - `CH58X_Series.yaml`: CH581, CH582, CH583, CH584, CH585 (448 KiB Flash / 32..128 KiB RAM) - `CH59X_Series.yaml`: CH591 (192 KiB Flash / 26 KiB RAM), CH592 (448 KiB Flash / 26 KiB RAM) All three families share a single 1024-byte position-independent CodeFlash algorithm (`ch32-rs/flash-algorithms` `ch5xx`) that dynamically enforces the per-chip CodeFlash ceiling via `R8_CHIP_ID` (`0x40001041`) and runs at each target's default RAM start (`0x20003800` on CH571/573, `0x20000000` on CH58x/CH59x). Co-Authored-By: Claude Code <noreply@anthropic.com>
…CH592_Series.yaml Avoid colliding with Cortex-M0 CH577/CH578/CH579 (`CH57X`) and CH595 (`CH59X`, which uses a different hardware pre-program/page-latch Flash controller at `0x40001800..0x40001820`), matching the existing `CH570_CH572_Series.yaml` naming convention. Co-Authored-By: Claude Code <noreply@anthropic.com>
List CH581, CH582, CH583, CH584, and CH585 explicitly instead of using a `CH58X` wildcard, since CH586/CH587 have different memory sizes (up to 960 KiB CodeFlash / 256 KiB SRAM) and a separate WCH-Link chip code (`0xAB`). Co-Authored-By: Claude Code <noreply@anthropic.com>
….yaml Use `CH58X_Series.yaml` (`CH58X Series`) to cover CH581, CH582, CH583, CH584, and CH585. Co-Authored-By: Claude Code <noreply@anthropic.com>
…H591/592 Each variant's `CodeFlash` `!Nvm` region already bounds its flash size (and the algorithm checks `R8_CHIP_ID` at runtime), so `ch5xx-code-flash-192k` and `ch5xx-code-flash-448k` can be collapsed into a single `ch5xx-code-flash` entry matching `target-gen`'s `compact_flash_algos` behavior. Co-Authored-By: Claude Code <noreply@anthropic.com>
Fold `CH570_CH572_Series.yaml` into `CH57X_CH58X_CH59X_Series.yaml` and drop the per-family files. CH570/CH572 switch from `ch570-code-flash` to the shared position-independent `ch5xx-code-flash`, which already caps those chip ids (`0x70`/`0x72`) at 240 KiB via `R8_CHIP_ID`. Co-Authored-By: Claude Code <noreply@anthropic.com>
CH570 and CH572 go back to `ch570-code-flash` unchanged, instead of the shared `ch5xx-code-flash`. Drop the `0x93000000` detection entry: the probe firmware reports chip id 0 for that part, so it never matches. Co-Authored-By: Claude Code <noreply@anthropic.com>
Add a target description for the WCH CH565/CH569 series (QingKe V3A, 448 KiB CodeFlash at 0x0) with the `ch569-code-flash` algorithm from `algos-ch5xx/ch569` in ch32-rs/flash-algorithms. The algorithm erases in 4 KiB sectors and implements `ReadFlash`, because a halted debug read of CodeFlash returns a placeholder instead of the stored bytes. The WCH-Link needs the `0x0d/0x04` post-attach setup that wlink sends for the CH56X family; without it, flash accesses fail with an abstract command exception. Verified on a CH569 with a WCH-LinkE: `download --verify` of a 256-byte image completes in under two seconds. Co-Authored-By: Claude Code <noreply@anthropic.com>
Keep the changelog entries to user-visible support, and drop the implementation notes above the CH565/CH569 algorithm's load address. Co-Authored-By: Claude Code <noreply@anthropic.com>
erase_all now erases aligned 64 KiB blocks with 0xD8 and the tail with 0x20, matching the vendor loader. The blob is rebuilt from ch32-rs/flash-algorithms algos-ch5xx/ch5xx.
Only autoexecdata is used by the program-buffer memory paths. Some debug modules, such as WCH QingKe, implement data-register autoexec but ignore the progbuf bits, so the previous equality check disabled autoexec and fell back to one abstract command per word.
Recognise WCH-Link family 0xA6 as the QingKe-V4F CH32V4X7 series and add the CH32V4X7 Series target with six parts. The RAM split is driven by USER.RAM_CODE_MOD (bit 6), giving either 200 KiB or 136 KiB, and each variant carries usr/usr-legacy/sys/opt flash algorithms. Flash protection is deliberately not enabled for V4x7, so attaching does not trigger the automatic unprotect path. Flashing, RTT and the flash algorithms have not been validated on hardware yet.
|
Please do not edit CHANGELOG.md directly. Take a look at CONTRIBUTING.md for information on changelog fragments instead. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Track ongoing WCH-Link, CH5xx and CH32V4x7 development on
add-new-ch32-chips, targeting this fork'sch32branch. Keep this PR as a draft while hardware validation and follow-up fixes continue.The branch also includes upstream synchronization through
f4d190285(2026-10-22). The current comparison withch32contains 344 commits, so this is a development tracking PR covering both that synchronization and the WCH-specific work.Currently implemented series
These targets have debugging support and flash algorithms in the branch. Target availability does not imply that every part or operation has been tested on hardware.
--chip; automatic detection is not configured for these two targets. Hardware validation remains to be recorded here.0xA6, package/revision-aware detection, 200 KiB and 136 KiB RAM configurations, and generated usr/usr-legacy/sys/opt flash algorithms. CH32V467WEU6 detection and chip-ID reads are verified on hardware; flash programming and live RTT are pending.For CH56x/CH57x/CH58x/CH59x, automatic detection depends on the WCH-Link firmware returning a usable chip ID. Use
--chipwhen it returns zero.Development progress
Latest hardware validation — 2026-10-31
Test setup: WCH-LinkE-CH32V305, firmware 2.22 (v42), connected to CH32V467WEU6 with chip ID
0x46740011.The previous driver used a fixed 100 ms USB timeout. Direct protocol measurements put reconnection at approximately 115–123 ms; even the initial attachment occasionally exceeded 100 ms. This caused
probe-rs info --protocol jtagto fail during the second attachment after automatic detection.AttachChipnow allows one second; other commands retain their 100 ms timeout.After installing the fix:
probe-rs info --protocol jtagsucceeded in 10 consecutive runs and detectedCH32V467WEU6.0x1ffff704returned0x46740011, both with automatic detection and with--chip CH32V467WEU6.probe-rs info --verbose --protocol jtagreported family0xA6and the matching chip ID.These checks did not erase or program flash. V4x7 attachment does not opt into the automatic flash-unprotect path.
Checks
probe-rssucceeded.cargo fmt --all -- --checkpassed.cargo test -p probe-rs --lib probe::wlink --locked --releasepassed: 4 tests.