The Baochip-1x is a 22nm RISC-V SoC designed by legandary hardware hacker bunnie Huang. It features an MMU, hardware cryptography (AES, SHA-256, TRNG), 2.5 MB of on-chip ReRAM, and a quad-core 700 MHz BIO coprocessor for programmable I/O. The Dabao evaluation board puts this chip on a Pico-form-factor dev board that is currently available through Crowd Supply. I wrote a bare metal C SDK for it. As far as I know, this is the first pure C HAL for the Baochip-1x. No Rust toolchain, no FFI layer, no dependencies beyond a standard RISC-V GCC cross-compiler. You write C, you call main(), you talk to hardware.
The SDK is open source under Apache 2.0 and available on GitHub: ArmstrongSubero/dabao-sdk
What the SDK Covers
The SDK ships with 17 peripheral drivers and 25 working examples, all tested on real hardware. The driver list covers GPIO, UART, SPI, I2C, PWM, ADC, timers (four different timer subsystems), interrupts, the BIO coprocessor, BIO DMA, RRAM, hardware AES, SHA-256, TRNG, watchdog, RTC, QSPI, and external W25Q NOR flash.
All peripheral drivers use the UDMA DMA engine for data transfers. UART, SPI, and I2C all have both blocking and async (non-blocking) APIs, so you can kick off a transfer and do other work while the DMA engine handles the bytes. The BIO coprocessor gives you four PicoRV32 cores running at 700 MHz for custom protocols, high-speed bit-banging, or memory-to-memory DMA.
Every example compiles and runs. Blink, button input, UART hello world, SPI digital potentiometer control, I2C accelerometer reads, ADC sampling, timer interrupts, BIO square wave generation, RRAM non-volatile storage, AES encrypt/decrypt round-trips with NIST test vectors, SHA-256 hash verification, hardware random number generation, SD card file I/O via FatFS, and external QSPI flash operations.
Design Philosophy
The API is intentionally Pico-style. If you have written C for the Raspberry Pi Pico, you will feel at home. A single program runs on the device at a time, starting with main(). Register definition headers are included so you can drop down to raw hardware access when you need to. The goal is simple but powerful: high-level enough for rapid development, low-level enough that the hardware is never hidden from you.
Build and flash is a single command:
bao_flash run COM9 blinkSilicon Bugs Found
During development I found three RTL bugs in the SDIO peripheral (response timeout, clock gating, output enable). The SDK works around these by using SPI mode for SD cards instead. I also documented that the MDMA (PL230) DMA controller is not writable from bare metal, that the PLL fractional divider is broken (integer-only from the 48 MHz crystal, giving 99 MHz perclk instead of 100 MHz), and several other hardware quirks that will save you time if you are bringing up your own code on this chip.
These are all documented in the repo README under "Known Hardware Quirks."
Why Bare Metal C?
The Baochip-1x is a new chip on a new architecture. The people who will be building on it first are embedded engineers who think in registers, DMA channels, and interrupt vectors. They need a C HAL they can read top to bottom. C is the lingua franca of embedded development. A pure C SDK with no external dependencies means anyone with a RISC-V GCC cross-compiler can clone the repo and start building. That is the lowest possible barrier to entry for a new chip, and that matters when you are trying to bootstrap an ecosystem.
Getting Started
Clone the repo, drop in the xpack RISC-V GCC toolchain, and build:
git clone https://github.com/ArmstrongSubero/dabao-sdk.git
cd dabao-sdk
bao_flash build blink
bao_flash flash COM9 blink
Full setup instructions, pin maps, clock tree documentation, and all 25 examples are in the README.
If you are working with the Dabao board or planning to, I hope this saves you some time.
Armstrong Subero is an embedded systems engineer and published author with Apress/Springer. He builds the Rovari RISC-V education platform from Trinidad and Tobago.