• Home
  • Annotate
  • current directory
Name Date Size #Lines LOC

..21-Aug-2025-

builtin_imgs/21-Aug-2025-

config/21-Aug-2025-

d0/21-Aug-2025-

figures/21-Aug-2025-

lp/21-Aug-2025-

m0/21-Aug-2025-

tools/21-Aug-2025-

README.md A D21-Aug-20256.8 KiB15890

README_en.md A D21-Aug-20257.9 KiB15589

build_bl808_all.sh A D21-Aug-202558 73

flash_prog_cfg.ini A D21-Aug-2025445 2116

README.md

1[English](README_en.md) | **中文**
2# 博流智能 BL808板级支持包说明
3
4## 1. 简介
5
6BL808 是高度集成的 AIoT 芯片组,具有 Wi-Fi/BT/BLE/Zigbee 等无线互联单元,包含多个 CPU 以及音频编码译码器、视频编码译码器和 AI 硬件加速器,适用于各种高性能和低功耗应用领域。
7
8BL808 系列芯片主要包含无线和多媒体两个子系统。
9
10无线子系统包含一颗 RISC-V 32-bit 高性能 CPU(m0),集成 Wi-Fi/BT/Zigbee 无线子系统,可以实现多种无线连接和数据传输,提供多样化的连接与传输体验。
11多媒体子系统包含一颗 RISC-V 64-bit 超高性能 CPU(d0),集成 DVP/CSI/ H264/NPU 等视频处理模块,可以广泛应用于视频监控/智能音箱等多种 AI 领域
12
13多媒体子系统组成部分如下:
14
15- NPU HW NN 协处理器 (BLAI-100),适用于人工智能应用领域
16- 摄像头接口
17- 音频编码译码器
18- 视频编码解码器
19- 传感器
20- 显示接口
21
22电源管理单元控制低功耗模式。此外,还支持各种安全功能。
23
24外围接口包括 USB2.0、 Ethernet、 SD/MMC、 SPI、 UART、 I2C、 I2S、 PWM、 GPDAC/GPADC、 ACOMP、 PIR、 Touch、
25IR remote、 Display 和 GPIO。
26
27支持灵活的 GPIO 配置, BL808 最多可达 40 个 GPIO。
28
29芯片规格包括如下:
30
31| 硬件 | 描述 |
32| -- | -- |
33|芯片型号| bl808 |
34|CPU| 三核异构RISC-V CPUs: <br />RV64GCV 480MHz<br/>RV32GCP 320MHz<br/>RV32EMC 160MHz |
35|RAM| 768KB SRAM + 64MB UHS PSRAM |
36| 外设 | 内嵌AES与SHA256算法加速器 |
37| AI NN 通用硬件加速器 | BLAI-100 用于视频/音频检测/识别,100GOPS 算力 |
38| 摄像头接口 | DVP 和 MIPI-CSI |
39| 显示接口 | SPI、DBI、DPI(RGB) |
40| 无线 | 支持 Wi-Fi 802.11 b/g/n<br/>支持 Bluetooth 5.x Dual-mode(BT+BLE)<br/>支持 Wi-Fi / 蓝牙 共存 |
41
42
43
44## 2. RT-Thread 版本
45
46BL808是三核异构架构,分别为m0、lp、d0,当前bsp已实现三核同时启动,三核分别采用了不同的RT-Thread版本
47
48| 名称 | CPU核 | RT-Thread版本    |
49| ---- | ----- | ---------------- |
50| M0   | E907  | RT-Thread 标准版 |
51| LP   | E902  | RT-Thread Nano   |
52| D0   | C906  | RT-SMART         |
53
54
55
56
57## 3.  编译说明
58
59BL808是三核异构架构,分别为m0、lp、d0,三核需要单独编译,并烧录到对应的位置。
60
61烧录地址:
62
63| 名称 | CPU核 | 烧录地址 | 说明                                                         |
64| ---- | ----- | -------- | ------------------------------------------------------------ |
65| M0   | E907  | 0x00000  |                                                              |
66| LP   | E902  | 0xC0000  | 调整lp烧录地址需修改<br>`bsp/bouffalo_lab/bl808/lp/board/linker_scripts/bl808_flash_lp.ld`中的xip_memory地址<br>`bsp/bouffalo_lab/bl808/m0/board/board.h`中`CONFIG_LP_FLASH_ADDR`地址 |
67| D0   | C906  | 0x100000 | 在spl文件中设定,调整d0烧录地址需重新编译spl文件及打包文件`bsp/bouffalo_lab/bl808/d0/merge_rtsmart.py` |
68
69
70
71### 3.1.  m0/lp
72
73- #### 工具链下载
74
75
76下载risc-v的工具链,[下载地址1](https://occ.t-head.cn/community/download?id=4073475960903634944)或[下载地址2](https://dl.sipeed.com/shareURL/others/toolchain)
77
78Windows下请使用使用[env工具][1],使用命令 `tar -xvf Xuantie-900-gcc-elf-newlib-mingw-V2.6.1-20220906.tar.gz` 解压交叉编译器,使用Windows下解压工具直接解压可能出现Windows下编译错误。
79
80在`rtconfig.py`中将risc-v工具链的本地路径加入 `EXEC_PATH` 或通过 `RTT_EXEC_PATH` 环境变量指定路径
81
82Windows:
83```
84set RTT_EXEC_PATH=C:\Users\xxxx\Downloads\Xuantie-900-gcc-elf-newlib-x86_64-V2.6.1\bin
85```
86
87Linux:
88```
89export RTT_EXEC_PATH=/opt/Xuantie-900-gcc-elf-newlib-x86_64-V2.6.1/bin
90```
91
92- ### 编译
93
94Windows下推荐使用[env工具][1],在console下进入bsp/bl808目录中,选择需要编译的核心,m0或lp,运行:
95
96    cd bsp/bl808/m0
97    menuconfig
98    pkgs --update
99
100如果在Linux平台下,可以先执行:
101
102    scons --menuconfig
103
104它会自动下载env相关脚本到~/.env目录,然后执行
105
106    source ~/.env/env.sh
107
108    cd bsp/bl808/m0
109    pkgs --update
110
111更新完软件包后,执行 `scons -j10` 或 `scons -j10 --verbose` 来编译这个板级支持包。或者通过 `scons --exec-path="GCC工具链路径"` 命令,在指定工具链位置的同时直接编译。
112
113如果编译正确无误,会产生rtthread.elfrtthread_m0.bin文件。其中rtthread_m0.bin需要烧写到设备中进行运行。
114
115
116
117- #### 注意
118
119  由于BL808为三核异构,lp核、d0核都是通过m0核启动的,必须正确烧录m0核才可以实现三核正常运行
120
121  m0烧录配置文件:`bsp/bouffalo_lab/bl808/m0/flash_prog_cfg.ini`
122
123
124
125### 3.2. d0
126
127bl808-d0运行在S态下,支持RT-Smart,采用的交叉编译器为`riscv64-unknown-linux-musl-gcc`,编译请参考[构建内核镜像](https://www.rt-thread.org/document/site/#/rt-thread-version/rt-thread-smart/quick-start/qemu-linux/quickstart?id=%e6%9e%84%e5%bb%ba%e5%86%85%e6%a0%b8%e9%95%9c%e5%83%8f)
128
129其中内核虚拟地址开始地址为`0x50000000`
130
131![kernel_start](figures/kernel_start.png)
132
133bl808-d0编译完成后通过`merge_rtsmart.py`脚本,将`hw.dtb.5M`,`spl_bl808_d0.bin`,`opensbi_v0.6.bin`与`rtthread_d0.bin`,合成最终烧录文件`whole_img_d0.bin`,烧录地址为`0x100000`,否则无法启动。
134
135预编译bin文件位于`bsp/bouffalo_lab/bl808/d0/pre_build_bin`文件夹下,如有修改需求可下载[Low-Starup-BL808](https://github.com/flyingcys/Low-Starup-BL808)后自行修改。
136
137d0单独烧录文件为`bsp/bouffalo_lab/bl808/d0/flash_prog_cfg.ini`
138
139![d0](figures/d0.png)
140
141
142
143### 3.3. 三核同时编译与烧录
144
145- 可运行`bsp/bouffalo_lab/bl808/build_bl808_all.sh`依次编译m0、lp、d0核
146- 可通过`bsp/bouffalo_lab/bl808/flash_prog_cfg.ini`烧录配置文件,同时烧录m0、lp、d0核。
147
148![bl808](figures/bl808.png)
149
150
151
152## 4. FAQ
153
154- 在 windows 环境下,通过 UART 接口将开发板连接至电脑时,仅能识别到两个 USB converter 设备,但是识别不到对应的串口设备。
155  - 进入到设备管理器中,右击对应的 USB converter 设备,进入到属性中的高级设置,钩选 vcp 选项,刷新后即可看到对应的串口设备。
156  - 也可通过安装以下驱动解决问题: https://dl.sipeed.com/shareURL/MAIX/tools/ftdi_vcp_driver
157- 使用 TypeC 数据线将电脑与板子的 UART 口连接起来,此时电脑上会出现两个串口 (如果出现鼠标不能动的现象请拔掉 USB 并且查看 [更新板载 bl702 固件](https://wiki.sipeed.com/hardware/zh/maix/m1s/other/start.html#给板载-bl702-进行烧录) 相关内容来修复问题)。
158

README_en.md

1**English** | [中文](README.md)
2# BL808 Board Support Package Documentation
3
4## 1. Introduction
5
6BL808 is a highly integrated AIoT chip with wireless connectivity units such as Wi-Fi/BT/BLE/Zigbee, multiple CPUs, audio and video codec, and AI hardware accelerator. It is suitable for various high-performance and low-power applications.
7
8The BL808 chip consists of two subsystems: wireless and multimedia.
9
10The wireless subsystem includes a RISC-V 32-bit high-performance CPU (m0) and integrated Wi-Fi/BT/Zigbee wireless subsystem, which enables various wireless connections and data transmission for diverse connectivity and user experiences.
11The multimedia subsystem includes a RISC-V 64-bit ultra-high-performance CPU (d0) and integrated DVP/CSI/H264/NPU video processing modules, which can be widely used in video surveillance, smart speakers, and other AI applications.
12
13The components of the multimedia subsystem include:
14
15- NPU HW NN co-processor (BLAI-100) for AI applications
16- Camera interface
17- Audio codec
18- Video codec
19- Sensors
20- Display interface
21
22The power management unit controls the low-power mode. It also supports various security features.
23
24Peripheral interfaces include USB2.0, Ethernet, SD/MMC, SPI, UART, I2C, I2S, PWM, GPDAC/GPADC, ACOMP, PIR, Touch, IR remote, Display, and GPIO.
25
26It supports flexible GPIO configuration, with a maximum of 40 GPIO pins.
27
28The chip specifications are as follows:
29
30| Hardware | Description                           |
31| -------- | ------------------------------------- |
32| Chip Model | bl808                                 |
33| CPU        | Three-core heterogeneous RISC-V CPUs: <br />RV64GCV 480MHz<br />RV32GCP 320MHz<br />RV32EMC 160MHz |
34| RAM        | 768KB SRAM + 64MB UHS PSRAM           |
35| Peripherals | Built-in AES and SHA256 algorithm accelerators |
36| AI NN general hardware accelerator | BLAI-100 for video/audio detection/recognition, 100GOPS computational power |
37| Camera Interface | DVP and MIPI-CSI                        |
38| Display Interface | SPI, DBI, DPI (RGB)                   |
39| Wireless | Supports Wi-Fi 802.11 b/g/n<br />Supports Bluetooth 5.x Dual-mode (BT+BLE)<br />Supports Wi-Fi/Bluetooth coexistence |
40
41
42
43## 2. RT-Thread Versions
44
45BL808 is a three-core heterogeneous architecture, including m0, lp, and d0 cores. The current BSP supports all three cores running simultaneously and uses different RT-Thread versions for each core.
46
47| Name        | Core  | RT-Thread Version |
48| ----------- | ----- | ---------------- |
49| M0          | E907  | RT-Thread Standard Edition |
50| LP          | E902  | RT-Thread Nano   |
51| D0          | C906  | RT-SMART         |
52
53
54
55
56## 3. Compilation Instructions
57
58BL808 is a three-core heterogeneous architecture, including m0, lp, and d0 cores. Each core needs to be compiled separately and burned to the corresponding location.
59
60Flashing addresses:
61
62| Name | Core  | Flash Address | Description                                                  |
63| ---- | ----- | ------------- | ------------------------------------------------------------ |
64| M0   | E907  | 0x00000       |                                                              |
65| LP   | E902  | 0xC0000       | Modify the lp flash address in `bsp/bouffalo_lab/bl808/lp/board/linker_scripts/bl808_flash_lp.ld` and `bsp/bouffalo_lab/bl808/m0/board/board.h` `CONFIG_LP_FLASH_ADDR` address |
66| D0   | C906  | 0x100000      | Set in the SPL file. To adjust the d0 flash address, the SPL file and the packaged file `bsp/bouffalo_lab/bl808/d0/merge_rtsmart.py` need to be recompiled |
67
68
69
70### 3.1. m0/lp
71
72- #### Toolchain Download
73
74Download the RISC-V toolchain from [Download Link 1](https://occ.t-head.cn/community/download?id=4073475960903634944) or [Download Link 2](https://dl.sipeed.com/shareURL/others/toolchain).
75
76For Windows, use the [env tool][1] and extract the cross-compiler with the command `tar -xvf Xuantie-900-gcc-elf-newlib-mingw-V2.6.1-20220906.tar.gz`. Extracting the cross-compiler directly with Windows tools may cause compilation errors on Windows.
77
78Add the path of the RISC-V toolchain to `EXEC_PATH` in `rtconfig.py` or specify the path using the `RTT_EXEC_PATH` environment variable.
79
80Windows:
81```
82set RTT_EXEC_PATH=C:\Users\xxxx\Downloads\Xuantie-900-gcc-elf-newlib-x86_64-V2.6.1\bin
83```
84
85Linux:
86```
87export RTT_EXEC_PATH=/opt/Xuantie-900-gcc-elf-newlib-x86_64-V2.6.1/bin
88```
89
90- ### Compilation
91
92For Windows, it is recommended to use the [env tool][1]. Open the console and navigate to the bsp/bl808 directory, then select the core, m0 or lp, and run:
93
94    cd bsp/bl808/m0
95    menuconfig
96    pkgs --update
97
98If you are using Linux, you can execute:
99
100    scons --menuconfig
101
102It will automatically download the env-related scripts to the ~/.env directory, then execute:
103
104    source ~/.env/env.sh
105
106    cd bsp/bl808/m0
107    pkgs --update
108
109After updating the software packages, use the command `scons -j10` or `scons -j10 --verbose` to compile the board support package. Alternatively, you can use the `scons --exec-path="GCC toolchain path"` command to specify the toolchain path and compile at the same time.
110
111If the compilation is successful, the rtthread.elf and rtthread_m0.bin files will be generated. The rtthread_m0.bin file needs to be burned into the device for execution.
112
113
114
115- #### Note
116
117  Since BL808 is a three-core heterogeneous architecture, the lp and d0 cores are started through the m0 core. It is necessary to burn the m0 core correctly to enable all three cores to run properly.
118
119  Configuration file for m0 flashing: `bsp/bouffalo_lab/bl808/m0/flash_prog_cfg.ini`
120
121
122
123### 3.2. d0
124
125bl808-d0 runs in S-mode and supports RT-Smart. The cross-compiler used is `riscv64-unknown-linux-musl-gcc`. Please refer to the [Build Kernel Image](https://www.rt-thread.org/document/site/#/rt-thread-version/rt-thread-smart/quick-start/qemu-linux/quickstart?id=%e6%9e%84%e5%bb%ba%e5%86%85%e6%a0%b8%e9%95%9c%e5%83%8f) for compilation instructions.
126
127The starting address of the kernel virtual address is `0x50000000`.
128
129![kernel_start](figures/kernel_start.png)
130
131After the bl808-d0 is compiled, use the `merge_rtsmart.py` script to merge `hw.dtb.5M`, `spl_bl808_d0.bin`, `opensbi_v0.6.bin`, and `rtthread_d0.bin` into the final flash file `whole_img_d0.bin`, which should be burned at address `0x100000`. Otherwise, the board will not be able to start.
132
133The pre-compiled bin files are located in the `bsp/bouffalo_lab/bl808/d0/pre_build_bin` folder. If there are any modification requirements, you can download the [Low-Starup-BL808](https://github.com/flyingcys/Low-Starup-BL808) repository and modify it.
134
135The separate flashing file for d0 is `bsp/bouffalo_lab/bl808/d0/flash_prog_cfg.ini`.
136
137![d0](figures/d0.png)
138
139
140
141### 3.3. Compilation and Flashing of Three Cores Simultaneously
142
143- You can run `bsp/bouffalo_lab/bl808/build_bl808_all.sh` to compile m0, lp, d0 cores one by one.
144- You can use the `bsp/bouffalo_lab/bl808/flash_prog_cfg.ini` flashing configuration file to flash m0, lp, and d0 cores simultaneously.
145
146![bl808](figures/bl808.png)
147
148
149
150## 4. FAQ
151
152- In a Windows environment, when connecting the development board to the computer via the UART interface, only two USB converter devices are recognized, but the corresponding serial port device is not recognized.
153  - Go to Device Manager, right-click on the corresponding USB converter device, go to Properties, and in the Advanced Settings, check the vcp option. After refreshing, you will see the corresponding serial port device.
154  - Alternatively, you can install the following driver to solve the problem:  https://dl.sipeed.com/shareURL/MAIX/tools/ftdi_vcp_driver
155- When connecting the computer to the board's UART port using a TypeC data cable, two serial ports will appear on the computer (if the mouse cannot move, unplug the USB and check [Updating the board's bl702 firmware](https://wiki.sipeed.com/hardware/zh/maix/m1s/other/start.html) for a solution).