Skip to content

Commit 8ebcbe8

Browse files
committed
fix restyle & spells and rollback boringssl
1 parent 2003192 commit 8ebcbe8

File tree

20 files changed

+227
-223
lines changed

20 files changed

+227
-223
lines changed

examples/lighting-app/bouffalolab/README.md

+104-83
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# `Bouffalo Lab`
22

3-
This example functions as a light bulb device type, with on/off and level capabilities and uses a test Vendor ID (VID) and a Product ID (PID)
3+
This example functions as a light bulb device type, with on/off and level
4+
capabilities and uses a test Vendor ID (VID) and a Product ID (PID)
45
of **0x8005**.
56

67
Current supported boards:
@@ -9,8 +10,10 @@ Current supported boards:
910
- `BL706DK`
1011
- `BL704LDK`
1112

12-
Lagacy supported boards:
13-
- `BL602-IoT-Matter-V1`, [here](https://www.amazon.com/dp/B0B9ZVGXD8) to purchase.
13+
Legacy supported boards:
14+
15+
- `BL602-IoT-Matter-V1`, [here](https://www.amazon.com/dp/B0B9ZVGXD8) to
16+
purchase.
1417
- `BL602-NIGHT-LIGHT`
1518
- `XT-ZB6-DevKit`
1619
- `BL706-NIGHT-LIGHT`
@@ -28,26 +31,35 @@ BL602/BL604 is combo chip-set for Wi-Fi 802.11b/g/n and BLE 5.0 base-band/MAC.
2831

2932
BL70x is combo chip-set for BLE and IEEE 802.15.4/ZigBee/Thread.
3033

31-
- BL702/BL706 has 14dbm tx power and is recommended for routing devices. SDK uses BL702 as a general name.
32-
- BL702L/BL704L is designed for low power application. SDK uses BL702L as a general name.
34+
- BL702/BL706 has 14dbm tx power and is recommended for routing devices. SDK
35+
uses BL702 as a general name.
36+
- BL702L/BL704L is designed for low power application. SDK uses BL702L as a
37+
general name.
3338

34-
BL70x has fully certified with all Thread 1.3 features, included Thread `SSED` and Thread Border Router.
39+
BL70x has fully certified with all Thread 1.3 features, included Thread `SSED`
40+
and Thread Border Router.
3541

3642
## Solutions introduction
3743

3844
`Bouffalo Lab` has full connectives support for Matter Applications.
3945

40-
- Wi-Fi 4/6 application, we have
41-
- BL602, Wi-Fi 4 application.
42-
- BL706 + BL602, Wi-Fi 4 application. BL602 runs as a normal WLAN transceiver; TCP/IP stack runs as BL706 side. We recommend this solution is for Openthread Border Router application and Matter ZigBee bridge.
43-
- Openthread Border Router application, please refer to Openthread Border Router application
44-
- Matter ZigBee Bridge application, please contact Bouffalo Lab for support.
45-
- Thread application, we have
46-
- B70X
47-
- Ethernet application, we have
48-
- BL706. It supports single Matter application, and also Openthread Border Router application and Matter ZigBee bridge
49-
- Openthread Border Router application, please refer to Openthread Border Router application
50-
- Matter ZigBee application, please contact Bouffalo Lab for support.
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 support.
5163

5264
## Initial setup
5365

@@ -71,9 +83,9 @@ The following steps in this document were validated on Ubuntu 20.04.
7183
./integrations/docker/images/stage-2/chip-build-bouffalolab/setup.sh
7284
```
7385
74-
Script `setpu.sh` requires to select install path, and
75-
please execute following command to export `BOUFFALOLAB_SDK_ROOT` before building.
76-
86+
Script `setpu.sh` requires to select install path, and please execute
87+
following command to export `BOUFFALOLAB_SDK_ROOT` before building.
88+
7789
```
7890
export BOUFFALOLAB_SDK_ROOT="Your install path"
7991
```
@@ -82,93 +94,100 @@ The following steps in this document were validated on Ubuntu 20.04.
8294
8395
The following steps take examples for `BL602DK`, `BL704LDK` and `BL706DK`.
8496
85-
- Build lighting app with UART baudrate 2000000
97+
- Build lighting app with UART baudrate 2000000
8698
87-
```
88-
./scripts/build/build_examples.py --target bouffalolab-bl602dk-light-littlefs build
89-
./scripts/build/build_examples.py --target bouffalolab-bl704ldk-light-littlefs build
90-
./scripts/build/build_examples.py --target bouffalolab-bl706dk-light-littlefs build
91-
```
99+
```
100+
./scripts/build/build_examples.py --target bouffalolab-bl602dk-light build
101+
./scripts/build/build_examples.py --target bouffalolab-bl704ldk-light build
102+
./scripts/build/build_examples.py --target bouffalolab-bl706dk-light build
103+
```
92104
93105
- Build lighting app with RPC enabled and UART baudrate 115200.
94106
95107
```
96-
./scripts/build/build_examples.py --target bouffalolab-bl602dk-light-littlefs-light-rpc-115200 build
97-
./scripts/build/build_examples.py --target bouffalolab-bl704ldk-light-littlefs-light-rpc-115200 build
98-
./scripts/build/build_examples.py --target bouffalolab-bl706dk-light-littlefs-light-rpc-115200 build
108+
./scripts/build/build_examples.py --target bouffalolab-bl602dk-light-light-rpc-115200 build
109+
./scripts/build/build_examples.py --target bouffalolab-bl704ldk-light-light-rpc-115200 build
110+
./scripts/build/build_examples.py --target bouffalolab-bl706dk-light-light-rpc-115200 build
99111
```
100112
101113
### Build options with build_examples.py
102114
103-
- `-wifi`, to specify that connectivity Wi-Fi is enabled for Matter application.
115+
- `-wifi`, to specify that connectivity Wi-Fi is enabled for Matter
116+
application.
117+
104118
- BL602 uses `-wifi` by default
105-
- BL702 needs specify to use BL706 + BL602 for Wi-Fi connectivity.
119+
- BL702 needs specify to use BL706 + BL602 for Wi-Fi connectivity.
120+
121+
- `-thread`, to specify that connectivity Thread is enabled for Matter
122+
application.
106123
107-
- `-thread`, to specify that connectivity Thread is enabled for Matter application.
108124
- BL70X uses `-thread` by default.
109125
110-
- `-ethernet`, to specify that connectivity Ethernet is enabled for Matte application.
111-
- BL706 needs specify to use Ethernet connectivity.
126+
- `-ethernet`, to specify that connectivity Ethernet is enabled for Matte
127+
application.
128+
129+
- BL706 needs specify to use Ethernet connectivity.
112130
113-
- `-littlefs`, to specify that littlefs is used for flash storage access.
114-
- `-easyflash`, to specify that easyflash is used for flash storage access.
115-
- for platform BL602/BL70X, it is necessary to specify one of `-easyflash` and `-littlefs` is used.
116-
- for platform BL61X, `-littlefs` is used by default, and please specify `-easyflash` if you want to use easyflash.
117-
- `-mfd`, enable Matter factory data feature, which load factory data from `MFD` partition
118-
- Please refer to [Bouffalo Lab Matter factory data guide](../../../docs/guides/bouffalolab/matter_factory_data.md) or contact to `Bouffalo Lab` for support.
131+
- `-easyflash`, to specify that `easyflash` is used for flash storage access.
132+
- `-mfd`, enable Matter factory data feature, which load factory data from
133+
`MFD` partition
119134
- `-shell`, enable command line
120135
- `-rpc`, enable Pigweed RPC feature
121136
- `-115200`, set UART baudrate to 115200 for log and command line
122-
- `-cdc`, enable USB CDC feature, only support for BL706, and can't work with Ethernet Board
137+
- `-cdc`, enable USB CDC feature, only support for BL706, and can't work with
138+
Ethernet Board
123139
- `-resetCnt`, enable feature to do factory reset when continues power cycle
124140
is greater than 3
125-
- `-mot`, to specify to use openthread stack under `third_party/openthread/repo`
141+
- `-mot`, to specify to use openthread stack under
142+
`third_party/openthread/repo`
126143
- Without `-mot` specified, Matter Thread will use openthread stack under
127144
`Bouffalo Lab` SDK
128145
- `-fp`, to specify to enable frame pointer feature to print call stack when
129146
hit an exception for debug purpose.
130147
131148
## Download image
132149
133-
- Using script `*.flash.py`.
150+
- Using script `*.flash.py`.
134151
135-
After building gets done, python script `*.flash.py` will generate under
136-
build output folder, such as
152+
After building gets done, python script `*.flash.py` will generate under
153+
build output folder, such as
137154
138-
- `chip-bl602-lighting-example.flash.py` for BL602
139-
- `chip-bl702-lighting-example.flash.py` for BL702
140-
- `chip-bl702l-lighting-example.flash.py` for BL702L
155+
- `chip-bl602-lighting-example.flash.py` for BL602
156+
- `chip-bl702-lighting-example.flash.py` for BL702
157+
- `chip-bl702l-lighting-example.flash.py` for BL702L
141158
142-
Download operation steps as below, please check `help` option of script for
143-
more detail.
159+
Download operation steps as below, please check `help` option of script for
160+
more detail.
144161
145-
- Connect the board to your build machine
162+
- Connect the board to your build machine
146163
147-
- Put the board to the download mode:
164+
- Put the board to the download mode:
148165
149-
- Press and hold the **BOOT** button.
150-
- Click the **RESET** or **EN** button.
151-
- Release the **BOOT** button.
166+
- Press and hold the **BOOT** button.
167+
- Click the **RESET** or **EN** button.
168+
- Release the **BOOT** button.
152169
153-
- Type following command for image download. Please set serial port
154-
accordingly, here we use /dev/ttyACM0 as a serial port example.
170+
- Type following command for image download. Please set serial port
171+
accordingly, here we use /dev/ttyACM0 as a serial port example.
155172
156-
- `BL602DK`, `BL704LDK` and `BL706DK`.
157-
158-
```shell
159-
./out/bouffalolab-bl602dk-light-littlefs/chip-bl602-lighting-example.flash.py --port /dev/ttyACM0
160-
./out/bouffalolab-bl704ldk-light-littlefs/chip-bl702l-lighting-example.flash.py --port /dev/ttyACM0
161-
./out/bouffalolab-bl706dk-light-littlefs/chip-bl702-lighting-example.flash.py --port /dev/ttyACM0
162-
```
163-
164-
- To wipe out flash and download image, please append `--erase` option. Take BL602DK as example.
165-
166-
```shell
167-
./out/bouffalolab-bl602dk-light-littlefs/chip-bl602-lighting-example.flash.py --port /dev/ttyACM0 --erase
168-
```
169-
170-
> Note, better to append --erase option to download image for BL602
171-
> develop board at first time.
173+
- `BL602DK`, `BL704LDK` and `BL706DK`.
174+
175+
176+
```shell
177+
./out/bouffalolab-bl602dk-light/chip-bl602-lighting-example.flash.py --port /dev/ttyACM0
178+
./out/bouffalolab-bl704ldk-light/chip-bl702l-lighting-example.flash.py --port /dev/ttyACM0
179+
./out/bouffalolab-bl706dk-light/chip-bl702-lighting-example.flash.py --port /dev/ttyACM0
180+
```
181+
182+
- To wipe out flash and download image, please append `--erase`
183+
option. Take BL602DK as example.
184+
185+
```shell
186+
./out/bouffalolab-bl602dk-light/chip-bl602-lighting-example.flash.py --port /dev/ttyACM0 --erase
187+
```
188+
189+
> Note, better to append --erase option to download image for BL602
190+
> develop board at first time.
172191
173192
## Run the example
174193
@@ -269,23 +288,25 @@ After successful commissioning, cluster commands available to control the board.
269288

270289
## Test OTA software upgrade with ota-provider-app
271290

272-
Please take [guide](../../ota-provider-app/linux/README.md) for more detail on ota-provider-app build and usage.
291+
Please take [guide](../../ota-provider-app/linux/README.md) for more detail on
292+
ota-provider-app build and usage.
273293

274294
### Create the Matter OTA image
275295

276-
Bouffalo Lab Matter OTA image contains two parts:
277-
278-
- Bouffalo Lab OTA bootable image:
279-
- Add boot parameters, signature/encryption if specified
280-
- And specify whether image has be compressed.
281-
- Add Matter recognition header by [ota_image_tool.py](../../../docs/guides/openthread_border_router_pi.md).
282-
296+
`Bouffalo Lab` Matter OTA image contains two parts:
283297

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

285-
Script `*.flash.py` builds Bouffalo Lab bootable image and call [ota_image_tool.py](../../../docs/guides/openthread_border_router_pi.md) to add Matter recognition header. Take `BL602DK` as example.
304+
Script `*.flash.py` builds `Bouffalo Lab` bootable image and call
305+
[ota_image_tool.py](../../../docs/guides/openthread_border_router_pi.md) to add
306+
Matter recognition header. Take `BL602DK` as example.
286307

287308
```shell
288-
./out/bouffalolab-bl602dk-light-littlefs/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>
309+
./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>
289310
```
290311

291312
> lighting-app.ota should have greater software version which is defined by

examples/lighting-app/bouffalolab/bl602/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+
2728
#is_debug = false
2829

2930
pw_build_LINK_DEPS = [

examples/lighting-app/bouffalolab/bl702/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+
2728
# use -Os instead of -Og
2829
is_debug = false
2930

examples/lighting-app/bouffalolab/common/AppTask.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
#include <app/server/Server.h>
2525
#include <credentials/DeviceAttestationCredsProvider.h>
2626
#include <credentials/examples/DeviceAttestationCredsExample.h>
27-
#include <system/SystemClock.h>
2827
#include <platform/bouffalolab/common/DiagnosticDataProviderImpl.h>
28+
#include <system/SystemClock.h>
2929

3030
#if HEAP_MONITORING
3131
#include "MemMonitoring.h"
@@ -134,7 +134,7 @@ void AppTask::PostEvent(app_event_t event)
134134
void AppTask::AppTaskMain(void * pvParameter)
135135
{
136136
app_event_t appEvent;
137-
bool onoff = false;
137+
bool onoff = false;
138138
uint64_t currentHeapFree = 0;
139139

140140
#if !(CHIP_DEVICE_LAYER_TARGET_BL702 && CHIP_DEVICE_CONFIG_ENABLE_ETHERNET)
@@ -187,7 +187,7 @@ void AppTask::AppTaskMain(void * pvParameter)
187187
vTaskSuspend(NULL);
188188

189189
DiagnosticDataProviderImpl::GetDefaultInstance().GetCurrentHeapFree(currentHeapFree);
190-
ChipLogProgress(NotSpecified, "App Task started, with SRAM heap %lld left\r\n",currentHeapFree);
190+
ChipLogProgress(NotSpecified, "App Task started, with SRAM heap %lld left\r\n", currentHeapFree);
191191

192192
while (true)
193193
{

examples/platform/bouffalolab/common/iot_sdk/platform_port.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,8 @@ extern "C" void vAssertCalled(void)
175175

176176
portABORT();
177177

178-
while (true) ;
178+
while (true)
179+
;
179180
}
180181

181182
extern "C" void user_vAssertCalled(void) __attribute__((weak, alias("vAssertCalled")));

examples/platform/bouffalolab/common/route_hook/bl_route_hook.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
#include <stdbool.h>
22
#include <string.h>
33

4-
#include <lwip/tcpip.h>
54
#include "lwip/icmp6.h"
65
#include "lwip/mld6.h"
76
#include "lwip/netif.h"
87
#include "lwip/prot/icmp6.h"
98
#include "lwip/prot/ip6.h"
109
#include "lwip/prot/nd6.h"
1110
#include "lwip/raw.h"
11+
#include <lwip/tcpip.h>
1212

1313
#include "bl_route_hook.h"
1414
#include "bl_route_table.h"

scripts/build/builders/bouffalolab.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def __init__(self,
110110
self.chip_name = bouffalo_chip
111111
self.app = app
112112
self.board = board
113-
113+
114114
toolchain = os.path.join(root, os.path.split(os.path.realpath(__file__))[0], '../../../config/bouffalolab/toolchain')
115115
toolchain = f'custom_toolchain="{toolchain}:riscv_gcc"'
116116
if toolchain:
@@ -161,7 +161,7 @@ def __init__(self,
161161

162162
self.argsOpt.append(f'chip_mdns="{chip_mdns}"')
163163
self.argsOpt.append(f'chip_inet_config_enable_ipv4={str(enable_ethernet or enable_wifi).lower()}')
164-
164+
165165
self.argsOpt.append(f'bouffalo_sdk_component_easyflash_enabled=true')
166166

167167
if enable_thread:
@@ -255,10 +255,10 @@ def PostBuildCommand(self):
255255
logging.info("Firmware is built out at: {}".format(path_fw))
256256
logging.info("Command to generate ota image: ")
257257
logging.info('./{} --build-ota --vendor-id <vendor id> --product-id <product id> '
258-
'--version <version> --version-str <version string> '
259-
'--digest-algorithm <digest algorithm>'.format(path_flash_script))
258+
'--version <version> --version-str <version string> '
259+
'--digest-algorithm <digest algorithm>'.format(path_flash_script))
260260
logging.info("Command to generate and sign ota image: ")
261261
logging.info('./{} --build-ota --vendor-id <vendor id> --product-id <product id> '
262-
'--version <version> --version-str <version string> '
263-
'--digest-algorithm <digest algorithm> --sk <private key>'.format(path_flash_script))
262+
'--version <version> --version-str <version string> '
263+
'--digest-algorithm <digest algorithm> --sk <private key>'.format(path_flash_script))
264264
logging.info('*' * 80)

0 commit comments

Comments
 (0)