#risc-v #wch #ch32v #qingke

no-std qingke-rt

为WCH的RISC-V MCU提供的最小运行时/启动程序,由ch32-rs团队管理

8个版本

0.2.1 2024年5月14日
0.2.0 2024年5月11日
0.1.12 2024年5月9日
0.1.11 2024年4月28日
0.1.7 2024年1月1日

1899嵌入式开发 中排名

Download history 1/week @ 2024-04-09 129/week @ 2024-04-16 145/week @ 2024-04-23 53/week @ 2024-04-30 322/week @ 2024-05-07 199/week @ 2024-05-14 37/week @ 2024-05-21 33/week @ 2024-05-28 13/week @ 2024-06-04 10/week @ 2024-06-11 8/week @ 2024-06-18 4/week @ 2024-06-25 75/week @ 2024-07-02 32/week @ 2024-07-23

每月 下载 108
用于 ch58x-hal

MIT/Apache

37KB
892 代码行

qingke-rt

由于名称不适用于发布,因此替换了 ch32v-rt

QingKe是RISC-V核心的名称。

用法

#[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() {
    // ...
}

// Interrupt provided by the IP core (not peripherals)
#[qingke_rt::interrupt(core)]
fn SysTick() {
    // ...
}

#[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.
}

lib.rs:

与riscv-rt版本的差异

  • 异常处理器的结构不同
  • 核心中断处理器的结构不同
  • 支持硬件堆栈推送,因此无需手动推送

依赖项

~1.5MB
~39K SLoC