Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bouffalolab] Refact BL602 & BL702 platform code #27186

Merged
merged 11 commits into from
Jun 12, 2023
2 changes: 1 addition & 1 deletion examples/lighting-app/bouffalolab/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ ota-provider-app build and usage.
- BLE commission BL602/BL702 lighting if not commissioned.
- Start OTA software upgrade process
```shell
./chip-tool otasoftwareupdaterequestor announce-ota-provider 1 0 0 0 <node_id_to_lighting_app> 0
./chip-tool otasoftwareupdaterequestor announce-otaprovider 1 0 0 0 <node_id_to_lighting_app> 0
```
where `<node_id_to_lighting_app>` is node id of BL602/BL702 lighting app.
- After OTA software upgrade gets done, BL602/BL702 will get reboot
Expand Down
5 changes: 5 additions & 0 deletions examples/lighting-app/bouffalolab/bl702/args.gni
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,8 @@ lwip_platform = "bl702"

chip_enable_ota_requestor = true
chip_detail_logging = false

pw_build_LINK_DEPS = [
"$dir_pw_assert:impl",
"$dir_pw_log:impl",
]
2 changes: 1 addition & 1 deletion examples/lighting-app/bouffalolab/common/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@
#endif

#if CHIP_ENABLE_OPENTHREAD
#include <ThreadStackManagerImpl.h>
#include <platform/OpenThread/OpenThreadUtils.h>
#include <platform/ThreadStackManager.h>
#include <platform/bouffalolab/common/ThreadStackManagerImpl.h>
#include <utils_list.h>
#endif

Expand Down
1 change: 1 addition & 0 deletions examples/platform/bouffalolab/common/plat/OTAConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include "OTAConfig.h"
#include <app/server/Server.h>

#include <platform/bouffalolab/common/OTAImageProcessorImpl.h>
// Global OTA objects
chip::DefaultOTARequestor gRequestorCore;
chip::DefaultOTARequestorStorage gRequestorStorage;
Expand Down
1 change: 0 additions & 1 deletion examples/platform/bouffalolab/common/plat/OTAConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include <app/clusters/ota-requestor/DefaultOTARequestor.h>
#include <app/clusters/ota-requestor/DefaultOTARequestorDriver.h>
#include <app/clusters/ota-requestor/DefaultOTARequestorStorage.h>
#include <platform/bouffalolab/BL702/OTAImageProcessorImpl.h>

class OTAConfig
{
Expand Down
4 changes: 2 additions & 2 deletions examples/platform/bouffalolab/common/plat/platform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,17 @@
#include <app/clusters/network-commissioning/network-commissioning.h>
#include <route_hook/bl_route_hook.h>
#endif
#include <PlatformManagerImpl.h>
#include <platform/bouffalolab/common/PlatformManagerImpl.h>

#if HEAP_MONITORING
#include <MemMonitoring.h>
#include <lib/support/CHIPMem.h>
#endif

#if CHIP_ENABLE_OPENTHREAD
#include <ThreadStackManagerImpl.h>
#include <platform/OpenThread/OpenThreadUtils.h>
#include <platform/ThreadStackManager.h>
#include <platform/bouffalolab/common/ThreadStackManagerImpl.h>
#include <utils_list.h>
#endif

Expand Down
4 changes: 2 additions & 2 deletions src/platform/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -229,13 +229,13 @@ if (chip_device_platform != "none" && chip_device_platform != "external") {
} else if (chip_device_platform == "bl602") {
defines += [
"CHIP_DEVICE_LAYER_TARGET_BL602=1",
"CHIP_DEVICE_LAYER_TARGET=bouffalolab/BL602",
"CHIP_DEVICE_LAYER_TARGET=bouffalolab/common",
"CHIP_DEVICE_CONFIG_ENABLE_WIFI=${chip_enable_wifi}",
]
} else if (chip_device_platform == "bl702") {
defines += [
"CHIP_DEVICE_LAYER_TARGET_BL702=1",
"CHIP_DEVICE_LAYER_TARGET=bouffalolab/BL702",
"CHIP_DEVICE_LAYER_TARGET=bouffalolab/common",
"CHIP_DEVICE_CONFIG_ENABLE_WIFI=${chip_enable_wifi}",
]
} else if (chip_device_platform == "fake") {
Expand Down
Loading