Skip to content
@hispark-rs

hispark-rs

hispark-rs

Bare-metal Rust + QEMU for HiSilicon RISC-V SoCs — develop without the hardware

A from-scratch embedded ecosystem for the HiSilicon WS63 (Wi-Fi 6 + BLE + SLE/NearLink) and BS2X / BS21 (BLE 5.4 + SLE, no Wi-Fi) RISC-V chips: peripheral-access crates, a safe HAL, a runtime, a custom Rust toolchain, full-system QEMU machine models, probe-rs debug support, and vendor-SDK forks — all built and CI-tested entirely in emulation.

Monorepo · Toolchain · QEMU · Showcase


The stack

            ws63-svd / bs2x-svd   (CMSIS-SVD register descriptions)
                     │  svd2rust
                     ▼
            ws63-pac / bs2x-pac   (peripheral-access crates: raw RegisterBlocks)
                     │
                     ▼
            hisi-riscv-hal        (safe embedded-hal 1.0 drivers + async/embassy)
                     │
   hisi-riscv-rt ────┤            (startup, linker scripts, interrupt vectors)
                     ▼
            ws63-examples         (blinky, uart_hello, dma, spi, i2c, embassy, net_ping, …)
                     │  cargo build (riscv32imfc, custom `ws63` toolchain)
                     ▼
   hisi-riscv-qemu  ◀── runs the firmware with no board:  -M ws63 / -M bs21 / -M bs22 / -M bs20
   probe-rs (fork)  ◀── on-chip debugging (RISC-V Debug Module behind a CoreSight DAP)

Repositories

Repo What it is
hisi-riscv-rs The monorepo — aggregates the whole stack as submodules + docs + ROADMAP
ws63-pac · bs2x-pac svd2rust-generated peripheral-access crates
ws63-svd · bs2x-svd CMSIS-SVD sources (the PAC generation inputs)
hisi-riscv-hal Hand-written safe HAL — GPIO/UART/SPI/I2C/DMA/timers/… + async/embassy
hisi-riscv-rt Runtime: startup assembly, linker scripts, interrupt vectors
hisi-riscv-qemu QEMU machine models (-M ws63/bs21/bs22/bs20) — runs the firmware without silicon
ws63-rust-toolchain Stable rustc with the riscv32imfc-unknown-none-elf target baked in as a builtin
riscv32-ws63-gcc730-toolchain GCC 7.3.0 cross-toolchain for the WS63
ws63-examples Example applications
ws63-guide · bs2x-guide Chip user guides (Sphinx)
probe-rs Fork adding WS63 debug support (mem-AP DTM, vendor DebugSequence, flash algorithm)
hisiflash Firmware flashing tool
fbb_ws63-qemu · fbb_bs2x-qemu QEMU-runnable forks of the vendor C SDKs

Status

  • Full QEMU bring-upblinky + uart_hello and the whole peripheral set boot and self-validate on -M ws63 and on the BS2X family (-M bs21 / bs22 / bs20).
  • BS2X multi-chip — BS21/BS22/BS20 machines; every functional peripheral (SPI, GADC, I²C, KEYSCAN, QDEC, RTC, TRNG, WDT, DMA, PDM, USB) exercised on QEMU.
  • probe-rs WS63 support (software-complete) — RISC-V-over-CoreSight DTM, vendor debug sequence, and a flash-algorithm crate; pending on-silicon validation.
  • 🟡 Hardware-in-the-loop — scaffolding ready; awaiting a board to validate clock/timing.
  • 🔴 Connectivity (Wi-Fi / BLE / SLE) — the north star; deferred behind HIL (the radio is a closed analog/PHY blob — see the connectivity-feasibility notes).

Quick start

git clone --recursive https://github.com/hispark-rs/hisi-riscv-rs
cd hisi-riscv-rs
# install the custom toolchain (see ws63-rust-toolchain), then:
cargo build                      # libraries + blinky for riscv32imfc
# run it with no hardware (see hisi-riscv-qemu):
qemu-system-riscv32 -M ws63 -nographic -kernel target/.../uart_hello
Reverse-engineered from the public HiSilicon fbb_ws63 / fbb_bs2x SDKs. Not affiliated with HiSilicon.

Popular repositories Loading

  1. riscv32-ws63-gcc730-toolchain riscv32-ws63-gcc730-toolchain Public

    Shell 4 1

  2. hisiflash hisiflash Public

    Rust 2

  3. ws63-svd ws63-svd Public

    Python 2

  4. hisi-riscv-rs hisi-riscv-rs Public

    Rust 2 1

  5. hisi-riscv-rust-toolchain hisi-riscv-rust-toolchain Public

    Build a stable rustc with the HiSilicon WS63 target riscv32imfc-unknown-none-elf (RV32IMFC hard-float ilp32f, no atomics) baked in as a builtin

    Shell 1

  6. hisi-rs-template hisi-rs-template Public

    cargo-generate template for bare-metal Rust on HiSilicon WS63 / BS2X (BS21/BS20) RISC-V — blinky / uart_hello / embassy starters

    Rust 1

Repositories

Showing 10 of 29 repositories

People

This organization has no public members. You must be a member to see who’s a part of this organization.

Top languages

Loading…

Most used topics

Loading…