You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Follow-up sweep to #1102 (closed today by PRs #1110–#1116), run against main @ 69b51cf ahead of the CH32V hardware bench test in two days (2026-07-23). Two questions: (1) what bugs remain in the CH32V pipeline, and (2) is the deployment strategy right, or do we need a different one / several? Cross-checked against the pinned OpenWCH core (arduino_core_ch32 @ d767162), WCH datasheets (wch-ic.com; mirrors cited below — FastLED/datasheets has no WCH docs yet, see FastLED/datasheets#6), the WCH-Link User Manual V2.3, and the wlink/wchisp/minichlink/probe-rs/Community-PIO sources.
The scariest bench bug is invisible in a blink test: no clock-init macro is ever passed to the core, so every CH32V boots at its slow reset clock (a V203 runs at 8 MHz while F_CPU claims 144 MHz). Blink and serial look fine because the core's own timekeeping is consistently slow — but FastLED's cycle-counted WS2812 waveforms come out 18× too slow, i.e. dead LEDs (fix(ch32v): no SYSCLK_FREQ_* define injected - all CH32V firmware runs at reset-default HSI (2-18x under-clocked) #1119).
Deployment strategy verdict: the current strategy (build-only + "flash manually with wlink") is honest but not a strategy. One tool is not enough for a probe-free story, but one tool IS enough for full coverage: adopt TWO strategies — wlink + WCH-LinkE probe as the primary deployer (covers all 9 series, Rust, permissively licensed, pinned release assets, matches our probe-rs pattern), and wchisp USB-ISP as the probe-free fallback for the 7 series that have a factory USB bootloader (feat(deploy): CH32V wlink deployer - primary flashing strategy (WCH-LinkE, all 9 series) #1123, feat(deploy): wchisp USB-ISP fallback deployer for USB-bootloader CH32V parts #1124). CH32V003/V006 physically cannot be flashed without a probe (no USB, bootloader unreachable on a blank chip), so a probe-free-only plan is impossible. Do not adopt PlatformIO's default OpenOCD fork — WCH distributes it without a license file, source by email only; unshippable (details below).
Why not one strategy? The chips split into two hardware classes:
Class
Chips
Flash paths that exist
Probe-free possible?
SDI-only
CH32V003, CH32V006
1/2-wire SDI (WCH-LinkE only — old WCH-Link can't do it); UART bootloader exists but is software-entry-only (no BOOT pin) → unreachable on a blank chip
No
USB-bootloader
V103, V203, V208, V303, V307, X035, L103
SWD/SDI probe; factory USB+UART ISP via BOOT0 (X035: PC16/PC17 power-on trick, no BOOT pin)
Yes (wchisp)
Tool ranking for fbuild (full matrix + sources in #1123/#1124):
wlink v0.1.2 (primary): all 9 series, one code path, Rust, MIT/Apache-2.0, per-OS release assets → fits our pinned-flasher model exactly. Gaps: no linux-aarch64/macos-x64 assets; "not production ready" disclaimer → smoke-test per family before bench day.
wchisp v0.3.0 (fallback): probe-free for the USB class; needs user BOOT0 entry + WinUSB driver on Windows; stable release does NOT support V00x.
probe-rs (fast-follow): native WCH-Link driver + released CH32V0/V2/V3 flash algorithms in v0.31.0; V103/X035/L103/V006 targets master-only. Cheap for us later since we already pin probe-rs — not for bench day.
minichlink: keep as the manual fallback it already is in our error message; no release binaries of its own.
WCH OpenOCD fork (PlatformIO's default wch-link protocol): no license file, source by email — do not pin or redistribute. Our board JSONs keep the wch-link protocol name for PIO parity, but fbuild should never ship that binary.
Board-JSON parity check: our protocols: ["wch-link","minichlink","isp","wlink"] matches Community-PIO exactly — correct except the isp entry on V003/V006 (#1125, PIO's list is equally wrong there).
Bench-day recipe that works on current main (once #1117 lands)
Flash: wlink flash <project>/.fbuild/build/<env>/firmware.bin with a WCH-LinkE (firmware ≥ 2.15, RV mode — if it enumerates as 1a86:8012 run wlink mode-switch). Old CH549 WCH-Link cannot flash V003/V006/X035/L103.
Confirmed non-issues this sweep (so nobody re-audits them): defsym wiring for all series incl. 32K/10K V203C6 and 128K/64K RB/208; normalize_march output accepted by xPack GCC 14.2.0-3; series→system-dir mapping for all 9 families incl. v006→CH32VM00X and v208→CH32V20x; V208 D8W startup; variant dirs exist at the pinned commit; hwids-free board JSONs (registry rule compliant); CI path filters post-fix(ci): update CH32V path filters after crate split #1110; all 9 test envs framework = arduino.
Sweep run 2026-07-21 with four independent audit passes (build pipeline, board data, deploy/serial, deployment-strategy research); every CRITICAL/HIGH was re-verified by hand before filing.
Follow-up sweep to #1102 (closed today by PRs #1110–#1116), run against main @ 69b51cf ahead of the CH32V hardware bench test in two days (2026-07-23). Two questions: (1) what bugs remain in the CH32V pipeline, and (2) is the deployment strategy right, or do we need a different one / several? Cross-checked against the pinned OpenWCH core (
arduino_core_ch32@d767162), WCH datasheets (wch-ic.com; mirrors cited below — FastLED/datasheets has no WCH docs yet, see FastLED/datasheets#6), the WCH-Link User Manual V2.3, and the wlink/wchisp/minichlink/probe-rs/Community-PIO sources.TL;DR in plain terms
F_CPUclaims 144 MHz). Blink and serial look fine because the core's own timekeeping is consistently slow — but FastLED's cycle-counted WS2812 waveforms come out 18× too slow, i.e. dead LEDs (fix(ch32v): no SYSCLK_FREQ_* define injected - all CH32V firmware runs at reset-default HSI (2-18x under-clocked) #1119).wlink+ WCH-LinkE probe as the primary deployer (covers all 9 series, Rust, permissively licensed, pinned release assets, matches our probe-rs pattern), andwchispUSB-ISP as the probe-free fallback for the 7 series that have a factory USB bootloader (feat(deploy): CH32V wlink deployer - primary flashing strategy (WCH-LinkE, all 9 series) #1123, feat(deploy): wchisp USB-ISP fallback deployer for USB-bootloader CH32V parts #1124). CH32V003/V006 physically cannot be flashed without a probe (no USB, bootloader unreachable on a blank chip), so a probe-free-only plan is impossible. Do not adopt PlatformIO's default OpenOCD fork — WCH distributes it without a license file, source by email only; unshippable (details below).Sub-issues (work top-down; one PR per issue)
Blocks the bench (fix before 2026-07-23):
-isystemmisses the default multilib → all rv32imac C++ builds fail on Windows (the bench box).SYSCLK_FREQ_*from boardf_cpu+clock_source; today all firmware runs 2–18× under-clocked and FastLED timing is broken.fbuild monitornever streams serial lines; usefbuild serial probe readon the bench until fixed.-DCH32V30x_D8); IRQs ≥ 58 misroute.Deployment strategy (decision above; implementation):
"isp"protocol from the six CH32V003/V006 board JSONs.platform == "espressif32", registry publishes"esp32"— fix before the new WCH registry rows are dead on arrival.Hygiene / follow-ups:
patch_backup_headersilent no-op + obsolete test + redundant X035 define.wch/vendor tree (datasheets + reference manuals + WCH-Link manual) so future audits cite pinned documents instead of mirrors.Deployment strategy — the audit in full
Why not one strategy? The chips split into two hardware classes:
Tool ranking for fbuild (full matrix + sources in #1123/#1124):
wch-linkprotocol): no license file, source by email — do not pin or redistribute. Our board JSONs keep thewch-linkprotocol name for PIO parity, but fbuild should never ship that binary.Board-JSON parity check: our
protocols: ["wch-link","minichlink","isp","wlink"]matches Community-PIO exactly — correct except theispentry on V003/V006 (#1125, PIO's list is equally wrong there).Bench-day recipe that works on current main (once #1117 lands)
soldr cargo run -p fbuild-cli -- build tests/platform/<env> -e <env>(on Windows, non-V003 targets also need fix(toolchain): riscv g++ -isystem set misses the default multilib dir - rv32imac CH32V C++ builds fail on Windows #1118).wlink flash <project>/.fbuild/build/<env>/firmware.binwith a WCH-LinkE (firmware ≥ 2.15, RV mode — if it enumerates as 1a86:8012 runwlink mode-switch). Old CH549 WCH-Link cannot flash V003/V006/X035/L103.fbuild serial probe list→fbuild serial probe read --port COMx --baud 115200 --seconds N(NOT barefbuild monitor— fix(monitor): fbuild monitor never streams serial lines; bare invocation returns immediately; default port is /dev/ttyUSB0 on Windows #1122), or Pythonfbuild.api.SerialMonitor.55e0if trying ISP.Verified reference facts
_eusrstack/march) is unchanged from meta: CH32V deployment-pipeline audit — 7 defects from board JSON to deploy #1102 and re-verified this sweep; board JSON rom/ram/march/mabi/f_cpu all check out against datasheets (V103 correctly 72 MHz, not 144).normalize_marchoutput accepted by xPack GCC 14.2.0-3; series→system-dir mapping for all 9 families incl. v006→CH32VM00X and v208→CH32V20x; V208 D8W startup; variant dirs exist at the pinned commit; hwids-free board JSONs (registry rule compliant); CI path filters post-fix(ci): update CH32V path filters after crate split #1110; all 9 test envsframework = arduino.Sweep run 2026-07-21 with four independent audit passes (build pipeline, board data, deploy/serial, deployment-strategy research); every CRITICAL/HIGH was re-verified by hand before filing.