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
A physical CH32V003 is now on the bench. fbuild's CH32V support was built out across #1102/#1130 and is green in CI, but every bit of it has only ever been validated by a compile job — no firmware from this repo has been proven to run on real silicon. This issue is the step-by-step bring-up: take the existing paper support to a verified blink, then close the remaining gaps that only show up with hardware attached.
The FastLED-side platform port is tracked separately in FastLED/FastLED — see the companion issue linked below. This issue stops at "fbuild can build, flash, and talk to a CH32V003."
.github/workflows/build-ch32v003.yml from ci/board_families.json:31
green
Verified board record (genericCH32V003F4P6.json): march: rv32ec_zicsr, mabi: ilp32e, f_cpu: 48000000L, rom 16384, ram 2048, upload.protocol: wch-link.
Known gaps
No hardware validation of any of the above. Primary purpose of this issue.
WCH-LinkE has no USB identity.1A86:8010 (RV mode) / 1A86:8012 (DAP mode) are absent from the FastLED/boards registry. Per CLAUDE.md these must not be added to this repo — the fix is a PR to FastLED/boards, ingested at runtime via fbuild_core::usb::profiles::profiles_for. Today crates/fbuild-serial/src/boards.rs:613 (test-only table) would wildcard 0x1A86 to Esp32ExternalUart, which is wrong for a probe.
No probe-rs support.probe_rs.rs:358 map_board_to_probe_rs_chip() handles only lpc845. Upstream probe-rs does not support CH32 either (probe-rs#28), so this is likely permanent — wlink is the path.
At time of filing, no VID_1A86 device is enumerated on the bench machine. There is one Unknown USB Device (Device Descriptor Request Failed) at VID_0000&PID_0002 — rule this out (cable/port/hub) as step 0.
Step-by-step
Phase 0 — Establish the probe
Confirm the WCH-LinkE enumerates as 1A86:8010. If it comes up as 1A86:8012 (DAP mode), hold the button while plugging in to toggle to RV mode.
Windows: bind WinUSB to the probe interface via Zadig if wlink can't claim it. Record the exact procedure — this is the single most common first-time failure and belongs in the docs.
wlink status sees the chip and reports the correct flash size. Record the WCH-Link firmware version (wlink v0.1.2 is tested against 2.15).
Wire SWIO / GND / 3V3 to the target and confirm the chip ID reads back.
Exit criteria:wlink status prints a CH32V003 chip ID.
Phase 1 — Build
soldr cargo run -p fbuild-cli -- build tests/platform/ch32v003 -e ch32v003
Confirm the toolchain downloads and validates (riscv-none-elf-gcc 14.2.0-3), and that the rv32ec/ilp32e libgcc multilib is actually present — a missing multilib links rv32i objects and fails on register-count violations.
Record the produced .bin size against the 16 KB budget.
soldr cargo run -p fbuild-cli -- deploy tests/platform/ch32v003 -e ch32v003 (defaults to the wlink deployer).
Confirm ensure_wlink_installed() downloads and checksum-verifies the pinned v0.1.2 asset into ~/.fbuild/{prod|dev}/tools/wlink/.
Observe the blink on a scope or LED. This is the first time fbuild firmware has ever executed on this architecture — a successful flash is not sufficient evidence.
Verify the 48 MHz clock empirically (toggle a pin in a known-cycle loop and measure), rather than trusting the define.
Exit criteria: measured blink at the expected rate. This is the bring-up milestone.
Phase 3 — Close the hardware-visible gaps
FastLED/boards PR adding 1A86:8010 and 1A86:8012 with purpose: probe / role: debug-probe. Then re-verify fbuild serial probe list classifies the WCH-LinkE as a probe and not as an ESP32 UART bridge. Do not patch fbuild-serial tables.
Decide and document the SDI-print / serial story. V003 has no USB, so console output is either SDI-print over the debug link (wlink supports it) or a USART pin to a separate bridge. Whichever is chosen, fbuild serial needs to know about it.
Add a DTR/RTS matrix row for the WCH-LinkE CDC interface in docs/usb-cdc-control-line-matrix.md.
Fix boards.rs:613's (0x1A86, _) wildcard so a probe isn't misclassified.
Phase 4 — Harden
Add a #[ignore = "requires CH32V003 + WCH-LinkE probe"] hardware integration test covering build → flash → verify.
Update docs/BOARD_STATUS.md: CH32V003 moves from compile-verified to hardware-verified, with the bench setup documented.
Write up the Zadig/WinUSB procedure and probe-mode toggle in the CH32V README.
Consider bumping the xPack toolchain to 14.3.0-1 or 15.2.0-1 (both 2025-10-23) — only if Phase 1/2 surface a codegen problem. Not part of bring-up.
Summary
A physical CH32V003 is now on the bench. fbuild's CH32V support was built out across #1102/#1130 and is green in CI, but every bit of it has only ever been validated by a compile job — no firmware from this repo has been proven to run on real silicon. This issue is the step-by-step bring-up: take the existing paper support to a verified blink, then close the remaining gaps that only show up with hardware attached.
The FastLED-side platform port is tracked separately in FastLED/FastLED — see the companion issue linked below. This issue stops at "fbuild can build, flash, and talk to a CH32V003."
What already exists (do not rebuild)
Platform::Ch32vcrates/fbuild-core/src/lib.rs:128,:169crates/fbuild-toolchain/src/toolchain/riscv.rs— xPackriscv-none-elf-gcc14.2.0-3, per-host SHA-256 tablecrates/fbuild-library/src/library/ch32v_core.rs— OpenWCHarduino_core_ch321.0.4+d767162.ch32l103crates/fbuild-build-mcu/src/ch32v/configs/ch32v003.jsoncrates/fbuild-build-mcu/src/ch32v/crates/fbuild-config/assets/boards/json/genericCH32V003*.json(+13 more CH32)crates/fbuild-deploy/src/wlink.rs(pinnedwlinkv0.1.2),wchisp.rscrates/fbuild-daemon/src/handlers/operations/deploy.rs:809-825tests/platform/ch32v003/.github/workflows/build-ch32v003.ymlfromci/board_families.json:31Verified board record (
genericCH32V003F4P6.json):march: rv32ec_zicsr,mabi: ilp32e,f_cpu: 48000000L, rom 16384, ram 2048,upload.protocol: wch-link.Known gaps
1A86:8010(RV mode) /1A86:8012(DAP mode) are absent from the FastLED/boards registry. PerCLAUDE.mdthese must not be added to this repo — the fix is a PR to FastLED/boards, ingested at runtime viafbuild_core::usb::profiles::profiles_for. Todaycrates/fbuild-serial/src/boards.rs:613(test-only table) would wildcard0x1A86toEsp32ExternalUart, which is wrong for a probe.probe_rs.rs:358 map_board_to_probe_rs_chip()handles onlylpc845. Upstream probe-rs does not support CH32 either (probe-rs#28), so this is likely permanent —wlinkis the path.arduino.orchestrator.rs:260 validate_ch32v_framework()rejectsnoneos-sdkandch32v003funeven though the board JSON advertises them (ch32v: framework field is ignored — noneos-sdk envs silently build the OpenWCH Arduino core (4 of 9 CI envs affected) #1108).crates/fbuild-cli/src/cli/debug.rs:131→Platform::Ch32v => DebugSupport::Injected.infer_default_emulator_kindreturnsNonefor ch32v.minichlinkreferenced in board JSONupload.protocolsbut not implemented.Hardware
1A86:8010RV mode).wchispis not usable —wchisp.rs:152 supports_mcu()correctly excludes V003/V006, which have no factory USB-ISP bootloader (fix(boards): drop 'isp' protocol from CH32V003/CH32V006 board JSONs - parts have no reachable ISP bootloader #1125).VID_1A86device is enumerated on the bench machine. There is oneUnknown USB Device (Device Descriptor Request Failed)atVID_0000&PID_0002— rule this out (cable/port/hub) as step 0.Step-by-step
Phase 0 — Establish the probe
1A86:8010. If it comes up as1A86:8012(DAP mode), hold the button while plugging in to toggle to RV mode.wlinkcan't claim it. Record the exact procedure — this is the single most common first-time failure and belongs in the docs.wlink statussees the chip and reports the correct flash size. Record the WCH-Link firmware version (wlink v0.1.2 is tested against 2.15).Exit criteria:
wlink statusprints a CH32V003 chip ID.Phase 1 — Build
soldr cargo run -p fbuild-cli -- build tests/platform/ch32v003 -e ch32v003riscv-none-elf-gcc14.2.0-3), and that therv32ec/ilp32elibgcc multilib is actually present — a missing multilib linksrv32iobjects and fails on register-count violations..binsize against the 16 KB budget.SYSCLK_FREQ_*is injected (fix(ch32v): no SYSCLK_FREQ_* define injected - all CH32V firmware runs at reset-default HSI (2-18x under-clocked) #1119 regression guard) — the part must run at 48 MHz, not reset-default HSI.Exit criteria: a
.binunder 16384 bytes.Phase 2 — First flash (the actual bring-up)
soldr cargo run -p fbuild-cli -- deploy tests/platform/ch32v003 -e ch32v003(defaults to thewlinkdeployer).ensure_wlink_installed()downloads and checksum-verifies the pinned v0.1.2 asset into~/.fbuild/{prod|dev}/tools/wlink/.Exit criteria: measured blink at the expected rate. This is the bring-up milestone.
Phase 3 — Close the hardware-visible gaps
1A86:8010and1A86:8012withpurpose: probe/role: debug-probe. Then re-verifyfbuild serial probe listclassifies the WCH-LinkE as a probe and not as an ESP32 UART bridge. Do not patchfbuild-serialtables.wlinksupports it) or a USART pin to a separate bridge. Whichever is chosen,fbuild serialneeds to know about it.docs/usb-cdc-control-line-matrix.md.boards.rs:613's(0x1A86, _)wildcard so a probe isn't misclassified.Phase 4 — Harden
#[ignore = "requires CH32V003 + WCH-LinkE probe"]hardware integration test covering build → flash → verify.docs/BOARD_STATUS.md: CH32V003 moves from compile-verified to hardware-verified, with the bench setup documented.14.3.0-1or15.2.0-1(both 2025-10-23) — only if Phase 1/2 surface a codegen problem. Not part of bring-up.Out of scope (file separately if wanted)
framework = ch32v003funsupport (ch32v: framework field is ignored — noneos-sdk envs silently build the OpenWCH Arduino core (4 of 9 CI envs affected) #1108)minichlinkdeployerfbuild debugfor CH32VReferences