diff --git a/examples/lighting-app/bouffalolab/README.md b/examples/lighting-app/bouffalolab/README.md index c3938d819c5ec8..b8a2661f2a80fe 100644 --- a/examples/lighting-app/bouffalolab/README.md +++ b/examples/lighting-app/bouffalolab/README.md @@ -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. diff --git a/examples/lighting-app/bouffalolab/bl702/BUILD.gn b/examples/lighting-app/bouffalolab/bl702/BUILD.gn index 7d6ae4db39c8f2..fa863ceaf699d3 100644 --- a/examples/lighting-app/bouffalolab/bl702/BUILD.gn +++ b/examples/lighting-app/bouffalolab/bl702/BUILD.gn @@ -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", ] } } diff --git a/examples/lighting-app/bouffalolab/bl702l/BUILD.gn b/examples/lighting-app/bouffalolab/bl702l/BUILD.gn index c21ffe472b5a7b..a3f4e3120e8092 100644 --- a/examples/lighting-app/bouffalolab/bl702l/BUILD.gn +++ b/examples/lighting-app/bouffalolab/bl702l/BUILD.gn @@ -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", ] } } diff --git a/scripts/build/build/targets.py b/scripts/build/build/targets.py index fb5e92fb38ca0f..21ad50d06c4d8d 100755 --- a/scripts/build/build/targets.py +++ b/scripts/build/build/targets.py @@ -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 diff --git a/scripts/build/builders/bouffalolab.py b/scripts/build/builders/bouffalolab.py index f6424e977b3d56..c4d4fc10f12ccd 100644 --- a/scripts/build/builders/bouffalolab.py +++ b/scripts/build/builders/bouffalolab.py @@ -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: @@ -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": diff --git a/scripts/build/testdata/all_targets_linux_x64.txt b/scripts/build/testdata/all_targets_linux_x64.txt index 7ed9c674b978f3..b58a05a1d9d651 100644 --- a/scripts/build/testdata/all_targets_linux_x64.txt +++ b/scripts/build/testdata/all_targets_linux_x64.txt @@ -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] diff --git a/third_party/bouffalolab/bl702/bl_iot_sdk.gni b/third_party/bouffalolab/bl702/bl_iot_sdk.gni index 357b69e95d3c24..1a8db3440e12f5 100644 --- a/third_party/bouffalolab/bl702/bl_iot_sdk.gni +++ b/third_party/bouffalolab/bl702/bl_iot_sdk.gni @@ -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", ] diff --git a/third_party/bouffalolab/bl702l/bl_iot_sdk.gni b/third_party/bouffalolab/bl702l/bl_iot_sdk.gni index 5928d22b18e05d..c0fdd3e41d3b8f 100644 --- a/third_party/bouffalolab/bl702l/bl_iot_sdk.gni +++ b/third_party/bouffalolab/bl702l/bl_iot_sdk.gni @@ -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", ] diff --git a/third_party/bouffalolab/repo b/third_party/bouffalolab/repo index 690b348635806f..f65861db5bee5b 160000 --- a/third_party/bouffalolab/repo +++ b/third_party/bouffalolab/repo @@ -1 +1 @@ -Subproject commit 690b348635806f312b61ddcc5b2c566daafe833e +Subproject commit f65861db5bee5b24aeeae5b6039cefabcdc57294