#wch #ch32v #qingke

macro no-std qingke-rt-macros

Macros re-exported in qingke-rt

12 releases

Uses new Rust 2024

0.6.1 Dec 8, 2025
0.5.0 Nov 3, 2024
0.2.1 May 14, 2024
0.1.9 Mar 27, 2024

#4 in #ch32v

Download history 347/week @ 2025-12-06 99/week @ 2025-12-13 67/week @ 2025-12-20 43/week @ 2025-12-27 50/week @ 2026-01-03 65/week @ 2026-01-10 112/week @ 2026-01-17 118/week @ 2026-01-24 157/week @ 2026-01-31 74/week @ 2026-02-07 37/week @ 2026-02-14 108/week @ 2026-02-21 94/week @ 2026-02-28 72/week @ 2026-03-07 258/week @ 2026-03-14 134/week @ 2026-03-21

564 downloads per month
Used in 4 crates (via qingke-rt)

MIT/Apache

10KB
188 lines

qingke & qingke-rt

Crates.io Crates.io docs.rs

Low level access to WCH's QingKe RISC-V processors.

qingke-rt

This crate provides the runtime support for QingKe RISC-V processors.

This provides riscv/riscv-rt like functionality, with the following differences:

  • Use vector table for interrupt handling
  • Handle 1KB address alignment for the entry point(Qingke V2)
  • In-SRAM code executing, highcode handling
  • PFIC support
  • Conflicts with riscv-rt crate

Usage

#[qingke_rt::entry]
fn main() -> ! {
    loop {}
}

// Or if you are using the embassy framework
#[embassy_executor::main(entry = "qingke_rt::entry")]
async fn main(spawner: Spawner) -> ! { ... }

#[qingke_rt::interrupt]
fn UART0() {
    // ...
}

#[qingke_rt::highcode]
fn some_highcode_fn() {
    // ...
    // This fn will be loaded into the highcode(SRAM) section.
    // This is required for BLE, recommended for interrupt handles.
}

Dependencies

~1.5MB
~40K SLoC