Skip to content

Commit

Permalink
[Bouffalolab] Use Openthread stack in Bouffalo Lab SDK by default (#2…
Browse files Browse the repository at this point in the history
…9858)

* [Bouffalolab] Use Openthread stack under Bouffalo Lab SDK by default

* Correct spell

* only set openthread_root for thread enabled

* Update test data

* Fix restyle
  • Loading branch information
wy-hh authored and pull[bot] committed Feb 29, 2024
1 parent 484a8b1 commit 1696124
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 17 deletions.
4 changes: 4 additions & 0 deletions examples/lighting-app/bouffalolab/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,10 @@ develop `XT-ZB6-DevKit` and `BL706DK` bl706 board, and `BL704LDK` BL704L board .
application.
- `-thread`, to specify that connectivity Thread is enabled for Matter
application.
- `-mot`, to specify to use openthread stack under
`third_party/openthread/repo`
- Without `-mot` specified, Matter Thread will use openthread stack under
`Bouffalo Lab` SDK
- `-fp`, to specify to enable frame pointer feature to print call stack when
hit an exception for debug purpose.

Expand Down
8 changes: 4 additions & 4 deletions examples/lighting-app/bouffalolab/bl702/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -216,14 +216,14 @@ bouffalolab_executable("lighting_app") {
if (chip_openthread_ftd) {
defines += [ "CHIP_DEVICE_CONFIG_THREAD_FTD=1" ]
deps += [
"${chip_root}/third_party/openthread/repo:libopenthread-cli-ftd",
"${chip_root}/third_party/openthread/repo:libopenthread-ftd",
"${openthread_root}:libopenthread-cli-ftd",
"${openthread_root}:libopenthread-ftd",
]
} else {
defines += [ "CHIP_DEVICE_CONFIG_THREAD_FTD=0" ]
deps += [
"${chip_root}/third_party/openthread/repo:libopenthread-cli-mtd",
"${chip_root}/third_party/openthread/repo:libopenthread-mtd",
"${openthread_root}:libopenthread-cli-mtd",
"${openthread_root}:libopenthread-mtd",
]
}
}
Expand Down
8 changes: 4 additions & 4 deletions examples/lighting-app/bouffalolab/bl702l/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -170,14 +170,14 @@ bouffalolab_executable("lighting_app") {
if (chip_openthread_ftd) {
defines += [ "CHIP_DEVICE_CONFIG_THREAD_FTD=1" ]
deps += [
"${chip_root}/third_party/openthread/repo:libopenthread-cli-ftd",
"${chip_root}/third_party/openthread/repo:libopenthread-ftd",
"${openthread_root}:libopenthread-cli-ftd",
"${openthread_root}:libopenthread-ftd",
]
} else {
defines += [ "CHIP_DEVICE_CONFIG_THREAD_FTD=0" ]
deps += [
"${chip_root}/third_party/openthread/repo:libopenthread-cli-mtd",
"${chip_root}/third_party/openthread/repo:libopenthread-mtd",
"${openthread_root}:libopenthread-cli-mtd",
"${openthread_root}:libopenthread-mtd",
]
}
}
Expand Down
1 change: 1 addition & 0 deletions scripts/build/build/targets.py
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,7 @@ def BuildBouffalolabTarget():
target.AppendModifier('thread', enable_thread=True)
target.AppendModifier('fp', enable_frame_ptr=True)
target.AppendModifier('memmonitor', enable_heap_monitoring=True)
target.AppendModifier('mot', use_matter_openthread=True)

return target

Expand Down
6 changes: 5 additions & 1 deletion scripts/build/builders/bouffalolab.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ def __init__(self,
enable_wifi: bool = False,
enable_thread: bool = False,
enable_frame_ptr: bool = False,
enable_heap_monitoring: bool = False
enable_heap_monitoring: bool = False,
use_matter_openthread: bool = False
):

if 'BL602' == module_type:
Expand Down Expand Up @@ -166,6 +167,9 @@ def __init__(self,

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

if enable_cdc:
if bouffalo_chip != "bl702":
Expand Down
2 changes: 1 addition & 1 deletion scripts/build/testdata/all_targets_linux_x64.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ameba-amebad-{all-clusters,all-clusters-minimal,light,light-switch,pigweed}
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]
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]
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]
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]
cc32xx-lock
ti-cc13x2x7_26x2x7-{lighting,lock,pump,pump-controller}[-mtd]
ti-cc13x4_26x4-{all-clusters,lighting,lock,pump,pump-controller}[-mtd][-ftd]
Expand Down
5 changes: 2 additions & 3 deletions third_party/bouffalolab/bl702/bl_iot_sdk.gni
Original file line number Diff line number Diff line change
Expand Up @@ -715,9 +715,8 @@ template("bl_iot_sdk") {
defines = [ "OT_FREERTOS_ENABLE=1" ]

include_dirs = [
"${chip_root}/platform/bl702",
"${chip_root}/third_party/openthread/repo/src/core",
"${chip_root}/third_party/openthread/repo/examples/platforms",
"${openthread_root}/src/core",
"${openthread_root}/examples/platforms",
"${bl_iot_sdk_root}/components/network/thread/openthread_port/include",
"${bl_iot_sdk_root}/components/network/thread/openthread_utils/include",
]
Expand Down
5 changes: 2 additions & 3 deletions third_party/bouffalolab/bl702l/bl_iot_sdk.gni
Original file line number Diff line number Diff line change
Expand Up @@ -648,9 +648,8 @@ template("bl_iot_sdk") {

config("${sdk_target_name}_config_openthread_port") {
include_dirs = [
"${chip_root}/platform/bl702l",
"${chip_root}/third_party/openthread/repo/src/core",
"${chip_root}/third_party/openthread/repo/examples/platforms",
"${openthread_root}/src/core",
"${openthread_root}/examples/platforms",
"${bl_iot_sdk_root}/components/network/thread/openthread_port/include",
"${bl_iot_sdk_root}/components/network/thread/openthread_utils/include",
]
Expand Down
2 changes: 1 addition & 1 deletion third_party/bouffalolab/repo
Submodule repo updated 1 files
+1 −1 components

0 comments on commit 1696124

Please sign in to comment.