Skip to content

Commit 1696124

Browse files
wy-hhpull[bot]
authored andcommitted
[Bouffalolab] Use Openthread stack in Bouffalo Lab SDK by default (#29858)
* [Bouffalolab] Use Openthread stack under Bouffalo Lab SDK by default * Correct spell * only set openthread_root for thread enabled * Update test data * Fix restyle
1 parent 484a8b1 commit 1696124

File tree

9 files changed

+24
-17
lines changed

9 files changed

+24
-17
lines changed

examples/lighting-app/bouffalolab/README.md

+4
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,10 @@ develop `XT-ZB6-DevKit` and `BL706DK` bl706 board, and `BL704LDK` BL704L board .
127127
application.
128128
- `-thread`, to specify that connectivity Thread is enabled for Matter
129129
application.
130+
- `-mot`, to specify to use openthread stack under
131+
`third_party/openthread/repo`
132+
- Without `-mot` specified, Matter Thread will use openthread stack under
133+
`Bouffalo Lab` SDK
130134
- `-fp`, to specify to enable frame pointer feature to print call stack when
131135
hit an exception for debug purpose.
132136

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

+4-4
Original file line numberDiff line numberDiff line change
@@ -216,14 +216,14 @@ bouffalolab_executable("lighting_app") {
216216
if (chip_openthread_ftd) {
217217
defines += [ "CHIP_DEVICE_CONFIG_THREAD_FTD=1" ]
218218
deps += [
219-
"${chip_root}/third_party/openthread/repo:libopenthread-cli-ftd",
220-
"${chip_root}/third_party/openthread/repo:libopenthread-ftd",
219+
"${openthread_root}:libopenthread-cli-ftd",
220+
"${openthread_root}:libopenthread-ftd",
221221
]
222222
} else {
223223
defines += [ "CHIP_DEVICE_CONFIG_THREAD_FTD=0" ]
224224
deps += [
225-
"${chip_root}/third_party/openthread/repo:libopenthread-cli-mtd",
226-
"${chip_root}/third_party/openthread/repo:libopenthread-mtd",
225+
"${openthread_root}:libopenthread-cli-mtd",
226+
"${openthread_root}:libopenthread-mtd",
227227
]
228228
}
229229
}

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

+4-4
Original file line numberDiff line numberDiff line change
@@ -170,14 +170,14 @@ bouffalolab_executable("lighting_app") {
170170
if (chip_openthread_ftd) {
171171
defines += [ "CHIP_DEVICE_CONFIG_THREAD_FTD=1" ]
172172
deps += [
173-
"${chip_root}/third_party/openthread/repo:libopenthread-cli-ftd",
174-
"${chip_root}/third_party/openthread/repo:libopenthread-ftd",
173+
"${openthread_root}:libopenthread-cli-ftd",
174+
"${openthread_root}:libopenthread-ftd",
175175
]
176176
} else {
177177
defines += [ "CHIP_DEVICE_CONFIG_THREAD_FTD=0" ]
178178
deps += [
179-
"${chip_root}/third_party/openthread/repo:libopenthread-cli-mtd",
180-
"${chip_root}/third_party/openthread/repo:libopenthread-mtd",
179+
"${openthread_root}:libopenthread-cli-mtd",
180+
"${openthread_root}:libopenthread-mtd",
181181
]
182182
}
183183
}

scripts/build/build/targets.py

+1
Original file line numberDiff line numberDiff line change
@@ -655,6 +655,7 @@ def BuildBouffalolabTarget():
655655
target.AppendModifier('thread', enable_thread=True)
656656
target.AppendModifier('fp', enable_frame_ptr=True)
657657
target.AppendModifier('memmonitor', enable_heap_monitoring=True)
658+
target.AppendModifier('mot', use_matter_openthread=True)
658659

659660
return target
660661

scripts/build/builders/bouffalolab.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ def __init__(self,
9191
enable_wifi: bool = False,
9292
enable_thread: bool = False,
9393
enable_frame_ptr: bool = False,
94-
enable_heap_monitoring: bool = False
94+
enable_heap_monitoring: bool = False,
95+
use_matter_openthread: bool = False
9596
):
9697

9798
if 'BL602' == module_type:
@@ -166,6 +167,9 @@ def __init__(self,
166167

167168
if enable_thread:
168169
self.argsOpt.append(f'openthread_project_core_config_file="{bouffalo_chip}-openthread-core-bl-config.h"')
170+
if not use_matter_openthread:
171+
self.argsOpt.append(
172+
'openthread_root="//third_party/connectedhomeip/third_party/bouffalolab/repo/components/network/thread/openthread"')
169173

170174
if enable_cdc:
171175
if bouffalo_chip != "bl702":

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,kotlin-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][-memmonitor]
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][-mot]
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]

third_party/bouffalolab/bl702/bl_iot_sdk.gni

+2-3
Original file line numberDiff line numberDiff line change
@@ -715,9 +715,8 @@ template("bl_iot_sdk") {
715715
defines = [ "OT_FREERTOS_ENABLE=1" ]
716716

717717
include_dirs = [
718-
"${chip_root}/platform/bl702",
719-
"${chip_root}/third_party/openthread/repo/src/core",
720-
"${chip_root}/third_party/openthread/repo/examples/platforms",
718+
"${openthread_root}/src/core",
719+
"${openthread_root}/examples/platforms",
721720
"${bl_iot_sdk_root}/components/network/thread/openthread_port/include",
722721
"${bl_iot_sdk_root}/components/network/thread/openthread_utils/include",
723722
]

third_party/bouffalolab/bl702l/bl_iot_sdk.gni

+2-3
Original file line numberDiff line numberDiff line change
@@ -648,9 +648,8 @@ template("bl_iot_sdk") {
648648

649649
config("${sdk_target_name}_config_openthread_port") {
650650
include_dirs = [
651-
"${chip_root}/platform/bl702l",
652-
"${chip_root}/third_party/openthread/repo/src/core",
653-
"${chip_root}/third_party/openthread/repo/examples/platforms",
651+
"${openthread_root}/src/core",
652+
"${openthread_root}/examples/platforms",
654653
"${bl_iot_sdk_root}/components/network/thread/openthread_port/include",
655654
"${bl_iot_sdk_root}/components/network/thread/openthread_utils/include",
656655
]

third_party/bouffalolab/repo

Submodule repo updated 1 file

0 commit comments

Comments
 (0)