Skip to content

Commit 1259374

Browse files
wy-hhpull[bot]
authored andcommitted
[Bouffalolab] Update bflb-iot-tool version and flash script (#29379)
* [Bouffalolab] Update flash tool to 1.8.6 and readme * fix spell * fix lintcode and testdata * fix lintcode * fix restyle
1 parent de0f621 commit 1259374

File tree

7 files changed

+142
-60
lines changed

7 files changed

+142
-60
lines changed

examples/lighting-app/bouffalolab/README.md

+57-21
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@ The steps were verified on `Bouffalo Lab` BL602 and BL706 development board.
1111
- `BL602-NIGHT-LIGHT`
1212
- `XT-ZB6-DevKit`
1313
- `BL706-NIGHT-LIGHT`
14-
- `BL704L-DVK`
14+
- `BL706DK`
15+
- `BL704LDK`
1516

16-
> Warning: Changing the PID may cause compilation problems, we recommend leaving
17-
> it as the default while using this example.
17+
> Warning: Changing the VID/PID may cause compilation problems, we recommend
18+
> leaving it as the default while using this example.
1819
1920
## BL602
2021

@@ -24,10 +25,17 @@ BL602/BL604 is combo chip-set for Wi-Fi 802.11b/g/n and BLE 5.0 base-band/MAC.
2425

2526
<img src="../../platform/bouffalolab/doc/chart/BL602-IoT-Matter_V1.png" style="zoom:25%;" />
2627

27-
## BL706
28+
## BL70x
2829

29-
BL702/BL706 is combo chip-set for BLE and IEEE 802.15.4/ZigBee/Thread. In some
30-
cases, e.g. in SDK, we use BL702 as a general name for BL702/BL706 family.
30+
BL70x is combo chip-set for BLE and IEEE 802.15.4/ZigBee/Thread.
31+
32+
- BL702/BL706 has 14dbm tx power and is recommended for routing devices. SDK
33+
uses BL702 as a general name.
34+
- BL702L/BL704L is designed for low power application. SDK uses BL702L as a
35+
general name.
36+
37+
BL70x has fully certified with all Thread 1.3 features, included Thread `SSED`
38+
and Thread Border Router with `DUA manager`.
3139

3240
### `XT-ZB6-DevKit`
3341

@@ -47,12 +55,12 @@ Mac OS.
4755
git clone https://github.com/project-chip/connectedhomeip.git
4856
cd connectedhomeip
4957
git submodule update --init --recursive
50-
source ./scripts/activate.sh
58+
source ./scripts/activate.sh -p bouffalolab
5159
```
5260
53-
> After environment setup Bouffalolab flash tool, `bflb-iot-tool`, imports
54-
> under this environment. If not, please try `scripts/bootstrap.sh` for
55-
> matter environment update.
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.
5664
5765
- Setup build environment for `Bouffalo Lab` SoC
5866
@@ -72,15 +80,17 @@ Mac OS.
7280
7381
## Build CHIP Lighting App example
7482
75-
The following steps take examples for BL602 develop board `BL602-IoT-Matter-V1`,
76-
BL706 develop board `XT-ZB6-DevKit` and BL704L DVK board `BL704L-DVK`
83+
The following steps take examples for `BL602-IoT-Matter-V1` bl602 board, BL706
84+
develop `XT-ZB6-DevKit` and `BL706DK` bl706 board, and `BL704LDK` BL704L board .
7785
7886
- Build lighting app with UART baudrate 2000000
7987
8088
```
8189
./scripts/build/build_examples.py --target bouffalolab-bl602-iot-matter-v1-light build
8290
./scripts/build/build_examples.py --target bouffalolab-xt-zb6-devkit-light build
83-
./scripts/build/build_examples.py --target bouffalolab-bl704l-dvk-light build
91+
./scripts/build/build_examples.py --target bouffalolab-bl704ldk-light build
92+
./scripts/build/build_examples.py --target bouffalolab-bl706dk-light-ethernet build
93+
./scripts/build/build_examples.py --target bouffalolab-bl706dk-light-wifi build
8494
```
8595
8696
- Build lighting app with UART baudrate 115200
@@ -97,14 +107,39 @@ BL706 develop board `XT-ZB6-DevKit` and BL704L DVK board `BL704L-DVK`
97107
./scripts/build/build_examples.py --target bouffalolab-xt-zb6-devkit-light-rpc build
98108
```
99109
110+
### Build options with build_examples.py
111+
112+
- `-shell`, enable UART command line
113+
- `-115200`, set UART baudrate to 115200 for log and command line
114+
- `-rpc`, enable Pigweed RPC feature
115+
- `-cdc`, enable USB CDC feature, only support for BL706, and can't work with
116+
Ethernet Board
117+
- `-resetCnt`, enable feature to do factory reset when continues power cycle
118+
is greater than 3
119+
- `-mfd`, enable Matter factory data feature, which load factory data from
120+
`DTS` region and `MFD` partition
121+
- Please contact to `Bouffalo Lab` for Matter factory data support.
122+
- `-mfdtest`, enable Matter factory data module, but only load factory data
123+
from `FactoryDataProvider.cpp` file.
124+
- `-wifi`, to specify that connectivity Wi-Fi is enabled for Matter
125+
application.
126+
- `-ethernet`, to specify that connectivity Ethernet is enabled for Matter
127+
application.
128+
- `-thread`, to specify that connectivity Thread is enabled for Matter
129+
application.
130+
- `-fp`, to specify to enable frame pointer feature to print call stack when
131+
hit an exception for debug purpose.
132+
100133
## Download image
101134
102135
- Using script `*.flash.py`.
103136
104-
After building gets done, python script
105-
`chip-bl602-lighting-example.flash.py` or
106-
`chip-bl702-lighting-example.flash.py` will generate under build output
107-
folder for BL602 or BL702 building.
137+
After building gets done, python script `*.flash.py` will generate under
138+
build output folder, such as
139+
140+
- `chip-bl602-lighting-example.flash.py` for BL602
141+
- `chip-bl702-lighting-example.flash.py` for BL702
142+
- `chip-bl702l-lighting-example.flash.py` for BL702L
108143
109144
> Note 1, `*.flash.py` should be ran under Matter build environment; if
110145
> python module `bflb_iot_tool` is not found, please try to do
@@ -126,12 +161,13 @@ BL706 develop board `XT-ZB6-DevKit` and BL704L DVK board `BL704L-DVK`
126161
- Type following command for image download. Please set serial port
127162
accordingly, here we use /dev/ttyACM0 as a serial port example.
128163
129-
- `bl602-iot-matter-v1` and `bl704l-dvk` without additional build
130-
options
164+
- `bl602-iot-matter-v1`, `xt-zb6-devkit` and `bl704ldk` without
165+
additional build options
131166
132167
```shell
133168
./out/bouffalolab-bl602-iot-matter-v1-light/chip-bl602-lighting-example.flash.py --port /dev/ttyACM0
134-
./out/bouffalolab-bl704l-dvk-light/chip-bl702l-lighting-example.flash.py --port /dev/ttyACM0
169+
./out/bouffalolab-xt-zb6-devkit-light/chip-bl702-lighting-example.flash.py --port /dev/ttyACM0
170+
./out/bouffalolab-bl704ldk-light/chip-bl702l-lighting-example.flash.py --port /dev/ttyACM0
135171
```
136172
137173
- `xt-zb6-devkit` with 115200 baudrate setting
@@ -146,7 +182,7 @@ BL706 develop board `XT-ZB6-DevKit` and BL704L DVK board `BL704L-DVK`
146182
```shell
147183
./out/bouffalolab-bl602-iot-matter-v1-light/chip-bl602-lighting-example.flash.py --port /dev/ttyACM0 --erase
148184
./out/bouffalolab-xt-zb6-devkit-light-115200/chip-bl702-lighting-example.flash.py --port /dev/ttyACM0 --erase
149-
./out/bouffalolab-bl704l-dvk-light/chip-bl702l-lighting-example.flash.py --port /dev/ttyACM0 --erase
185+
./out/bouffalolab-bl704ldk-light/chip-bl702l-lighting-example.flash.py --port /dev/ttyACM0 --erase
150186
```
151187
152188
> Note, better to append --erase option to download image for BL602

scripts/build/build/targets.py

+1
Original file line numberDiff line numberDiff line change
@@ -642,6 +642,7 @@ def BuildBouffalolabTarget():
642642
target.AppendModifier('wifi', enable_wifi=True)
643643
target.AppendModifier('thread', enable_thread=True)
644644
target.AppendModifier('fp', enable_frame_ptr=True)
645+
target.AppendModifier('memmonitor', enable_heap_monitoring=True)
645646

646647
return target
647648

scripts/build/builders/bouffalolab.py

+6-5
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@ def __init__(self,
9090
enable_ethernet: bool = False,
9191
enable_wifi: bool = False,
9292
enable_thread: bool = False,
93-
enable_frame_ptr: bool = False
93+
enable_frame_ptr: bool = False,
94+
enable_heap_monitoring: bool = False
9495
):
9596

9697
if 'BL602' == module_type:
@@ -137,19 +138,16 @@ def __init__(self,
137138

138139
# hardware connectivity support check
139140
if bouffalo_chip == "bl602":
140-
141141
if enable_ethernet or enable_thread:
142142
raise Exception('SoC %s doesn\'t support connectivity Ethernet/Thread.' % bouffalo_chip)
143143

144144
elif bouffalo_chip == "bl702":
145-
146145
self.argsOpt.append('module_type=\"{}\"'.format(module_type))
147146
if board != BouffalolabBoard.BL706DK:
148147
if enable_ethernet or enable_wifi:
149148
raise Exception('Board %s doesn\'t support connectivity Ethernet/Wi-Fi.' % board)
150149

151150
elif bouffalo_chip == "bl702l":
152-
153151
if enable_ethernet or enable_wifi:
154152
raise Exception('SoC %s doesn\'t support connectivity Ethernet/Wi-Fi currently.' % bouffalo_chip)
155153

@@ -203,6 +201,8 @@ def __init__(self,
203201
else:
204202
self.argsOpt.append("enable_debug_frame_ptr=false")
205203

204+
self.argsOpt.append("enable_heap_monitoring={}".format(str(enable_heap_monitoring).lower()))
205+
206206
try:
207207
self.argsOpt.append('bouffalolab_sdk_root="%s"' % os.environ['BOUFFALOLAB_SDK_ROOT'])
208208
except KeyError as err:
@@ -261,4 +261,5 @@ def PostBuildCommand(self):
261261
os.system("cp " + ota_images_image + " " + ota_images_dev_image)
262262

263263
logging.info("PostBuild:")
264-
logging.info("Bouffalo Lab OTA format image: " + self.app.AppNamePrefix(self.chip_name) + ".bin.xz.hash is generated.")
264+
logging.info("Bouffalo Lab OTA format image without signature: " +
265+
self.app.AppNamePrefix(self.chip_name) + ".bin.xz.hash is generated.")

scripts/build/testdata/all_targets_linux_x64.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
ameba-amebad-{all-clusters,all-clusters-minimal,light,light-switch,pigweed}
22
asr-{asr582x,asr595x,asr550x}-{all-clusters,all-clusters-minimal,lighting,light-switch,lock,bridge,temperature-measurement,thermostat,ota-requestor,dishwasher,refrigerator}[-ota][-shell][-no_logging][-factory][-rotating_id][-rio]
33
android-{arm,arm64,x86,x64,androidstudio-arm,androidstudio-arm64,androidstudio-x86,androidstudio-x64}-{chip-tool,chip-test,tv-server,tv-casting-app,java-matter-controller,virtual-device-app}[-no-debug]
4-
bouffalolab-{bl602-iot-matter-v1,bl602-night-light,xt-zb6-devkit,bl706-night-light,bl706dk,bl704ldk}-light[-shell][-115200][-rpc][-cdc][-resetcnt][-rotating_device_id][-mfd][-mfdtest][-ethernet][-wifi][-thread][-fp]
4+
bouffalolab-{bl602-iot-matter-v1,bl602-night-light,xt-zb6-devkit,bl706-night-light,bl706dk,bl704ldk}-light[-shell][-115200][-rpc][-cdc][-resetcnt][-rotating_device_id][-mfd][-mfdtest][-ethernet][-wifi][-thread][-fp][-memmonitor]
55
cc32xx-lock
66
ti-cc13x2x7_26x2x7-{lighting,lock,pump,pump-controller}[-mtd]
77
ti-cc13x4_26x4-{all-clusters,lighting,lock,pump,pump-controller}[-mtd][-ftd]

0 commit comments

Comments
 (0)