Skip to content

Commit 0370489

Browse files
authored
[Bouffalo Lab] Update Bouffalo SDK to bouffalolab_release_bl_iot_sdk_1.6.40-2000-gb17d51bc3 (#34837)
* [Bouffalo Lab] Update Bouffalo SDK to bouffalolab_release_bl_iot_sdk_1.6.40-2000-gb17d51bc3 * [Bouffalo Lab] Update bouffalo lab docker image tag for ci build * fix restyle & spells and rollback boringssl * fix lintcode and python3 module required
1 parent 62729e0 commit 0370489

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+1083
-970
lines changed

.github/workflows/examples-bouffalolab.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
if: github.actor != 'restyled-io[bot]'
3838

3939
container:
40-
image: ghcr.io/project-chip/chip-build-bouffalolab:54
40+
image: ghcr.io/project-chip/chip-build-bouffalolab:68
4141
volumes:
4242
- "/tmp/bloat_reports:/tmp/bloat_reports"
4343
steps:

examples/lighting-app/bouffalolab/README.md

+87-111
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,13 @@ This example functions as a light bulb device type, with on/off and level
44
capabilities and uses a test Vendor ID (VID) and a Product ID (PID)
55
of **0x8005**.
66

7-
The steps were verified on `Bouffalo Lab` BL602 and BL706 development board.
7+
Current supported boards:
8+
9+
- `BL602DK`
10+
- `BL706DK`
11+
- `BL704LDK`
12+
13+
Legacy supported boards:
814

915
- `BL602-IoT-Matter-V1`, [here](https://www.amazon.com/dp/B0B9ZVGXD8) to
1016
purchase.
@@ -21,10 +27,6 @@ The steps were verified on `Bouffalo Lab` BL602 and BL706 development board.
2127

2228
BL602/BL604 is combo chip-set for Wi-Fi 802.11b/g/n and BLE 5.0 base-band/MAC.
2329

24-
### BL602-IoT-Matter-V1
25-
26-
<img src="../../platform/bouffalolab/doc/chart/BL602-IoT-Matter_V1.png" style="zoom:25%;" />
27-
2830
## BL70x
2931

3032
BL70x is combo chip-set for BLE and IEEE 802.15.4/ZigBee/Thread.
@@ -35,16 +37,34 @@ BL70x is combo chip-set for BLE and IEEE 802.15.4/ZigBee/Thread.
3537
general name.
3638

3739
BL70x has fully certified with all Thread 1.3 features, included Thread `SSED`
38-
and Thread Border Router with `DUA manager`.
39-
40-
### `XT-ZB6-DevKit`
41-
42-
<img src="../../platform/bouffalolab/doc/chart/bl706_dev_board.jpg" style="zoom:23%;" />
40+
and Thread Border Router.
41+
42+
## Solutions introduction
43+
44+
`Bouffalo Lab` has full connectives support for Matter Applications.
45+
46+
- Wi-Fi 4/6 application, we have
47+
- BL602, Wi-Fi 4 application.
48+
- BL706 + BL602, Wi-Fi 4 application. BL602 runs as a normal WLAN
49+
transceiver; TCP/IP stack runs as BL706 side. We recommend this solution
50+
is for Openthread Border Router application and Matter ZigBee bridge.
51+
- Openthread Border Router application, please refer to Openthread
52+
Border Router application
53+
- Matter ZigBee Bridge application, please contact `Bouffalo Lab` for
54+
support.
55+
- Thread application, we have
56+
- B70X
57+
- Ethernet application, we have
58+
- BL706. It supports single Matter application, and also Openthread Border
59+
Router application and Matter ZigBee bridge
60+
- Openthread Border Router application, please refer to Openthread
61+
Border Router application
62+
- Matter ZigBee application, please contact `Bouffalo Lab` for
63+
support.
4364

4465
## Initial setup
4566

46-
The following steps in this document were validated on Ubuntu 18.04/20.04 and
47-
Mac OS.
67+
The following steps in this document were validated on Ubuntu 20.04.
4868

4969
- Install dependencies as specified in the **connectedhomeip** repository:
5070
[Building Matter](https://github.com/project-chip/connectedhomeip/blob/master/docs/guides/BUILDING.md).
@@ -58,77 +78,67 @@ Mac OS.
5878
source ./scripts/activate.sh -p bouffalolab
5979
```
6080
61-
> After environment setup `Bouffalo Lab` flash tool, `bflb-iot-tool`,
62-
> imports under this environment. If not, please try
63-
> `scripts/bootstrap.sh -p bouffalolab` for matter environment update.
64-
6581
- Setup build environment for `Bouffalo Lab` SoC
6682
67-
Run `setup.sh` to install `Bouffalo Lab` SDK to /opt/bouffalolab_sdk
68-
6983
```
70-
cd third_party/bouffalolab/repo
71-
sudo bash scripts/setup.sh
84+
./integrations/docker/images/stage-2/chip-build-bouffalolab/setup.sh
7285
```
7386
74-
Please execute following command to export `BOUFFALOLAB_SDK_ROOT` before
75-
building.
87+
Script `setpu.sh` requires to select install path, and please execute
88+
following command to export `BOUFFALOLAB_SDK_ROOT` before building.
7689
7790
```
78-
export BOUFFALOLAB_SDK_ROOT=/opt/bouffalolab_sdk
91+
export BOUFFALOLAB_SDK_ROOT="Your install path"
7992
```
8093
8194
## Build CHIP Lighting App example
8295
83-
The following steps take examples for `BL602-IoT-Matter-V1` BL602 board,
84-
`BL706DK` BL706 board, and `BL704LDK` BL704L board .
96+
The following steps take examples for `BL602DK`, `BL704LDK` and `BL706DK`.
8597
8698
- Build lighting app with UART baudrate 2000000
8799
88100
```
89-
./scripts/build/build_examples.py --target bouffalolab-bl602-iot-matter-v1-light build
90-
./scripts/build/build_examples.py --target bouffalolab-bl706dk-light build
91-
./scripts/build/build_examples.py --target bouffalolab-bl706dk-light-ethernet build
92-
./scripts/build/build_examples.py --target bouffalolab-bl706dk-light-wifi build
101+
./scripts/build/build_examples.py --target bouffalolab-bl602dk-light build
93102
./scripts/build/build_examples.py --target bouffalolab-bl704ldk-light build
94-
```
95-
96-
- Build lighting app with UART baudrate 115200
97-
98-
```
99-
./scripts/build/build_examples.py --target bouffalolab-bl602-iot-matter-v1-light-115200 build
100-
./scripts/build/build_examples.py --target bouffalolab-bl706dk-light-light-115200 build
101-
./scripts/build/build_examples.py --target bouffalolab-bl704ldk-light-light-115200 build
103+
./scripts/build/build_examples.py --target bouffalolab-bl706dk-light build
102104
```
103105
104106
- Build lighting app with RPC enabled and UART baudrate 115200.
105107
106108
```
107-
./scripts/build/build_examples.py --target bouffalolab-bl602-iot-matter-v1-light-rpc build
108-
./scripts/build/build_examples.py --target bouffalolab-bl706dk-light-light-rpc build
109-
./scripts/build/build_examples.py --target bouffalolab-bl704ldk-light-light-rpc build
109+
./scripts/build/build_examples.py --target bouffalolab-bl602dk-light-light-rpc-115200 build
110+
./scripts/build/build_examples.py --target bouffalolab-bl704ldk-light-light-rpc-115200 build
111+
./scripts/build/build_examples.py --target bouffalolab-bl706dk-light-light-rpc-115200 build
110112
```
111113
112114
### Build options with build_examples.py
113115
114-
- `-shell`, enable UART command line
115-
- `-115200`, set UART baudrate to 115200 for log and command line
116+
- `-wifi`, to specify that connectivity Wi-Fi is enabled for Matter
117+
application.
118+
119+
- BL602 uses `-wifi` by default
120+
- BL702 needs specify to use BL706 + BL602 for Wi-Fi connectivity.
121+
122+
- `-thread`, to specify that connectivity Thread is enabled for Matter
123+
application.
124+
125+
- BL70X uses `-thread` by default.
126+
127+
- `-ethernet`, to specify that connectivity Ethernet is enabled for Matte
128+
application.
129+
130+
- BL706 needs specify to use Ethernet connectivity.
131+
132+
- `-easyflash`, to specify that `easyflash` is used for flash storage access.
133+
- `-mfd`, enable Matter factory data feature, which load factory data from
134+
`MFD` partition
135+
- `-shell`, enable command line
116136
- `-rpc`, enable Pigweed RPC feature
137+
- `-115200`, set UART baudrate to 115200 for log and command line
117138
- `-cdc`, enable USB CDC feature, only support for BL706, and can't work with
118139
Ethernet Board
119140
- `-resetCnt`, enable feature to do factory reset when continues power cycle
120141
is greater than 3
121-
- `-mfd`, enable Matter factory data feature, which load factory data from
122-
`DTS` region and `MFD` partition
123-
- Please contact to `Bouffalo Lab` for Matter factory data support.
124-
- `-mfdtest`, enable Matter factory data module, but only load factory data
125-
from `FactoryDataProvider.cpp` file.
126-
- `-wifi`, to specify that connectivity Wi-Fi is enabled for Matter
127-
application.
128-
- `-ethernet`, to specify that connectivity Ethernet is enabled for Matter
129-
application.
130-
- `-thread`, to specify that connectivity Thread is enabled for Matter
131-
application.
132142
- `-mot`, to specify to use openthread stack under
133143
`third_party/openthread/repo`
134144
- Without `-mot` specified, Matter Thread will use openthread stack under
@@ -147,12 +157,6 @@ The following steps take examples for `BL602-IoT-Matter-V1` BL602 board,
147157
- `chip-bl702-lighting-example.flash.py` for BL702
148158
- `chip-bl702l-lighting-example.flash.py` for BL702L
149159
150-
> Note 1, `*.flash.py` should be ran under Matter build environment; if
151-
> python module `bflb_iot_tool` is not found, please try to do
152-
> `source scripts/bootstrap.sh` or install as
153-
> `pip3 install bflb-iot-tool`.<br> Note 2, different build options will
154-
> generate different output folder.
155-
156160
Download operation steps as below, please check `help` option of script for
157161
more detail.
158162
@@ -167,45 +171,25 @@ The following steps take examples for `BL602-IoT-Matter-V1` BL602 board,
167171
- Type following command for image download. Please set serial port
168172
accordingly, here we use /dev/ttyACM0 as a serial port example.
169173
170-
- `bl602-iot-matter-v1`, `bl706dk` and `bl704ldk` without additional
171-
build options
172-
173-
```shell
174-
./out/bouffalolab-bl602-iot-matter-v1-light/chip-bl602-lighting-example.flash.py --port /dev/ttyACM0
175-
./out/bouffalolab-bl706dk-light/chip-bl702-lighting-example.flash.py --port /dev/ttyACM0
176-
./out/bouffalolab-bl704ldk-light/chip-bl702l-lighting-example.flash.py --port /dev/ttyACM0
177-
```
174+
- `BL602DK`, `BL704LDK` and `BL706DK`.
178175
179-
- `bl706dk` with 115200 baudrate setting
180176
181177
```shell
182-
./out/bouffalolab-bl706dk-light-115200/chip-bl702-lighting-example.flash.py --port /dev/ttyACM0
178+
./out/bouffalolab-bl602dk-light/chip-bl602-lighting-example.flash.py --port /dev/ttyACM0
179+
./out/bouffalolab-bl704ldk-light/chip-bl702l-lighting-example.flash.py --port /dev/ttyACM0
180+
./out/bouffalolab-bl706dk-light/chip-bl702-lighting-example.flash.py --port /dev/ttyACM0
183181
```
184182
185-
- To wipe out flash and download image, please append `--erase` to the
186-
above command.
183+
- To wipe out flash and download image, please append `--erase`
184+
option. Take BL602DK as example.
187185
188186
```shell
189-
./out/bouffalolab-bl602-iot-matter-v1-light/chip-bl602-lighting-example.flash.py --port /dev/ttyACM0 --erase
190-
./out/bouffalolab-bl706dk-light-115200/chip-bl702-lighting-example.flash.py --port /dev/ttyACM0 --erase
191-
./out/bouffalolab-bl704ldk-light/chip-bl702l-lighting-example.flash.py --port /dev/ttyACM0 --erase
187+
./out/bouffalolab-bl602dk-light/chip-bl602-lighting-example.flash.py --port /dev/ttyACM0 --erase
192188
```
193189
194190
> Note, better to append --erase option to download image for BL602
195191
> develop board at first time.
196192
197-
- Using `Bouffalo Lab` GUI flash tool `BLDevCube`, please download on
198-
[this page](https://dev.bouffalolab.com/download).
199-
- Hold BOOT pin and reset chip, put the board in download mode.
200-
- Select `DTS` file;
201-
- Select Partition Table under
202-
`examples/platform/bouffalolab/bl602/flash_config` or
203-
`examples/platform/bouffalolab/bl702/flash_config`
204-
- Select Firmware Bin;
205-
- Select Chip Erase if need;
206-
- Choose Target COM port.
207-
- Then click Create & Download.
208-
209193
## Run the example
210194
211195
- You can open the serial console. For example, if the device is at
@@ -249,13 +233,13 @@ sudo ot-ctl dataset active -x
249233
- Enter build out folder of chip-tool and running the following command to do
250234
BLE commission
251235

252-
- BL602
236+
- Wi-Fi
253237

254238
```shell
255239
./chip-tool pairing ble-wifi <node_id> <wifi_ssid> <wifi_passwd> 20202021 3840
256240
```
257241

258-
- BL706
242+
- Thread
259243

260244
```shell
261245
./chip-tool pairing ble-thread <node_id> hex:<thread_operational_dataset> 20202021 3840
@@ -308,34 +292,26 @@ After successful commissioning, cluster commands available to control the board.
308292
Please take [guide](../../ota-provider-app/linux/README.md) for more detail on
309293
ota-provider-app build and usage.
310294

311-
### Create the Matter OTA image with Bouffalolab OTA `bin.xz.hash` format image
312-
313-
- `Bouffalo Lab` OTA `bin.xz.hash` format image
295+
### Create the Matter OTA image
314296

315-
- Build `Bouffalo Lab` OTA image as following execution using python
316-
script `*.flash.py` under firmware build out folder,
317-
`shell ./<output_firmware_name>.flash.py --build` After script executed,
318-
a folder `ota_images` and an image `FW_OTA.bin.xz.hash` will be
319-
generated. `FW_OTA.bin.xz.hash` is compressed with hash verification for
320-
build out firmware.
297+
`Bouffalo Lab` Matter OTA image contains two parts:
321298

322-
- `bin.xz.hash` image
299+
- `Bouffalo Lab` OTA bootable image:
300+
- Add boot parameters, signature/encryption if specified
301+
- And specify whether image has be compressed.
302+
- Add Matter recognition header by
303+
[ota_image_tool.py](../../../docs/guides/openthread_border_router_pi.md).
323304

324-
After compile done, the build script will call
325-
`<output_firmware_name>.flash.py` to generate `Bouffalo Lab` OTA format
326-
image as above, and put it under out folder with name likes
327-
`<output_firmware_name>.bin.xz.hash`
305+
Script `*.flash.py` builds `Bouffalo Lab` bootable image and call
306+
[ota_image_tool.py](../../../docs/guides/openthread_border_router_pi.md) to add
307+
Matter recognition header. Take `BL602DK` as example.
328308

329-
* Build Matter `*.ota` OTA image with `Bouffalo Lab` OTA image under
330-
**connectedhomeip** repo folder
331-
332-
```shell
333-
$ ./src/app/ota_image_tool.py create -v 0xFFF1 -p 0x8005 -vn 10 -vs "1.0" -da sha256 <FW_OTA.bin.xz.hash> lighting-app.ota
334-
335-
```
309+
```shell
310+
./out/bouffalolab-bl602dk-light/chip-bl602-lighting-example.flash.py --build-ota --vendor-id <vendor id> --product-id <product id> --version <version> --version-str <version string> --digest-algorithm <digest algorithm>
311+
```
336312

337-
> lighting-app.ota should have greater software version which is defined by
338-
> macro `CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION` in CHIPProjectConfig.h
313+
> lighting-app.ota should have greater software version which is defined by
314+
> macro `CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION` in CHIPProjectConfig.h
339315

340316
### Start ota-provider-app
341317

examples/lighting-app/bouffalolab/bl602/BUILD.gn

-3
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,6 @@ bouffalolab_executable("lighting_app") {
110110
defines += [ "CONF_ENABLE_FRAME_PTR=${enable_debug_frame_ptr}" ]
111111
defines +=
112112
[ "CONFIG_BOUFFALOLAB_FACTORY_DATA_ENABLE=${chip_enable_factory_data}" ]
113-
defines += [
114-
"CONFIG_BOUFFALOLAB_FACTORY_DATA_TEST=${chip_enable_factory_data_test}",
115-
]
116113

117114
bl_plat_name = "bl602"
118115
sources = [

examples/lighting-app/bouffalolab/bl602/args.gni

+2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ pw_rpc_CONFIG = "$dir_pw_rpc:disable_global_mutex"
2525

2626
chip_detail_logging = false
2727

28+
#is_debug = false
29+
2830
pw_build_LINK_DEPS = [
2931
"$dir_pw_assert:impl",
3032
"$dir_pw_log:impl",

examples/lighting-app/bouffalolab/bl702/BUILD.gn

-3
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,6 @@ bouffalolab_executable("lighting_app") {
138138
defines += [ "CONF_ENABLE_FRAME_PTR=${enable_debug_frame_ptr}" ]
139139
defines +=
140140
[ "CONFIG_BOUFFALOLAB_FACTORY_DATA_ENABLE=${chip_enable_factory_data}" ]
141-
defines += [
142-
"CONFIG_BOUFFALOLAB_FACTORY_DATA_TEST=${chip_enable_factory_data_test}",
143-
]
144141
if (chip_config_network_layer_ble) {
145142
defines += [ "CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE=1" ]
146143
}

examples/lighting-app/bouffalolab/bl702/args.gni

+3
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ pw_rpc_CONFIG = "$dir_pw_rpc:disable_global_mutex"
2525

2626
chip_detail_logging = false
2727

28+
# use -Os instead of -Og
29+
is_debug = false
30+
2831
pw_build_LINK_DEPS = [
2932
"$dir_pw_assert:impl",
3033
"$dir_pw_log:impl",

examples/lighting-app/bouffalolab/bl702l/BUILD.gn

-3
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,6 @@ bouffalolab_executable("lighting_app") {
115115
defines += [ "CONF_ENABLE_FRAME_PTR=${enable_debug_frame_ptr}" ]
116116
defines +=
117117
[ "CONFIG_BOUFFALOLAB_FACTORY_DATA_ENABLE=${chip_enable_factory_data}" ]
118-
defines += [
119-
"CONFIG_BOUFFALOLAB_FACTORY_DATA_TEST=${chip_enable_factory_data_test}",
120-
]
121118
if (chip_config_network_layer_ble) {
122119
defines += [ "CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE=1" ]
123120
}

examples/lighting-app/bouffalolab/bl702l/args.gni

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ pw_assert_BACKEND = "$dir_pw_assert_log"
2424
pw_rpc_CONFIG = "$dir_pw_rpc:disable_global_mutex"
2525

2626
chip_detail_logging = false
27+
is_debug = false
2728

2829
pw_build_LINK_DEPS = [
2930
"$dir_pw_assert:impl",

0 commit comments

Comments
 (0)