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

..21-Aug-2025-

bl60x/21-Aug-2025-

bl61x/21-Aug-2025-

bl70x/21-Aug-2025-

bl808/21-Aug-2025-

figures/21-Aug-2025-

libraries/21-Aug-2025-

.gitignore A D21-Aug-2025157 1010

README.md A D21-Aug-202511.2 KiB221134

README_en.md A D21-Aug-202512.2 KiB200126

bouffalo_flash_cube.sh A D21-Aug-20251.2 KiB6051

README.md

1[English](README_en.md) | **中文**
2# bouffalo_lab bsp
3
4## 1. 简介
5
6bouffalo_lab bsp针对bouffalo_lab的系列AIoT芯片,采用bouffalo_lab最新**LHAL** 驱动库,驱动库与[bouffalo_sdk](https://github.com/bouffalolab/bouffalo_sdk)(原bl_mcu_sdk)代码同步,当前commitid:`e6e8da79a50aeb4fcb67ac380c3bd8885cd56faf`
7
8目前支持以下芯片:
9
10|      | 芯片型号                 | 内核                                     |
11| ---- | :----------------------- | ---------------------------------------- |
12| 1    | bl60x(bl602/bl604)       | RISC-V SiFive E24                        |
13| 2    | bl70x(bl702/bl704/bl706) | RISC-V SiFive E24                        |
14| 3    | bl61x(bl616/bl618)       | RISC-V T-Head E907                       |
15| 4    | bl808                    | RISC-V T-Head E902(lp)+E907(m0)+C906(d0) |
16
17**LHAL** 是博流为统一通用外设接口而设计的驱动库,代码精炼并且支持博流所有系列芯片。
18
19|   外设   | BL602/BL604 | BL702/BL704/BL706 | BL616/BL618 | BL808 |
20| :------: | :---------: | :---------------: | :---------: | :---: |
21|   ADC    |      ○      |         √         |      √      |   ○   |
22|   CAM    |      -      |         ×         |      ×      |   ×   |
23|   CKS    |      ○      |         √         |      √      |   ○   |
24|   DAC    |      ○      |         √         |      √      |   ○   |
25|   DMA    |      ○      |         √         |      √      |   √   |
26|  EFUSE   |      ×      |         √         |      √      |   √   |
27|   EMAC   |      -      |         √         |      √      |   √   |
28|  FLASH   |      √      |         √         |      √      |   √   |
29|   GPIO   |      ○      |         √         |      √      |   √   |
30|   I2C    |      ○      |         √         |      √      |   ○   |
31|   I2S    |      ○      |         ○         |      √      |   ○   |
32|    IR    |      ○      |         √         |      √      |   ○   |
33|  MJPEG   |      ×      |         ×         |      √      |   √   |
34|  PWM_v1  |      ○      |         √         |      -      |   -   |
35|  PWM_v2  |      -      |         -         |      √      |   √   |
36|   RTC    |      ○      |         √         |      √      |   √   |
37| SEC_AES  |      ○      |         √         |      √      |   √   |
38| SEC_SHA  |      ○      |         √         |      √      |   √   |
39| SEC_TRNG |      ○      |         √         |      √      |   √   |
40| SEC_PKA  |      ○      |         √         |      √      |   √   |
41|   SPI    |      ○      |         √         |      √      |   √   |
42|  TIMER   |      ○      |         √         |      √      |   √   |
43|   UART   |      √      |         √         |      √      |   √   |
44|  USB_v1  |      -      |         √         |      -      |   -   |
45|  USB_v2  |      -      |         -         |      √      |   √   |
46|   WDG    |      ○      |         √         |      √      |   ○   |
47
48备注:**√** 表示已支持;**×** 表示未支持;**○** 表示已支持但未测试;**-** 表示没有该外设。
49
50
51
52## 2.  环境搭建及编译
53
54bl60x/bl70x/bl61x可在对应芯片直接编译;bl808是多核异构架构,分为m0、lp、d0,每个核需要单独编译并烧录到对应的位置,bl808三核使用详细参考[bl808三核使用指南](./bl808/README.md)。
55
56以下操作以单核bl61x为例,其他芯片操作类同。
57
58### 2.1. 下载
59
60请至对应下载链接下载芯片的工具链
61
62| 芯片型号    | 下载地址                                                     |
63| ----------- | ------------------------------------------------------------ |
64| bl60x/bl70x | [Linux](https://gitee.com/bouffalolab/toolchain_gcc_sifive_linux)/[windows](https://gitee.com/bouffalolab/toolchain_gcc_sifive_windows) |
65| bl61x/bl808 | [T-Head官网](https://occ.t-head.cn/community/download?id=4073475960903634944)或[Linux](https://gitee.com/bouffalolab/linuxtoolchain_gcc_t-head)/[windows](https://gitee.com/bouffalolab/toolchain_gcc_t-head_windows) |
66
67### 2.2. 设置
68
69Windows下请使用使用[env工具][1],使用命令 `tar -xvf Xuantie-900-gcc-elf-newlib-mingw-V2.6.1-20220906.tar.gz` 解压交叉编译器,使用Windows下解压工具直接解压可能出现Windows下编译错误。
70
71在`rtconfig.py`中将risc-v工具链的本地路径加入 `EXEC_PATH` 或通过 `RTT_EXEC_PATH` 环境变量指定路径
72
73Windows:
74
75```
76set RTT_EXEC_PATH=C:\Users\xxxx\Downloads\Xuantie-900-gcc-elf-newlib-x86_64-V2.6.1\bin
77```
78
79Linux:
80
81```
82export RTT_EXEC_PATH=/opt/Xuantie-900-gcc-elf-newlib-x86_64-V2.6.1/bin
83```
84
85### 2.3. 编译
86
87Windows下推荐使用[env工具][1],在console下进入bsp/bouffalo_lab/bl61x目录中,运行:
88
89    cd bsp/bouffalo_lab/bl61x
90    menuconfig
91    pkgs --update
92
93如果在Linux平台下,可以先执行:
94
95    scons --menuconfig
96
97它会自动下载env相关脚本到~/.env目录,然后执行
98
99    source ~/.env/env.sh
100
101    cd bsp/bouffalo_lab/bl61x
102    pkgs --update
103
104更新完软件包后,执行 `scons -j10` 或 `scons -j10 --verbose` 来编译这个板级支持包。或者通过 `scons --exec-path="GCC工具链路径"` 命令,在指定工具链位置的同时直接编译。
105
106如果编译正确无误,会产生rtthread.elfrtthread.bin文件;编译完成后自动调用`libraries/bl_mcu_sdk/tools/bflb_tools/bflb_fw_post_proc`对rtthread.bin进行打包处理以用于后续`bouffalo_flash_cube`工具烧录。
107
108脚本会自动采用curl命令行方式下载`bflb_fw_post_proc`,如自动下载失败,可采用手工方式下载对应操作系统文件后保存至`libraries/bl_mcu_sdk/tools/bflb_tools/bflb_fw_post_proc`
109
110| 下载地址1 | [windows](https://raw.githubusercontent.com/bouffalolab/bl_mcu_sdk/master/tools/bflb_tools/bflb_fw_post_proc/bflb_fw_post_proc.exe)/[Linux](https://raw.githubusercontent.com/bouffalolab/bl_mcu_sdk/master/tools/bflb_tools/bflb_fw_post_proc/bflb_fw_post_proc-ubuntu)/[macos](https://raw.githubusercontent.com/bouffalolab/bl_mcu_sdk/master/tools/bflb_tools/bflb_fw_post_proc/bflb_fw_post_proc-macos) |
111| --------- | ------------------------------------------------------------ |
112| 下载地址2 | [bflb_fw_post_proc-win.tar.gz](https://gitee.com/flyingcys/bflb_tools/releases/download/v1.0.4/bflb_fw_post_proc-win.tar.gz)/[bflb_fw_post_proc-linux.tar.gz](https://gitee.com/flyingcys/bflb_tools/releases/download/v1.0.4/bflb_fw_post_proc-linux.tar.gz)/[bflb_fw_post_proc-macos.tar.gz](https://gitee.com/flyingcys/bflb_tools/releases/download/v1.0.4/bflb_fw_post_proc-macos.tar.gz) |
113| 下载地址3 | [bflb_fw_post_proc-win.tar.gz](https://github.com/flyingcys/bflb_tools/releases/download/v1.0.4/bflb_fw_post_proc-win.tar.gz)/[bflb_fw_post_proc-linux.tar.gz](https://github.com/flyingcys/bflb_tools/releases/download/v1.0.4/bflb_fw_post_proc-linux.tar.gz)/[bflb_fw_post_proc-macos.tar.gz](https://github.com/flyingcys/bflb_tools/releases/download/v1.0.4/bflb_fw_post_proc-macos.tar.gz) |
114
115
116
117## 3. 下载烧录
118
119### 3.1. 烧录工具下载
120
121当前bsp必须使用`bouffalo_flash_cube-1.0.4`工具进行烧录,使用其他工作无法正常运行。
122
123- 烧录工具下载地址1:[百度网盘](https://pan.baidu.com/s/1eG9pkxf3riAqQAu9aXiOjw?pwd=miv1)
124
125- 烧录工具下载地址2:
126
127[bouffalo_flash_cube-win.zip](https://gitee.com/flyingcys/bflb_tools/releases/download/v1.0.4/bouffalo_flash_cube-win.zip)/[bouffalo_flash_cube-win.tar.gz](https://gitee.com/flyingcys/bflb_tools/releases/download/v1.0.4/bouffalo_flash_cube-win.tar.gz)
128
129[bouffalo_flash_cube-linux.zip](https://gitee.com/flyingcys/bflb_tools/releases/download/v1.0.4/bouffalo_flash_cube-linux.zip)/[bouffalo_flash_cube-linux.tar.gz](https://gitee.com/flyingcys/bflb_tools/releases/download/v1.0.4/bouffalo_flash_cube-linux.tar.gz)
130
131[bouffalo_flash_cube-macos.zip](https://gitee.com/flyingcys/bflb_tools/releases/download/v1.0.4/bouffalo_flash_cube-macos.zip)/[bouffalo_flash_cube-macos.tar.gz](https://gitee.com/flyingcys/bflb_tools/releases/download/v1.0.4/bouffalo_flash_cube-macos.tar.gz)
132
133- 烧录工具下载地址3:
134
135[bouffalo_flash_cube-win.zip](https://github.com/flyingcys/bflb_tools/releases/download/v1.0.4/bouffalo_flash_cube-win.zip)/[bouffalo_flash_cube-win.tar.gz](https://github.com/flyingcys/bflb_tools/releases/download/v1.0.4/bouffalo_flash_cube-win.tar.gz)
136
137[bouffalo_flash_cube-linux.zip](https://github.com/flyingcys/bflb_tools/releases/download/v1.0.4/bouffalo_flash_cube-linux.zip)/[bouffalo_flash_cube-linux.tar.gz](https://github.com/flyingcys/bflb_tools/releases/download/v1.0.4/bouffalo_flash_cube-linux.tar.gz)
138
139[bouffalo_flash_cube-macos.zip](https://github.com/flyingcys/bflb_tools/releases/download/v1.0.4/bouffalo_flash_cube-macos.zip)/[bouffalo_flash_cube-macos.tar.gz](https://github.com/flyingcys/bflb_tools/releases/download/v1.0.4/bouffalo_flash_cube-macos.tar.gz)
140
141
142
143### 3.2. GUI方式下载
144
1451. 连接好串口并在工具上选择对应的串口号
146
1472. 打开对应芯片文件夹下的flash_prog_cfg.ini文件
148
1493. 按住开发板上的boot按钮后重新上电,进入下载状态
150
1514. 点击"Download"开始下载
152
153![Flash Download](figures/bouffalo_flash_cube.png)
154
155
156
157### 3.2. 命令行下载
158
159命令行下载可使用`bsp/bouffalo_lab`目录下的`bouffalo_flash_cube.sh`脚本,输入`./bouffalo_flash_cube.sh bl616 /dev/ttyUSB1`,脚本会自动采用curl命令行方式下载`bouffalo_flash_cube`。
160
161如自动下载失败,可采用手工方式下载对应操作系统文件后保存至`libraries/bl_mcu_sdk/tools/bflb_tools/bouffalo_flash_cube`目录。
162
163其中:
164
165- bl616:芯片名称(bl808:三核同时下载;或者输入:bl808-m0/bl808-lp/bl808-d0分别烧录对应的核,但是m0必须要烧录才能运行)
166- /dev/ttyUSB1:下载串口号,linux下为/dev/ttyUSBx/dev/ttyACMx,windows下为COMx
167
168
169
170### 4.  运行
171
172如果编译 & 烧写无误,当复位设备后,会在串口上看到RT-Thread的启动logo信息:
173
174![terminal](figures/rt-thread.png)
175
176
177
178## 5. 支持开发板列表
179
180|       | 开发板型号             |
181| ----- | ---------------------- |
182| bl602 | BL602-IoT-3S/BL-HWC-G1 |
183| bl702 | Maix Zero Sense        |
184| bl616/bl618 | M0S Dock/M0P Dock               |
185| bl808 | M1s Dock               |
186
187
188
189## 6. 驱动支持列表
190
191| 驱动 | 支持情况 | 备注              |
192| :--- | :------- | :---------------- |
193| UART | 支持     | 默认波特率2000000 |
194| GPIO | 支持     |                   |
195| I2C  | 支持     |                   |
196| SPI  | 支持     | 支持DMA            |
197| PWM  | 支持     |                   |
198| ADC  | 支持     |                   |
199| RTC  | 支持     |                   |
200| WDT  | 支持     |                   |
201| HWTIMER  | 支持     |                   |
202| FLASH  | 支持     |                   |
203| SDCARD  | 支持     |                   |
204| Wi-Fi  | 支持     | 仅 BL808 支持       |
205
206
207
208## 7. 联系人信息
209
210维护人:[flyingcys](https://github.com/flyingcys)
211
212
213
214## 8. 参考
215
216* 芯片[datasheet][2]
217
218  [1]: https://www.rt-thread.org/download.html#download-rt-thread-env-tool
219  [2]: https://github.com/bouffalolab/bl_docs
220
221

README_en.md

1**English** | [中文](README.md)
2# bouffalo_lab bsp
3
4## 1. Introduction
5
6bouffalo_lab bsp is a board support package for bouffalo_lab's series of AIoT chips. It adopts the latest **LHAL** driver library from bouffalo_lab, which is synchronized with the [bouffalo_sdk](https://github.com/bouffalolab/bouffalo_sdk) (formerly known as bl_mcu_sdk) code at commit id: `e6e8da79a50aeb4fcb67ac380c3bd8885cd56faf`.
7
8Currently, the following chips are supported:
9
10|      | Chip Model                | Kernel                                     |
11| ---- | :----------------------- | ---------------------------------------- |
12| 1    | bl60x(bl602/bl604)       | RISC-V SiFive E24                        |
13| 2    | bl70x(bl702/bl704/bl706) | RISC-V SiFive E24                        |
14| 3    | bl61x(bl616/bl618)       | RISC-V T-Head E907                       |
15| 4    | bl808                    | RISC-V T-Head E902(lp)+E907(m0)+C906(d0) |
16
17**LHAL** is a driver library designed by bouffalo_lab for unified general peripheral interfaces. The code is concise and supports all series of bouffalo_lab chips.
18
19|   Peripheral   | BL602/BL604 | BL702/BL704/BL706 | BL616/BL618 | BL808 |
20| :------: | :---------: | :---------------: | :---------: | :---: |
21|   ADC    |      ○      |         √         |      √      |   ○   |
22|   CAM    |      -      |         ×         |      ×      |   ×   |
23|   CKS    |      ○      |         √         |      √      |   ○   |
24|   DAC    |      ○      |         √         |      √      |   ○   |
25|   DMA    |      ○      |         √         |      √      |   √   |
26|  EFUSE   |      ×      |         √         |      √      |   √   |
27|   EMAC   |      -      |         √         |      √      |   √   |
28|  FLASH   |      √      |         √         |      √      |   √   |
29|   GPIO   |      ○      |         √         |      √      |   √   |
30|   I2C    |      ○      |         √         |      √      |   ○   |
31|   I2S    |      ○      |         ○         |      √      |   ○   |
32|    IR    |      ○      |         √         |      √      |   ○   |
33|  MJPEG   |      ×      |         ×         |      √      |   √   |
34|  PWM_v1  |      ○      |         √         |      -      |   -   |
35|  PWM_v2  |      -      |         -         |      √      |   √   |
36|   RTC    |      ○      |         √         |      √      |   √   |
37| SEC_AES  |      ○      |         √         |      √      |   √   |
38| SEC_SHA  |      ○      |         √         |      √      |   √   |
39| SEC_TRNG |      ○      |         √         |      √      |   √   |
40| SEC_PKA  |      ○      |         √         |      √      |   √   |
41|   SPI    |      ○      |         √         |      √      |   √   |
42|  TIMER   |      ○      |         √         |      √      |   √   |
43|   UART   |      √      |         √         |      √      |   √   |
44|  USB_v1  |      -      |         √         |      -      |   -   |
45|  USB_v2  |      -      |         -         |      √      |   √   |
46|   WDG    |      ○      |         √         |      √      |   ○   |
47
48Note: **√** means supported; **×** means unsupported; **○** means supported but not tested; **-** means the peripheral is not available.
49
50
51
52## 2. Environment Setup and Compilation
53
54bl60x/bl70x/bl61x can be directly compiled for the corresponding chips. bl808 is a multi-core heterogeneous architecture, divided into m0, lp, and d0. Each core needs to be compiled separately and burned to the corresponding location. Please refer to [bl808 triple-core user guide](./bl808/README_en.md) for detailed usage.
55
56The following operations are based on the single-core bl61x chip, and the operations for other chips are the same.
57
58### 2.1. Download
59
60Please download the toolchain for the corresponding chip using the download links below.
61
62| Chip Model | Download Link                                                 |
63| ----------- | ------------------------------------------------------------ |
64| bl60x/bl70x | [Linux](https://gitee.com/bouffalolab/toolchain_gcc_sifive_linux)/[windows](https://gitee.com/bouffalolab/toolchain_gcc_sifive_windows) |
65| bl61x/bl808 | [T-Head Website](https://occ.t-head.cn/community/download?id=4073475960903634944) or [Linux](https://gitee.com/bouffalolab/linuxtoolchain_gcc_t-head)/[windows](https://gitee.com/bouffalolab/toolchain_gcc_t-head_windows) |
66
67### 2.2. Setup
68
69For Windows, please 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.
70
71Add the path of the RISC-V toolchain to `EXEC_PATH` in `rtconfig.py` or specify the path using the `RTT_EXEC_PATH` environment variable.
72
73Windows:
74
75```
76set RTT_EXEC_PATH=C:\Users\xxxx\Downloads\Xuantie-900-gcc-elf-newlib-x86_64-V2.6.1\bin
77```
78
79Linux:
80
81```
82export RTT_EXEC_PATH=/opt/Xuantie-900-gcc-elf-newlib-x86_64-V2.6.1/bin
83```
84
85### 2.3. Compilation
86
87For Windows, it is recommended to use the [env tool][1]. Open the console and navigate to the bsp/bouffalo_lab/bl61x directory, then run:
88
89    cd bsp/bouffalo_lab/bl61x
90    menuconfig
91    pkgs --update
92
93If you are using Linux, you can execute:
94
95    scons --menuconfig
96
97It will automatically download the env-related scripts to the ~/.env directory, then execute:
98
99    source ~/.env/env.sh
100
101    cd bsp/bouffalo_lab/bl61x
102    pkgs --update
103
104After 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.
105
106If the compilation is successful, the rtthread.elf and rtthread.bin files will be generated. After the compilation, the script will automatically call `libraries/bl_mcu_sdk/tools/bflb_tools/bflb_fw_post_proc` to package the rtthread.bin for subsequent burning using the `bouffalo_flash_cube` tool.
107
108The script will automatically download `bflb_fw_post_proc` using the curl command line method. If the automatic download fails, you can manually download the corresponding file for your operating system and save it to the `libraries/bl_mcu_sdk/tools/bflb_tools/bflb_fw_post_proc` directory.
109
110| Download Link 1 | [windows](https://raw.githubusercontent.com/bouffalolab/bl_mcu_sdk/master/tools/bflb_tools/bflb_fw_post_proc/bflb_fw_post_proc.exe)/[Linux](https://raw.githubusercontent.com/bouffalolab/bl_mcu_sdk/master/tools/bflb_tools/bflb_fw_post_proc/bflb_fw_post_proc-ubuntu)/[macos](https://raw.githubusercontent.com/bouffalolab/bl_mcu_sdk/master/tools/bflb_tools/bflb_fw_post_proc/bflb_fw_post_proc-macos) |
111| -------------- | ------------------------------------------------------------ |
112| Download Link 2 | [bflb_fw_post_proc-win.tar.gz](https://gitee.com/flyingcys/bflb_tools/releases/download/v1.0.4/bflb_fw_post_proc-win.tar.gz)/[bflb_fw_post_proc-linux.tar.gz](https://gitee.com/flyingcys/bflb_tools/releases/download/v1.0.4/bflb_fw_post_proc-linux.tar.gz)/[bflb_fw_post_proc-macos.tar.gz](https://gitee.com/flyingcys/bflb_tools/releases/download/v1.0.4/bflb_fw_post_proc-macos.tar.gz) |
113| Download Link 3 | [bflb_fw_post_proc-win.tar.gz](https://github.com/flyingcys/bflb_tools/releases/download/v1.0.4/bflb_fw_post_proc-win.tar.gz)/[bflb_fw_post_proc-linux.tar.gz](https://github.com/flyingcys/bflb_tools/releases/download/v1.0.4/bflb_fw_post_proc-linux.tar.gz)/[bflb_fw_post_proc-macos.tar.gz](https://github.com/flyingcys/bflb_tools/releases/download/v1.0.4/bflb_fw_post_proc-macos.tar.gz) |
114
115
116
117## 3. Download and Flashing
118
119### 3.1. Download the Flashing Tool
120
121The current bsp must use the `bouffalo_flash_cube-1.0.4` tool for flashing, other tools may not work correctly.
122
123- Download Link 1: [Baidu Pan](https://pan.baidu.com/s/1eG9pkxf3riAqQAu9aXiOjw?pwd=miv1)
124- Download Link 2: [bouffalo_flash_cube-win.zip](https://gitee.com/flyingcys/bflb_tools/releases/download/v1.0.4/bouffalo_flash_cube-win.zip)/[bouffalo_flash_cube-win.tar.gz](https://gitee.com/flyingcys/bflb_tools/releases/download/v1.0.4/bouffalo_flash_cube-win.tar.gz), [bouffalo_flash_cube-linux.zip](https://gitee.com/flyingcys/bflb_tools/releases/download/v1.0.4/bouffalo_flash_cube-linux.zip)/[bouffalo_flash_cube-linux.tar.gz](https://gitee.com/flyingcys/bflb_tools/releases/download/v1.0.4/bouffalo_flash_cube-linux.tar.gz), [bouffalo_flash_cube-macos.zip](https://gitee.com/flyingcys/bflb_tools/releases/download/v1.0.4/bouffalo_flash_cube-macos.zip)/[bouffalo_flash_cube-macos.tar.gz](https://gitee.com/flyingcys/bflb_tools/releases/download/v1.0.4/bouffalo_flash_cube-macos.tar.gz)
125- Download Link 3: [bouffalo_flash_cube-win.zip](https://github.com/flyingcys/bflb_tools/releases/download/v1.0.4/bouffalo_flash_cube-win.zip)/[bouffalo_flash_cube-win.tar.gz](https://github.com/flyingcys/bflb_tools/releases/download/v1.0.4/bouffalo_flash_cube-win.tar.gz), [bouffalo_flash_cube-linux.zip](https://github.com/flyingcys/bflb_tools/releases/download/v1.0.4/bouffalo_flash_cube-linux.zip)/[bouffalo_flash_cube-linux.tar.gz](https://github.com/flyingcys/bflb_tools/releases/download/v1.0.4/bouffalo_flash_cube-linux.tar.gz), [bouffalo_flash_cube-macos.zip](https://github.com/flyingcys/bflb_tools/releases/download/v1.0.4/bouffalo_flash_cube-macos.zip)/[bouffalo_flash_cube-macos.tar.gz](https://github.com/flyingcys/bflb_tools/releases/download/v1.0.4/bouffalo_flash_cube-macos.tar.gz)
126
127### 3.2. Flashing via GUI
128
1291. Connect the serial port and select the corresponding port on the tool.
130
1312. Open the flash_prog_cfg.ini file in the corresponding chip folder.
132
1333. Hold down the boot button on the development board, then power on the board to enter flashing mode.
134
1354. Click "Download" to start the flashing process.
136
137![Flash Download](figures/bouffalo_flash_cube.png)
138
139
140
141### 3.2. Flashing via Command Line
142
143You can use the `bouffalo_flash_cube.sh` script in the `bsp/bouffalo_lab` directory to flash the chip via command line. Enter `./bouffalo_flash_cube.sh bl616 /dev/ttyUSB1` and the script will automatically download `bouffalo_flash_cube` using the curl command line method.
144
145If the automatic download fails, you can manually download the corresponding file for your operating system and save it to the `libraries/bl_mcu_sdk/tools/bflb_tools/bouffalo_flash_cube` directory.
146
147- bl616: chip name (bl808: simultaneous flashing of three cores; or enter: bl808-m0/bl808-lp/bl808-d0 to flash the corresponding core individually, but m0 must be flashed for normal operation)
148- /dev/ttyUSB1: download serial port number (in Linux it is /dev/ttyUSBx or /dev/ttyACMx, in Windows it is COMx)
149
150
151
152### 4. Running
153
154If the compilation and flashing are successful, when you reset the device, you will see the RT-Thread startup logo information on the serial port:
155
156![terminal](figures/rt-thread.png)
157
158
159
160## 5. Supported Development Boards
161
162|       | Board Model             |
163| ----- | ---------------------- |
164| bl602 | BL602-IoT-3S/BL-HWC-G1 |
165| bl702 | Maix Zero Sense        |
166| bl616/bl618 | M0S Dock/M0P Dock               |
167| bl808 | M1s Dock               |
168
169
170
171## 6. Driver Support List
172
173| Driver | Support Status | Remarks                |
174| :----- | :------------- | :--------------------- |
175| UART   | Supported      | Default baud rate 2000000 |
176| GPIO   | Supported      |                        |
177| I2C    | Supported      |                        |
178| SPI    | Supported      | Supports DMA            |
179| PWM    | Supported      |                        |
180| ADC    | Supported      |                        |
181| RTC    | Supported      |                        |
182| WDT    | Supported      |                        |
183| HWTIMER | Supported     |                          |
184| FLASH  | Supported      |                        |
185| SDCARD  | Supported      |                        |
186
187
188
189## 7. Contact Information
190
191Maintainer: [flyingcys](https://github.com/flyingcys)
192
193
194
195## 8. References
196
197* Chip [datasheet][2]
198
199  [1]: https://www.rt-thread.org/download.html#download-rt-thread-env-tool
200  [2]: https://github.com/bouffalolab/bl_docs