bouffalolab/bouffalo_sdk
Über uns
BouffaloSDK ist ein vom Bouffalo-Lab-Team bereitgestelltes Software Development Kit für IoT und MCUs. Es unterstützt alle Chipserien von Bouffalo und vereint bl_mcu_sdk und bl_iot_sdk.
EntwicklerwerkzeugeWhat you can do
- One SDK for all chips. BL602, BL702/BL702L, BL616C/CL and BL618M/BL618DG share the same tree, build system and examples.
- One peripheral API. LHAL gives GPIO, UART, SPI, I2C, DMA, ADC, USB, crypto and other peripherals the same API on every chip, and is easy to port to other platforms.
- Wireless stacks included. Wi-Fi 4, Wi-Fi 6, Bluetooth / BLE, Zigbee, Thread and Matter.
- Common middleware ready to use. FreeRTOS, lwIP, mbedTLS, LVGL 8/9, CherryUSB, FatFS, LittleFS, OpenAMP, WAMR (WebAssembly) and more.
Gemessener Sternzuwachs
- in 24h
- +1
- in 7 days
- +5
- in 15 days
- +6
- in 1 month
- Verlauf wird gesammelt
Nettoänderungen in überlappenden Zeiträumen, keine Tagessummen. Fehlende Messwerte bleiben leer. Sterne zeigen Interesse, nicht Qualität.
README.md
OriginalBouffalo SDK
The official IoT and MCU SDK for every Bouffalo Lab RISC-V chip
Wi-Fi 4 / Wi-Fi 6 · Bluetooth LE · Zigbee · Thread · Matter
Quick Start · Documentation · Examples · Changelog · Forum · 中文
Bouffalo SDK builds firmware for all Bouffalo Lab chips from one source tree. It merges the former bl_mcu_sdk and bl_iot_sdk: one build system, one toolchain, and one peripheral driver API across the BL602, BL702, BL616 and BL618 families.
Highlights
- One SDK for all chips. BL602, BL702/BL702L, BL616C/CL and BL618M/BL618DG share the same tree, build system and examples.
- One peripheral API. LHAL gives GPIO, UART, SPI, I2C, DMA, ADC, USB, crypto and other peripherals the same API on every chip, and is easy to port to other platforms.
- Wireless stacks included. Wi-Fi 4, Wi-Fi 6, Bluetooth / BLE, Zigbee, Thread and Matter.
- Common middleware ready to use. FreeRTOS, lwIP, mbedTLS, LVGL 8/9, CherryUSB, FatFS, LittleFS, OpenAMP, WAMR (WebAssembly) and more.
- Simple build. CMake with Make or Ninja, Kconfig
menuconfig, and a single GCC 14.3 toolchain for Windows, Linux and macOS. - Flashing and debugging tools. Flash Cube GUI/CLI flasher and CKLink debugging.
Architecture
Supported Chips
| Chip | CHIP |
BOARD |
Wireless |
|---|---|---|---|
| BL602 | bl602 |
bl602dk |
Wi-Fi 4, BLE, Matter |
| BL702 | bl702 |
bl702dk |
Zigbee, Thread, Matter |
| BL702L / BL704L | bl702l |
bl702ldk |
Zigbee, Thread, Matter |
| BL616C | bl616 |
bl616dk |
Wi-Fi 6, BT, BLE, Zigbee, Thread, Matter |
| BL616CL | bl616cl |
bl616cldk |
Wi-Fi 6, BT, BLE, Zigbee, Thread, Matter |
| BL618M / BL618DG | bl618dg |
bl618dgdk |
Wi-Fi 6, BT, BLE, Zigbee, Thread, Matter (not tested) |
The CHIP and BOARD values stay unchanged from earlier releases. BL618M/BL618DG is a multi-core chip; select the core with CPU_ID=ap (default) or CPU_ID=np.
Wireless support matrix
✅ supported · ⚠️ supported but not tested · ❌ not supported · — not available on this chip
| Protocol | BL602 | BL702/BL702L/BL704L | BL616C/CL | BL618M/BL618DG |
|---|---|---|---|---|
| Wi-Fi 4 | ✅ | — | — | — |
| Wi-Fi 6 | — | — | ✅ | ✅ |
| BT | — | — | ✅ | ✅ |
| BLE | ✅ | ❌ | ✅ | ✅ |
| Zigbee | — | ✅ | ✅ | ✅ |
| Thread | — | ✅ | ✅ | ✅ |
| Matter | ✅ | ✅ | ✅ | ⚠️ |
LHAL peripheral support matrix
✅ supported · ⚠️ supported but not tested · ❌ not supported · — not available on this chip
| Peripheral | BL602 | BL702/BL702L/BL704L | BL616C/CL | BL618M/BL618DG |
|---|---|---|---|---|
| ADC | ⚠️ | ✅ | ✅ | ✅ |
| CAM | — | ✅ | ✅ | ✅ |
| CKS | ⚠️ | ✅ | ✅ | ✅ |
| CSI | — | — | — | — |
| DAC | ⚠️ | ✅ | ✅ | ✅ |
| DMA | ⚠️ | ✅ | ✅ | ✅ |
| EFUSE | ❌ | ✅ | ✅ | ✅ |
| EMAC | — | ✅ | ✅ | ✅ |
| FLASH | ✅ | ✅ | ✅ | ✅ |
| GPIO | ⚠️ | ✅ | ✅ | ✅ |
| I2C | ⚠️ | ✅ | ✅ | ✅ |
| I2S | ⚠️ | ⚠️ | ✅ | ✅ |
| IR | ⚠️ | ✅ | ✅ | ✅ |
| MJPEG | ❌ | ❌ | ✅ | ✅ |
| PWM_v1 | ⚠️ | ✅ | — | — |
| PWM_v2 | — | — | ✅ | ✅ |
| RTC | ⚠️ | ✅ | ✅ | ✅ |
| SEC_AES | ⚠️ | ✅ | ✅ | ✅ |
| SEC_SHA | ⚠️ | ✅ | ✅ | ✅ |
| SEC_TRNG | ⚠️ | ✅ | ✅ | ✅ |
| SEC_PKA | ⚠️ | ✅ | ✅ | ✅ |
| SPI | ⚠️ | ✅ | ✅ | ✅ |
| TIMER | ⚠️ | ✅ | ✅ | ✅ |
| UART | ✅ | ✅ | ✅ | ✅ |
| USB_v1 | — | ✅ | — | — |
| USB_v2 | — | — | ✅ | ✅ |
| WDG | ⚠️ | ✅ | ✅ | ✅ |
Quick Start
1. Get the source
git clone https://github.com/bouffalolab/bouffalo_sdk.git
# Mirror for users in China:
# git clone https://gitee.com/bouffalolab/bouffalo_sdk.git
[!NOTE] Since v2.3.37 the repository uses a compact Git history so that clones and pulls are faster. To join it with the full history up to v2.3.36, run:
git replace -f --graft 'v2.3.37-history-base^{}' 'v2.3.36^{}'
2. Install the toolchain
Download the GCC 14.3 toolchain for your OS (Windows, Linux x86_64 / arm64, macOS arm64) from GitHub or Gitee, then add its bin directory to PATH. You also need make or ninja; Windows builds of both are included in tools/make and tools/ninja.
riscv64-unknown-elf-gcc --version # check that the toolchain is on PATH
The full guide is in Environment Setup.
3. Build an example
Every example directory contains a main.c and a Makefile. Pick CHIP and BOARD from Supported Chips:
cd examples/helloworld
make CHIP=bl616 BOARD=bl616dk # or: make ninja CHIP=bl616 BOARD=bl616dk
For the multi-core BL618M/BL618DG, build each core separately:
cd examples/bl618dg_dualcore
make CHIP=bl618dg BOARD=bl618dgdk CPU_ID=ap # AP core
make CHIP=bl618dg BOARD=bl618dgdk CPU_ID=np # NP core
[!IMPORTANT] Always pass
CHIPandBOARD. Without them the build defaults toCHIP=bl616 BOARD=bl616dkand does not warn you.
Other useful targets:
make menuconfig CHIP=bl616 BOARD=bl616dk # change Kconfig options
make clean # remove the build directory
4. Flash the firmware
make flash CHIP=bl616 COMX=/dev/ttyUSB0 # Windows: COMX=COM5
On Linux, add your user to the dialout group to access serial ports without sudo, then log out and back in:
sudo usermod -aG dialout $USER
Maximum flashing baud rate by USB-to-serial chip
When flashing over a serial port rather than USB, keep the baud rate within what your USB-to-serial chip supports.
| USB-to-serial chip | Max baud rate |
|---|---|
| CH340 | 500K |
| CP2102 | 2M |
| FT232 | 2M |
| BL702 | 8M |
| BL616 | 10M |
For the graphical flasher, see the Flash Cube User Guide.
Debugging
Debugging is supported with CKLink. See the Debug Guide; CKLink firmware is in tools/cklink_firmware.
Repository Layout
bouffalo_sdk/
├── bsp/
│ ├── board/ # Board init: clock, pinmux, memory heap, console
│ └── common/ # Common board drivers (LCD, image sensors, ...)
├── cmake/ # CMake build scripts
├── components/ # Middleware, wireless stacks, RTOS, file systems, graphics
├── docs/ # Quick start, API reference and demo docs
├── drivers/
│ ├── lhal/ # Common peripheral drivers for all chips
│ ├── soc/ # Chip-specific drivers
│ ├── rfparam/ # RF parameters
│ └── sys/ # System drivers
├── examples/ # Official examples
├── tests/ # Unit tests
└── tools/ # Flashing, debugging and build tools
Documentation and Resources
| Resource | Link |
|---|---|
| SDK documentation: API reference, peripheral demos (Chinese) | bl-mcu-sdk.readthedocs.io |
| Chip reference manuals and datasheets | bouffalolab/bl_docs |
| Supported LCD panels | bsp/common/display |
| Supported camera sensors | bsp/common/image_sensor |
| Release notes | CHANGELOG.md |
| Developer forum | bbs.bouffalolab.com |
Third-party Components
Software bill of materials (SBOM)
Contributing
Bug reports and pull requests are welcome. Please search the existing issues before you open a new one, and include the chip, board, SDK version and build log in your report. For usage questions, the forum usually gets a faster answer.
License
Bouffalo SDK is released under the Apache License 2.0. Third-party components keep their own licenses; see Third-party Components.
Ähnliche Projekte entdecken
Wird geladen…