Skip to content

Commit

Permalink
Fix restyle
Browse files Browse the repository at this point in the history
  • Loading branch information
wy-hh committed Oct 13, 2023
1 parent aff8d1d commit b69e713
Show file tree
Hide file tree
Showing 9 changed files with 45 additions and 41 deletions.
9 changes: 5 additions & 4 deletions examples/lighting-app/bouffalolab/bl602/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,10 @@ bouffalolab_executable("lighting_app") {
}

defines += [ "CONF_ENABLE_FRAME_PTR=${enable_debug_frame_ptr}" ]
defines += [ "CONFIG_BOUFFALOLAB_FACTORY_DATA_ENABLE=${chip_enable_factory_data}" ]
defines += [ "CONFIG_BOUFFALOLAB_FACTORY_DATA_TEST=${chip_enable_factory_data_test}" ]
defines +=
[ "CONFIG_BOUFFALOLAB_FACTORY_DATA_ENABLE=${chip_enable_factory_data}" ]
defines +=
[ "CONFIG_BOUFFALOLAB_FACTORY_DATA_TEST=${chip_enable_factory_data_test}" ]

bl_plat_name = "bl602"
sources = [
Expand Down Expand Up @@ -208,7 +210,6 @@ bouffalolab_executable("lighting_app") {
"${chip_root}/examples/common/pigweed/bouffalolab",
]
} else if (chip_build_libshell) {

deps += [ "${chip_root}/examples/shell/shell_common:shell_common" ]

include_dirs += [
Expand All @@ -221,7 +222,7 @@ bouffalolab_executable("lighting_app") {
if (enable_heap_monitoring) {
sources += [ "${examples_plat_dir}/common/plat/MemMonitoring.cpp" ]
}

cflags_c = [ "-Wno-sign-compare" ]
ldscript = "${examples_plat_dir}/bl602/ldscripts/flash_rom.ld"

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 @@ -138,8 +138,10 @@ bouffalolab_executable("lighting_app") {
]

defines += [ "CONF_ENABLE_FRAME_PTR=${enable_debug_frame_ptr}" ]
defines += [ "CONFIG_BOUFFALOLAB_FACTORY_DATA_ENABLE=${chip_enable_factory_data}" ]
defines += [ "CONFIG_BOUFFALOLAB_FACTORY_DATA_TEST=${chip_enable_factory_data_test}" ]
defines +=
[ "CONFIG_BOUFFALOLAB_FACTORY_DATA_ENABLE=${chip_enable_factory_data}" ]
defines +=
[ "CONFIG_BOUFFALOLAB_FACTORY_DATA_TEST=${chip_enable_factory_data_test}" ]
if (chip_config_network_layer_ble) {
defines += [ "CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE=1" ]
}
Expand Down Expand Up @@ -278,9 +280,7 @@ bouffalolab_executable("lighting_app") {
"${chip_root}/examples/common/pigweed/bouffalolab",
]
} else {

if (chip_build_libshell) {

include_dirs += [
"${chip_root}/src/lib/shell",
"${chip_root}/examples/shell/shell_common/include",
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 @@ -115,8 +115,10 @@ bouffalolab_executable("lighting_app") {
]

defines += [ "CONF_ENABLE_FRAME_PTR=${enable_debug_frame_ptr}" ]
defines += [ "CONFIG_BOUFFALOLAB_FACTORY_DATA_ENABLE=${chip_enable_factory_data}" ]
defines += [ "CONFIG_BOUFFALOLAB_FACTORY_DATA_TEST=${chip_enable_factory_data_test}" ]
defines +=
[ "CONFIG_BOUFFALOLAB_FACTORY_DATA_ENABLE=${chip_enable_factory_data}" ]
defines +=
[ "CONFIG_BOUFFALOLAB_FACTORY_DATA_TEST=${chip_enable_factory_data_test}" ]
if (chip_config_network_layer_ble) {
defines += [ "CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE=1" ]
}
Expand Down Expand Up @@ -240,9 +242,7 @@ bouffalolab_executable("lighting_app") {
"${chip_root}/examples/common/pigweed/bouffalolab",
]
} else {

if (chip_build_libshell) {

include_dirs += [
"${chip_root}/src/lib/shell",
"${chip_root}/examples/shell/shell_common/include",
Expand Down
20 changes: 10 additions & 10 deletions examples/platform/bouffalolab/common/iot_sdk/platform_port.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@

extern "C" {
#include <bl_irq.h>
#include <bl_sys.h>
#include <bl_sec.h>
#include <bl_rtc.h>
#include <bl_sec.h>
#include <bl_sys.h>
#include <hal_board.h>
#include <hal_boot2.h>
#if CHIP_DEVICE_LAYER_TARGET_BL602
Expand Down Expand Up @@ -109,7 +109,7 @@ extern "C" void vApplicationIdleHook(void)
}

extern "C" void vApplicationGetIdleTaskMemory(StaticTask_t ** ppxIdleTaskTCBBuffer, StackType_t ** ppxIdleTaskStackBuffer,
uint32_t * pulIdleTaskStackSize)
uint32_t * pulIdleTaskStackSize)
{
/* If the buffers to be provided to the Idle task are declared inside this
function then they must be declared static - otherwise they will be allocated on
Expand All @@ -132,7 +132,7 @@ extern "C" void vApplicationGetIdleTaskMemory(StaticTask_t ** ppxIdleTaskTCBBuff
application must provide an implementation of vApplicationGetTimerTaskMemory()
to provide the memory that is used by the Timer service task. */
extern "C" void vApplicationGetTimerTaskMemory(StaticTask_t ** ppxTimerTaskTCBBuffer, StackType_t ** ppxTimerTaskStackBuffer,
uint32_t * pulTimerTaskStackSize)
uint32_t * pulTimerTaskStackSize)
{
/* If the buffers to be provided to the Timer task are declared inside this
function then they must be declared static - otherwise they will be allocated on
Expand Down Expand Up @@ -243,20 +243,20 @@ extern "C" void bflb_assert(void) __attribute__((weak, alias("vAssertCalled")));
// ================================================================================
// Main Code
// ================================================================================
extern "C" uint8_t _heap_start;
extern "C" size_t _heap_size; // @suppress("Type cannot be resolved")
extern "C" uint8_t _heap_start;
extern "C" size_t _heap_size; // @suppress("Type cannot be resolved")

#if CHIP_DEVICE_LAYER_TARGET_BL602
extern "C" uint8_t _heap_wifi_start;
extern "C" uint8_t _heap_wifi_size; // @suppress("Type cannot be resolved")
extern "C" uint8_t _heap_wifi_start;
extern "C" uint8_t _heap_wifi_size; // @suppress("Type cannot be resolved")
static const HeapRegion_t xHeapRegions[] = {
{ &_heap_start, (unsigned int) &_heap_size }, // set on runtime
{ &_heap_wifi_start, (unsigned int) &_heap_wifi_size },
{ NULL, 0 } /* Terminates the array. */
};
#elif CHIP_DEVICE_LAYER_TARGET_BL702
extern "C" uint8_t _heap2_start;
extern "C" uint8_t _heap2_size; // @suppress("Type cannot be resolved")
extern "C" uint8_t _heap2_start;
extern "C" uint8_t _heap2_size; // @suppress("Type cannot be resolved")
static const HeapRegion_t xHeapRegions[] = {
{ &_heap_start, (size_t) &_heap_size }, // set on runtime
{ &_heap2_start, (size_t) &_heap2_size }, // set on runtime
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,5 +94,4 @@

#define ENABLE_OPENTHREAD_BORDER_ROUTER 0


#endif // OPENTHREAD_CORE_BL702_CONFIG_H_
1 change: 0 additions & 1 deletion src/platform/bouffalolab/common/CHIPDevicePlatformConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,3 @@
#elif CHIP_DEVICE_LAYER_TARGET_BL702
#define CHIP_CONFIG_FREERTOS_USE_STATIC_TASK 1
#endif

18 changes: 11 additions & 7 deletions third_party/bouffalolab/bl602/bl_iot_sdk.gni
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ template("bl_iot_sdk") {
"BL602_USE_HAL_DRIVER=1",

"CFG_CHIP_BL602",
"CFG_COMPONENT_BLOG_ENABLE=0"
"CFG_COMPONENT_BLOG_ENABLE=0",
]

include_dirs = []
Expand Down Expand Up @@ -210,7 +210,10 @@ template("bl_iot_sdk") {
}

source_set("${sdk_target_name}_hosal") {
defines = [ "CFG_BLE_ENABLE", "CONF_BL602_USE_1M_FLASH=0" ]
defines = [
"CFG_BLE_ENABLE",
"CONF_BL602_USE_1M_FLASH=0",
]
sources = [
"${bl_iot_sdk_root}/components/platform/hosal/bl602_hal/bl_adc.c",
"${bl_iot_sdk_root}/components/platform/hosal/bl602_hal/bl_boot2.c",
Expand Down Expand Up @@ -355,8 +358,10 @@ template("bl_iot_sdk") {
}

source_set("${sdk_target_name}_stage") {

defines = [ "EF_ENV_CACHE_TABLE_SIZE=64", "RHINO_CONFIG_WORKQUEUE=0" ]
defines = [
"EF_ENV_CACHE_TABLE_SIZE=64",
"RHINO_CONFIG_WORKQUEUE=0",
]
sources = [
"${bl_iot_sdk_root}/components/stage/blfdt/src/fdt.c",
"${bl_iot_sdk_root}/components/stage/blfdt/src/fdt_addresses.c",
Expand Down Expand Up @@ -471,7 +476,6 @@ template("bl_iot_sdk") {
}

source_set("${sdk_target_name}_mbedtls") {

defines = [ "MBEDTLS_ECP_ALT_KEEP_ORIGINAL=0" ]
include_dirs =
[ "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library" ]
Expand Down Expand Up @@ -700,7 +704,7 @@ template("bl_iot_sdk") {
"OS_USING_FREERTOS",
"CFG_VIRT_DEV_MAX=1",
"TDLS_ENABLE=0",
"CONFIG_NEWLIB_NANO_FORMAT=0"
"CONFIG_NEWLIB_NANO_FORMAT=0",
]
include_dirs = [
"${bl_iot_sdk_root}/components/os/bl_os_adapter/bl_os_adapter/include",
Expand All @@ -723,7 +727,7 @@ template("bl_iot_sdk") {
defines = [
"BL602_MATTER_SUPPORT",
"LWIP_IPV6",
"CONFIG_WPA_WAPI_PSK=0"
"CONFIG_WPA_WAPI_PSK=0",
]

include_dirs = [
Expand Down
9 changes: 5 additions & 4 deletions third_party/bouffalolab/bl702/bl_iot_sdk.gni
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ template("bl_iot_sdk") {
"BL702=BL702",
"BFLB_USE_ROM_DRIVER=1",
"BFLB_USE_HAL_DRIVER=1",
"CFG_COMPONENT_BLOG_ENABLE=0"
"CFG_COMPONENT_BLOG_ENABLE=0",
]

include_dirs = []
Expand Down Expand Up @@ -406,8 +406,10 @@ template("bl_iot_sdk") {
}

source_set("${sdk_target_name}_stage") {

defines = [ "EF_ENV_CACHE_TABLE_SIZE=64", "RHINO_CONFIG_WORKQUEUE=0" ]
defines = [
"EF_ENV_CACHE_TABLE_SIZE=64",
"RHINO_CONFIG_WORKQUEUE=0",
]
sources = [
"${bl_iot_sdk_root}/components/stage/blfdt/src/fdt.c",
"${bl_iot_sdk_root}/components/stage/blfdt/src/fdt_addresses.c",
Expand Down Expand Up @@ -522,7 +524,6 @@ template("bl_iot_sdk") {
}

source_set("${sdk_target_name}_mbedtls") {

defines = [ "MBEDTLS_ECP_ALT_KEEP_ORIGINAL=0" ]
include_dirs =
[ "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library" ]
Expand Down
12 changes: 6 additions & 6 deletions third_party/bouffalolab/bl702l/bl_iot_sdk.gni
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ template("bl_iot_sdk") {
"BL702L=BL702L",
"BFLB_USE_ROM_DRIVER=1",
"BFLB_USE_HAL_DRIVER=1",
"CFG_COMPONENT_BLOG_ENABLE=0"
"CFG_COMPONENT_BLOG_ENABLE=0",
]

include_dirs = []
Expand Down Expand Up @@ -333,8 +333,10 @@ template("bl_iot_sdk") {
}

source_set("${sdk_target_name}_stage") {

defines = [ "EF_ENV_CACHE_TABLE_SIZE=64", "RHINO_CONFIG_WORKQUEUE=0" ]
defines = [
"EF_ENV_CACHE_TABLE_SIZE=64",
"RHINO_CONFIG_WORKQUEUE=0",
]
sources = [
"${bl_iot_sdk_root}/components/stage/blfdt/src/fdt.c",
"${bl_iot_sdk_root}/components/stage/blfdt/src/fdt_addresses.c",
Expand Down Expand Up @@ -447,7 +449,6 @@ template("bl_iot_sdk") {
}

source_set("${sdk_target_name}_mbedtls") {

defines = [ "MBEDTLS_ECP_ALT_KEEP_ORIGINAL=0" ]
include_dirs =
[ "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library" ]
Expand Down Expand Up @@ -601,8 +602,8 @@ template("bl_iot_sdk") {
"${bl_iot_sdk_root}/components/network/ble/blestack/src/common/dec.c",
"${bl_iot_sdk_root}/components/network/ble/blestack/src/common/log.c",
"${bl_iot_sdk_root}/components/network/ble/blestack/src/common/poll.c",
"${bl_iot_sdk_root}/components/network/ble/blestack/src/common/work_q.c",
"${bl_iot_sdk_root}/components/network/ble/blestack/src/common/utils.c",
"${bl_iot_sdk_root}/components/network/ble/blestack/src/common/work_q.c",
"${bl_iot_sdk_root}/components/network/ble/blestack/src/hci_onchip/hci_driver.c",
"${bl_iot_sdk_root}/components/network/ble/blestack/src/host/att.c",
"${bl_iot_sdk_root}/components/network/ble/blestack/src/host/bl_host_assist.c",
Expand Down Expand Up @@ -697,7 +698,6 @@ template("bl_iot_sdk") {
]
}


config("${sdk_target_name}_config_factory_data") {
include_dirs = [ "${bl_iot_sdk_root}/components/network/matter/matter_factory_data/include" ]
}
Expand Down

0 comments on commit b69e713

Please sign in to comment.