# cnlohr/ch32fun

Open source minimal stack for the ch32 and ch5xx WCH RISC-V Microcontrollers

Repository: https://github.com/cnlohr/ch32fun
Canonical: https://ross.abutalabs.com/products/ch32fun
Language: C
License: MIT
License Family: permissive
Last push: 2026-08-26T09:32:39+00:00

## Health v2 (maintenance only)
Score: 66/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 8, longevity 92
- inputs: {"age_days": 1292, "days_push": 7, "days_rel": 579, "gap_med": null, "n_releases_24m": 1}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1585, forks 275 (observed 2026-08-28T04:05:07.476638+00:00)

## What it is
A minimal open-source development environment (headers, examples, and tooling) for WCH RISC-V microcontrollers like the CH32V003, built around gcc-riscv64 without a heavy HAL. It includes minichlink for cross-platform flashing/debugging and a single self-contained source/header pair for compiling bare-metal firmware.

## Use cases
- blink an LED on a CH32V003 with minimal firmware size
- flash and debug WCH RISC-V microcontrollers from Linux or Windows
- program a 10-cent RISC-V chip without a heavyweight vendor HAL
- printf-debug over a single wire on a CH32V003
- build bare-metal firmware for CH32V and CH5xx series chips
- use gdbserver-style debugging with Visual Studio on a cheap RISC-V MCU

## When to choose
- you want tiny, fast-booting firmware and direct register access via the TRM instead of a bulky HAL
- you need cross-platform flashing/debugging for WCH CH32/CH5xx chips with common programmers
- you're doing cost-sensitive embedded projects with the CH32V003 or related WCH parts

## When to avoid
- you prefer a full vendor HAL with extensive peripheral libraries and official support
- you're targeting non-WCH microcontrollers like STM32 or ESP32
- you need extensive per-chip example coverage beyond what the project provides

## Facets
- artifact type: library
- maturity: active
- function: embedded, developer-tools, compiler, sdk, testing
- domain: embedded-systems, developer-tools, hardware
- platform: embedded, windows, cli, cross-platform
- tags: risc-v, microcontroller, wch, ch32v003, bare-metal, no-hal, toolchain, minichlink, gdbserver, swio-programming, linux, macos

## Member repositories
- cnlohr/ch32fun (main) score 66

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:07.476638+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:55:31.539363+00:00, confidence not recorded.
  - readme: https://github.com/cnlohr/ch32fun (fetched 2026-08-28T04:05:07.476638+00:00, sha f389ca54647d)
- Data as of 2026-08-30T08:39:29.467469+00:00.
