diff --git a/examples/lighting-app/bouffalolab/bl602/BUILD.gn b/examples/lighting-app/bouffalolab/bl602/BUILD.gn index 0a25abda2a2ce0..b24c8731b08efe 100644 --- a/examples/lighting-app/bouffalolab/bl602/BUILD.gn +++ b/examples/lighting-app/bouffalolab/bl602/BUILD.gn @@ -79,9 +79,9 @@ bl_iot_sdk("sdk") { "CHIP_SYSTEM_CRYPTO_HEADER_RESERVE_SIZE=48", ] + defines += [ "PW_RPC_ENABLED=${chip_enable_pw_rpc}" ] if (chip_enable_pw_rpc) { include_dirs += [ "${examples_plat_dir}/common/rpc" ] - defines += [ "PW_RPC_ENABLED=1" ] defines += [ "DISABLE_PRINT=1" ] } else if (chip_build_libshell) { include_dirs += [ "${examples_plat_dir}/common/plat" ] @@ -101,26 +101,20 @@ bouffalolab_executable("lighting_app") { defines = [ "APP_TASK_STACK_SIZE=2044", "CHIP_UART_BAUDRATE=${baudrate}", - "BL602_ENABLE=1", "START_ENTRY=bfl_main", "SYS_AOS_LOOP_ENABLE", ] - if (enable_debug_frame_ptr) { - defines += [ "CONF_ENABLE_FRAME_PTR=1" ] - } - if (false == enable_reset_counter) { defines += [ "BOOT_PIN_RESET=8" ] } - if (chip_enable_factory_data) { - defines += [ "CONFIG_BOUFFALOLAB_FACTORY_DATA_ENABLE=1" ] - } - - if (chip_enable_factory_data_test) { - defines += [ "CONFIG_BOUFFALOLAB_FACTORY_DATA_TEST=1" ] - } + 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}", + ] bl_plat_name = "bl602" sources = [ @@ -140,8 +134,8 @@ bouffalolab_executable("lighting_app") { "${example_dir}/common/ZclCallbacks.cpp", "${examples_plat_dir}/common/iot_sdk/aos_task.c", "${examples_plat_dir}/common/iot_sdk/demo_pwm.c", - "${examples_plat_dir}/common/iot_sdk/platform_port.c", - "${examples_plat_dir}/common/iot_sdk/uart.c", + "${examples_plat_dir}/common/iot_sdk/platform_port.cpp", + "${examples_plat_dir}/common/iot_sdk/uart.cpp", "${examples_plat_dir}/common/plat/LEDWidget.cpp", "${examples_plat_dir}/common/plat/OTAConfig.cpp", "${examples_plat_dir}/common/plat/main.cpp", @@ -167,9 +161,10 @@ bouffalolab_executable("lighting_app") { "${examples_plat_dir}/common/iot_sdk", ] + defines += [ "CONFIG_ENABLE_CHIP_SHELL=${chip_build_libshell}" ] + defines += [ "PW_RPC_ENABLED=${chip_enable_pw_rpc}" ] if (chip_enable_pw_rpc) { defines += [ - "PW_RPC_ENABLED", "PW_RPC_ATTRIBUTE_SERVICE=1", "PW_RPC_BUTTON_SERVICE=1", "PW_RPC_DESCRIPTOR_SERVICE=1", @@ -216,8 +211,6 @@ bouffalolab_executable("lighting_app") { "${chip_root}/examples/common/pigweed/bouffalolab", ] } else if (chip_build_libshell) { - defines += [ "CONFIG_ENABLE_CHIP_SHELL=1" ] - deps += [ "${chip_root}/examples/shell/shell_common:shell_common" ] include_dirs += [ @@ -226,9 +219,9 @@ bouffalolab_executable("lighting_app") { ] } + defines += [ "HEAP_MONITORING=${enable_heap_monitoring}" ] if (enable_heap_monitoring) { sources += [ "${examples_plat_dir}/common/plat/MemMonitoring.cpp" ] - defines += [ "HEAP_MONITORING=1" ] } cflags_c = [ "-Wno-sign-compare" ] diff --git a/examples/lighting-app/bouffalolab/bl702/BUILD.gn b/examples/lighting-app/bouffalolab/bl702/BUILD.gn index 0becfce3e9e117..7d6ae4db39c8f2 100644 --- a/examples/lighting-app/bouffalolab/bl702/BUILD.gn +++ b/examples/lighting-app/bouffalolab/bl702/BUILD.gn @@ -82,20 +82,21 @@ bl_iot_sdk("sdk") { "PRINT_DEBUG=0", ] + defines += [ "PW_RPC_ENABLED=${chip_enable_pw_rpc}" ] if (chip_enable_pw_rpc) { include_dirs += [ "${examples_plat_dir}/common/rpc" ] - defines += [ "PW_RPC_ENABLED=1" ] defines += [ "DISABLE_PRINT=1" ] - } else if (chip_build_libshell) { - include_dirs += [ "${examples_plat_dir}/common/plat" ] + } else { + if (chip_build_libshell) { + include_dirs += [ "${examples_plat_dir}/common/plat" ] + } } - defines += [ "CHIP_DEVICE_CONFIG_ENABLE_ETHERNET=${chip_enable_ethernet}" ] - if (chip_enable_wifi || chip_enable_ethernet) { include_dirs += [ "${examples_plat_dir}/bl702/lwipopts" ] } + defines += [ "CHIP_DEVICE_CONFIG_ENABLE_ETHERNET=${chip_enable_ethernet}" ] if (chip_enable_ethernet) { defines += [ "CHIP_SYSTEM_CRYPTO_HEADER_RESERVE_SIZE=48" ] } @@ -133,14 +134,15 @@ bouffalolab_executable("lighting_app") { defines = [ "APP_TASK_STACK_SIZE=2048", "CHIP_UART_BAUDRATE=${baudrate}", - "BL702_ENABLE=1", "START_ENTRY=bl702_main", ] - if (enable_debug_frame_ptr) { - defines += [ "CONF_ENABLE_FRAME_PTR=1" ] - } - + 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}", + ] if (chip_config_network_layer_ble) { defines += [ "CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE=1" ] } @@ -149,14 +151,6 @@ bouffalolab_executable("lighting_app") { defines += [ "BOOT_PIN_RESET=31" ] } - if (chip_enable_factory_data) { - defines += [ "CONFIG_BOUFFALOLAB_FACTORY_DATA_ENABLE=1" ] - } - - if (chip_enable_factory_data_test) { - defines += [ "CONFIG_BOUFFALOLAB_FACTORY_DATA_TEST=1" ] - } - if ("XT-ZB6-DevKit" == board) { defines += [ "XT_ZB6_DevKit" ] } else if ("BL706-NIGHT-LIGHT" == board) { @@ -168,8 +162,8 @@ bouffalolab_executable("lighting_app") { "${example_dir}/common/ZclCallbacks.cpp", "${examples_plat_dir}/common/iot_sdk/aos_task.c", "${examples_plat_dir}/common/iot_sdk/demo_pwm.c", - "${examples_plat_dir}/common/iot_sdk/platform_port.c", - "${examples_plat_dir}/common/iot_sdk/uart.c", + "${examples_plat_dir}/common/iot_sdk/platform_port.cpp", + "${examples_plat_dir}/common/iot_sdk/uart.cpp", "${examples_plat_dir}/common/plat/LEDWidget.cpp", "${examples_plat_dir}/common/plat/OTAConfig.cpp", "${examples_plat_dir}/common/plat/main.cpp", @@ -196,10 +190,6 @@ bouffalolab_executable("lighting_app") { include_dirs += [ "${examples_plat_dir}/bl702/lwipopts" ] } - if (enable_psram) { - defines += [ "CFG_USE_PSRAM=1" ] - } - if (defined(enable_cdc_module) && enable_cdc_module) { defines += [ "CFG_USB_CDC_ENABLE" ] } @@ -238,9 +228,10 @@ bouffalolab_executable("lighting_app") { } } + defines += [ "CONFIG_ENABLE_CHIP_SHELL=${chip_build_libshell}" ] + defines += [ "PW_RPC_ENABLED=${chip_enable_pw_rpc}" ] if (chip_enable_pw_rpc) { defines += [ - "PW_RPC_ENABLED=1", "PW_RPC_ATTRIBUTE_SERVICE=1", "PW_RPC_BUTTON_SERVICE=1", "PW_RPC_DESCRIPTOR_SERVICE=1", @@ -289,23 +280,24 @@ bouffalolab_executable("lighting_app") { "${chip_root}/examples/common", "${chip_root}/examples/common/pigweed/bouffalolab", ] - } else if (chip_build_libshell) { - defines += [ "CONFIG_ENABLE_CHIP_SHELL=${chip_build_libshell}" ] - - include_dirs += [ - "${chip_root}/src/lib/shell", - "${chip_root}/examples/shell/shell_common/include", - ] + } else { + if (chip_build_libshell) { + include_dirs += [ + "${chip_root}/src/lib/shell", + "${chip_root}/examples/shell/shell_common/include", + ] - deps += [ "${chip_root}/examples/shell/shell_common:shell_common" ] + deps += [ "${chip_root}/examples/shell/shell_common:shell_common" ] + } } + defines += [ "HEAP_MONITORING=${enable_heap_monitoring}" ] if (enable_heap_monitoring) { sources += [ "${examples_plat_dir}/common/plat/MemMonitoring.cpp" ] - defines += [ "HEAP_MONITORING=1" ] } if (enable_psram) { + defines += [ "CFG_USE_PSRAM=1" ] ldscript = "${examples_plat_dir}/bl702/ldscripts/psram_flash.ld" } else { ldscript = "${examples_plat_dir}/bl702/ldscripts/flash.ld" diff --git a/examples/lighting-app/bouffalolab/bl702l/BUILD.gn b/examples/lighting-app/bouffalolab/bl702l/BUILD.gn index 6c081df89860cf..c21ffe472b5a7b 100644 --- a/examples/lighting-app/bouffalolab/bl702l/BUILD.gn +++ b/examples/lighting-app/bouffalolab/bl702l/BUILD.gn @@ -80,9 +80,9 @@ bl_iot_sdk("sdk") { "PRINT_DEBUG=0", ] + defines += [ "PW_RPC_ENABLED=${chip_enable_pw_rpc}" ] if (chip_enable_pw_rpc) { include_dirs += [ "${examples_plat_dir}/common/rpc" ] - defines += [ "PW_RPC_ENABLED=1" ] defines += [ "DISABLE_PRINT=1" ] } else if (chip_build_libshell) { include_dirs += [ "${examples_plat_dir}/common/plat" ] @@ -111,14 +111,15 @@ bouffalolab_executable("lighting_app") { defines = [ "APP_TASK_STACK_SIZE=2048", "CHIP_UART_BAUDRATE=${baudrate}", - "BL702L_ENABLE=1", "START_ENTRY=bl702_main", ] - if (enable_debug_frame_ptr) { - defines += [ "CONF_ENABLE_FRAME_PTR=1" ] - } - + 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}", + ] if (chip_config_network_layer_ble) { defines += [ "CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE=1" ] } @@ -127,14 +128,6 @@ bouffalolab_executable("lighting_app") { defines += [ "BOOT_PIN_RESET=16" ] } - if (chip_enable_factory_data) { - defines += [ "CONFIG_BOUFFALOLAB_FACTORY_DATA_ENABLE=1" ] - } - - if (chip_enable_factory_data_test) { - defines += [ "CONFIG_BOUFFALOLAB_FACTORY_DATA_TEST=1" ] - } - if ("BL704LDK" == board) { defines += [ "XT_ZB6_DevKit" ] } @@ -144,8 +137,8 @@ bouffalolab_executable("lighting_app") { "${example_dir}/common/ZclCallbacks.cpp", "${examples_plat_dir}/common/iot_sdk/aos_task.c", "${examples_plat_dir}/common/iot_sdk/demo_pwm.c", - "${examples_plat_dir}/common/iot_sdk/platform_port.c", - "${examples_plat_dir}/common/iot_sdk/uart.c", + "${examples_plat_dir}/common/iot_sdk/platform_port.cpp", + "${examples_plat_dir}/common/iot_sdk/uart.cpp", "${examples_plat_dir}/common/plat/LEDWidget.cpp", "${examples_plat_dir}/common/plat/OTAConfig.cpp", "${examples_plat_dir}/common/plat/main.cpp", @@ -168,10 +161,6 @@ bouffalolab_executable("lighting_app") { "${examples_plat_dir}/common/iot_sdk", ] - if (enable_psram) { - defines += [ "CFG_USE_PSRAM=1" ] - } - if (chip_enable_openthread) { deps += [ "${chip_root}/third_party/openthread/platforms:libopenthread-platform", @@ -201,9 +190,10 @@ bouffalolab_executable("lighting_app") { ] } + defines += [ "CONFIG_ENABLE_CHIP_SHELL=${chip_build_libshell}" ] + defines += [ "PW_RPC_ENABLED=${chip_enable_pw_rpc}" ] if (chip_enable_pw_rpc) { defines += [ - "PW_RPC_ENABLED=1", "PW_RPC_ATTRIBUTE_SERVICE=1", "PW_RPC_BUTTON_SERVICE=1", "PW_RPC_DESCRIPTOR_SERVICE=1", @@ -252,23 +242,24 @@ bouffalolab_executable("lighting_app") { "${chip_root}/examples/common", "${chip_root}/examples/common/pigweed/bouffalolab", ] - } else if (chip_build_libshell) { - defines += [ "CONFIG_ENABLE_CHIP_SHELL=${chip_build_libshell}" ] - - deps += [ "${chip_root}/examples/shell/shell_common:shell_common" ] + } else { + if (chip_build_libshell) { + include_dirs += [ + "${chip_root}/src/lib/shell", + "${chip_root}/examples/shell/shell_common/include", + ] - include_dirs += [ - "${chip_root}/src/lib/shell", - "${chip_root}/examples/shell/shell_common/include", - ] + deps += [ "${chip_root}/examples/shell/shell_common:shell_common" ] + } } + defines += [ "HEAP_MONITORING=${enable_heap_monitoring}" ] if (enable_heap_monitoring) { sources += [ "${examples_plat_dir}/common/plat/MemMonitoring.cpp" ] - defines += [ "HEAP_MONITORING=1" ] } if (enable_psram) { + defines += [ "CFG_USE_PSRAM=1" ] ldscript = "${examples_plat_dir}/bl702l/ldscripts/psram_flash_rom.ld" } else { ldscript = "${examples_plat_dir}/bl702l/ldscripts/flash_rom.ld" diff --git a/examples/lighting-app/bouffalolab/common/AppTask.cpp b/examples/lighting-app/bouffalolab/common/AppTask.cpp index ee0ead05c6e8c6..a0eb17fd747eec 100644 --- a/examples/lighting-app/bouffalolab/common/AppTask.cpp +++ b/examples/lighting-app/bouffalolab/common/AppTask.cpp @@ -135,7 +135,7 @@ void AppTask::AppTaskMain(void * pvParameter) app_event_t appEvent; bool onoff = false; -#if !(BL702_ENABLE && CHIP_DEVICE_CONFIG_ENABLE_ETHERNET) +#if !(CHIP_DEVICE_LAYER_TARGET_BL702 && CHIP_DEVICE_CONFIG_ENABLE_ETHERNET) sLightLED.Init(); #endif diff --git a/examples/platform/bouffalolab/bl602/lwipopts/lwipopts.h b/examples/platform/bouffalolab/bl602/lwipopts/lwipopts.h index dd304f96d66a15..dea0e2e715136d 100644 --- a/examples/platform/bouffalolab/bl602/lwipopts/lwipopts.h +++ b/examples/platform/bouffalolab/bl602/lwipopts/lwipopts.h @@ -249,6 +249,7 @@ a lot of data that needs to be copied, this should be set high. */ #define LWIP_NETIF_LINK_CALLBACK 1 /*Enable dns*/ +#define LWIP_DNS_SERVER 0 #define LWIP_DNS 1 #define LWIP_DNS_SECURE 0 @@ -271,6 +272,8 @@ a lot of data that needs to be copied, this should be set high. */ /* PBUF_POOL_BUFSIZE: the size of each pbuf in the pbuf pool. */ #define PBUF_POOL_BUFSIZE LWIP_MEM_ALIGN_SIZE(TCP_MSS + 40 + PBUF_LINK_ENCAPSULATION_HLEN + PBUF_LINK_HLEN) +#define LWIP_PBUF_FROM_CUSTOM_POOLS (0) + /* --------------------------------- ---------- MISC. options ---------- diff --git a/examples/platform/bouffalolab/bl702/lwipopts/lwipopts.h b/examples/platform/bouffalolab/bl702/lwipopts/lwipopts.h index 0ed28096088524..981b17d14d9869 100644 --- a/examples/platform/bouffalolab/bl702/lwipopts/lwipopts.h +++ b/examples/platform/bouffalolab/bl702/lwipopts/lwipopts.h @@ -261,6 +261,7 @@ a lot of data that needs to be copied, this should be set high. */ #define LWIP_NETIF_LINK_CALLBACK 1 /*Enable dns*/ +#define LWIP_DNS_SERVER 0 #define LWIP_DNS 1 #define LWIP_DNS_SECURE 0 @@ -283,6 +284,7 @@ a lot of data that needs to be copied, this should be set high. */ /* PBUF_POOL_BUFSIZE: the size of each pbuf in the pbuf pool. */ #define PBUF_POOL_BUFSIZE LWIP_MEM_ALIGN_SIZE(TCP_MSS + 40 + PBUF_LINK_ENCAPSULATION_HLEN + PBUF_LINK_HLEN) +#define LWIP_PBUF_FROM_CUSTOM_POOLS (0) /* --------------------------------- ---------- MISC. options ---------- diff --git a/examples/platform/bouffalolab/common/iot_sdk/platform_port.c b/examples/platform/bouffalolab/common/iot_sdk/platform_port.cpp similarity index 76% rename from examples/platform/bouffalolab/common/iot_sdk/platform_port.c rename to examples/platform/bouffalolab/common/iot_sdk/platform_port.cpp index 472615ac33cd8b..55748704056a82 100644 --- a/examples/platform/bouffalolab/common/iot_sdk/platform_port.c +++ b/examples/platform/bouffalolab/common/iot_sdk/platform_port.cpp @@ -23,39 +23,44 @@ #include #include +#include + #include #include -#if BL702_ENABLE +#if CHIP_DEVICE_LAYER_TARGET_BL702 #include #include -#elif BL702L_ENABLE +#elif CHIP_DEVICE_LAYER_TARGET_BL702L #include #include -#elif BL602_ENABLE -#include -#endif -#include -#if BL702L_ENABLE -#include #endif -#include -#include + #ifdef CFG_USE_PSRAM #include #endif #include -#include -#include #include -#if BL702L_ENABLE +extern "C" { +#include +#include +#include +#include +#include +#include +#if CHIP_DEVICE_LAYER_TARGET_BL602 +#include +#endif + +#if CHIP_DEVICE_LAYER_TARGET_BL702L #include #include #include #endif +} #include @@ -65,21 +70,21 @@ HOSAL_UART_DEV_DECL(uart_stdio, CHIP_UART_PORT, CHIP_UART_PIN_TX, CHIP_UART_PIN_RX, CHIP_UART_BAUDRATE); #ifdef SYS_AOS_LOOP_ENABLE -void aos_loop_start(void); +extern "C" void aos_loop_start(void); #endif // ================================================================================ // FreeRTOS Callbacks // ================================================================================ -unsigned int sleep(unsigned int seconds) +extern "C" unsigned int sleep(unsigned int seconds) { const TickType_t xDelay = 1000 * seconds / portTICK_PERIOD_MS; vTaskDelay(xDelay); return 0; } -#if !BL702L_ENABLE -void vApplicationStackOverflowHook(TaskHandle_t xTask, char * pcTaskName) +#if !CHIP_DEVICE_LAYER_TARGET_BL702L +extern "C" void vApplicationStackOverflowHook(TaskHandle_t xTask, char * pcTaskName) { printf("Stack Overflow checked. Stack name %s", pcTaskName); while (true) @@ -88,7 +93,7 @@ void vApplicationStackOverflowHook(TaskHandle_t xTask, char * pcTaskName) } } -void vApplicationMallocFailedHook(void) +extern "C" void vApplicationMallocFailedHook(void) { printf("Memory Allocate Failed. Current left size is %d bytes", xPortGetFreeHeapSize()); while (true) @@ -97,14 +102,14 @@ void vApplicationMallocFailedHook(void) } } -void vApplicationIdleHook(void) +extern "C" void vApplicationIdleHook(void) { // bl_wdt_feed(); __asm volatile(" wfi "); } -void vApplicationGetIdleTaskMemory(StaticTask_t ** ppxIdleTaskTCBBuffer, StackType_t ** ppxIdleTaskStackBuffer, - uint32_t * pulIdleTaskStackSize) +extern "C" void vApplicationGetIdleTaskMemory(StaticTask_t ** ppxIdleTaskTCBBuffer, StackType_t ** ppxIdleTaskStackBuffer, + 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 @@ -126,8 +131,8 @@ void vApplicationGetIdleTaskMemory(StaticTask_t ** ppxIdleTaskTCBBuffer, StackTy /* configSUPPORT_STATIC_ALLOCATION and configUSE_TIMERS are both set to 1, so the application must provide an implementation of vApplicationGetTimerTaskMemory() to provide the memory that is used by the Timer service task. */ -void vApplicationGetTimerTaskMemory(StaticTask_t ** ppxTimerTaskTCBBuffer, StackType_t ** ppxTimerTaskStackBuffer, - uint32_t * pulTimerTaskStackSize) +extern "C" void vApplicationGetTimerTaskMemory(StaticTask_t ** ppxTimerTaskTCBBuffer, StackType_t ** ppxTimerTaskStackBuffer, + 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 @@ -147,7 +152,7 @@ void vApplicationGetTimerTaskMemory(StaticTask_t ** ppxTimerTaskTCBBuffer, Stack } #if (configUSE_TICK_HOOK != 0) -void vApplicationTickHook(void) +extern "C" void vApplicationTickHook(void) { #if defined(CFG_USB_CDC_ENABLE) extern void usb_cdc_monitor(void); @@ -156,9 +161,9 @@ void vApplicationTickHook(void) } #endif -void vApplicationSleep(TickType_t xExpectedIdleTime) {} +extern "C" void vApplicationSleep(TickType_t xExpectedIdleTime) {} -void vAssertCalled(void) +extern "C" void vAssertCalled(void) { void * ra = (void *) __builtin_return_address(0); @@ -184,8 +189,8 @@ void vAssertCalled(void) } #endif -#if BL702L_ENABLE -void __attribute__((weak)) user_vAssertCalled(void) +#if CHIP_DEVICE_LAYER_TARGET_BL702L +extern "C" void __attribute__((weak)) user_vAssertCalled(void) { void * ra = (void *) __builtin_return_address(0); @@ -204,7 +209,7 @@ void __attribute__((weak)) user_vAssertCalled(void) ; } -void __attribute__((weak)) user_vApplicationStackOverflowHook(TaskHandle_t xTask, char * pcTaskName) +extern "C" void __attribute__((weak)) user_vApplicationStackOverflowHook(TaskHandle_t xTask, char * pcTaskName) { puts("Stack Overflow checked\r\n"); if (pcTaskName) @@ -217,7 +222,7 @@ void __attribute__((weak)) user_vApplicationStackOverflowHook(TaskHandle_t xTask } } -void __attribute__((weak)) user_vApplicationMallocFailedHook(void) +extern "C" void __attribute__((weak)) user_vApplicationMallocFailedHook(void) { printf("Memory Allocate Failed. Current left size is %d bytes\r\n", xPortGetFreeHeapSize()); #if defined(CFG_USE_PSRAM) @@ -229,35 +234,35 @@ void __attribute__((weak)) user_vApplicationMallocFailedHook(void) } } -void bflb_assert(void) __attribute__((weak, alias("user_vAssertCalled"))); +extern "C" void bflb_assert(void) __attribute__((weak, alias("user_vAssertCalled"))); #else -void user_vAssertCalled(void) __attribute__((weak, alias("vAssertCalled"))); -void bflb_assert(void) __attribute__((weak, alias("vAssertCalled"))); +extern "C" void user_vAssertCalled(void) __attribute__((weak, alias("vAssertCalled"))); +extern "C" void bflb_assert(void) __attribute__((weak, alias("vAssertCalled"))); #endif // ================================================================================ // Main Code // ================================================================================ -extern uint8_t _heap_start; -extern 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 BL602_ENABLE -extern uint8_t _heap_wifi_start; -extern uint8_t _heap_wifi_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") 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 BL702_ENABLE -extern uint8_t _heap2_start; -extern uint8_t _heap2_size; // @suppress("Type cannot be resolved") +#elif CHIP_DEVICE_LAYER_TARGET_BL702 +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 { NULL, 0 } /* Terminates the array. */ }; -#elif BL702L_ENABLE +#elif CHIP_DEVICE_LAYER_TARGET_BL702L static const HeapRegion_t xHeapRegions[] = { { &_heap_start, (size_t) &_heap_size }, // set on runtime { NULL, 0 } /* Terminates the array. */ @@ -265,18 +270,18 @@ static const HeapRegion_t xHeapRegions[] = { #endif #ifdef CFG_USE_PSRAM -extern uint32_t __psram_bss_init_start; -extern uint32_t __psram_bss_init_end; +extern "C" uint8_t __psram_bss_init_start; +extern "C" uint8_t __psram_bss_init_end; static uint32_t __attribute__((section(".rsvd_data"))) psram_reset_count; -extern uint8_t _heap3_start; -extern size_t _heap3_size; // @suppress("Type cannot be resolved") +extern "C" uint8_t _heap3_start; +extern "C" size_t _heap3_size; // @suppress("Type cannot be resolved") static const HeapRegion_t xPsramHeapRegions[] = { { &_heap3_start, (size_t) &_heap3_size }, { NULL, 0 } /* Terminates the array. */ }; -size_t get_heap3_size(void) +extern "C" size_t get_heap3_size(void) { return (size_t) &_heap3_size; } @@ -303,7 +308,7 @@ void do_psram_test() break; } - arch_memset4(&__psram_bss_init_start, 0, &__psram_bss_init_end - &__psram_bss_init_start); + memset(&__psram_bss_init_start, 0, &__psram_bss_init_end - &__psram_bss_init_start); psram_reset_count = 0xffffff00; return; @@ -325,13 +330,13 @@ void do_psram_test() } #endif -void setup_heap() +extern "C" void setup_heap() { bl_sys_init(); -#if BL702_ENABLE +#if CHIP_DEVICE_LAYER_TARGET_BL702 bl_sys_em_config(); -#elif BL702L_ENABLE +#elif CHIP_DEVICE_LAYER_TARGET_BL702L bl_sys_em_config(); // Initialize rom data @@ -341,7 +346,7 @@ void setup_heap() memcpy((void *) &_rom_data_run, (void *) &_rom_data_load, (size_t) &_rom_data_size); #endif -#if BL702_ENABLE +#if CHIP_DEVICE_LAYER_TARGET_BL702 extern uint8_t __ocram_bss_start[], __ocram_bss_end[]; if (NULL != __ocram_bss_start && NULL != __ocram_bss_end && __ocram_bss_end > __ocram_bss_start) { @@ -358,16 +363,16 @@ void setup_heap() #endif } -size_t get_heap_size(void) +extern "C" size_t get_heap_size(void) { return (size_t) &_heap_size; } -void app_init(void) +extern "C" void app_init(void) { bl_sys_early_init(); -#if BL702L_ENABLE +#if CHIP_DEVICE_LAYER_TARGET_BL702L rom_freertos_init(256, 400); rom_hal_init(); rom_lmac154_hook_init(); @@ -377,11 +382,11 @@ void app_init(void) blog_init(); bl_irq_init(); -#if BL702L_ENABLE +#if CHIP_DEVICE_LAYER_TARGET_BL702L bl_rtc_init(); #endif bl_sec_init(); -#if BL702_ENABLE +#if CHIP_DEVICE_LAYER_TARGET_BL702 bl_timer_init(); #endif @@ -390,15 +395,15 @@ void app_init(void) /* board config is set after system is init*/ hal_board_cfg(0); -#if BL702L_ENABLE || CHIP_DEVICE_CONFIG_ENABLE_WIFI || CHIP_DEVICE_CONFIG_ENABLE_ETHERNET +#if CHIP_DEVICE_LAYER_TARGET_BL702L || CHIP_DEVICE_CONFIG_ENABLE_WIFI || CHIP_DEVICE_CONFIG_ENABLE_ETHERNET hosal_dma_init(); #endif -#if BL602_ENABLE +#if CHIP_DEVICE_LAYER_TARGET_BL602 wifi_td_diagnosis_init(); #endif } -void platform_port_init(void) +extern "C" void platform_port_init(void) { app_init(); diff --git a/examples/platform/bouffalolab/common/iot_sdk/uart.c b/examples/platform/bouffalolab/common/iot_sdk/uart.cpp similarity index 100% rename from examples/platform/bouffalolab/common/iot_sdk/uart.c rename to examples/platform/bouffalolab/common/iot_sdk/uart.cpp diff --git a/examples/platform/bouffalolab/common/iot_sdk/uart.h b/examples/platform/bouffalolab/common/iot_sdk/uart.h deleted file mode 100644 index ff2a398a395dd7..00000000000000 --- a/examples/platform/bouffalolab/common/iot_sdk/uart.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * - * Copyright (c) 2021 Project CHIP Authors - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#pragma once - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -void uartInit(void); -int16_t uartWrite(const char * Buf, uint16_t BufLength); -int16_t uartRead(char * Buf, uint16_t NbBytesToRead); - -#ifdef CFG_USB_CDC_ENABLE -void aosUartRxCallback(int fd, void * param); -#endif - -#ifdef __cplusplus -} // extern "C" -#endif diff --git a/examples/platform/bouffalolab/common/plat/platform.cpp b/examples/platform/bouffalolab/common/plat/platform.cpp index a9dee08583cc56..ea6548327847b1 100644 --- a/examples/platform/bouffalolab/common/plat/platform.cpp +++ b/examples/platform/bouffalolab/common/plat/platform.cpp @@ -61,10 +61,10 @@ #if CHIP_DEVICE_CONFIG_ENABLE_ETHERNET || CHIP_DEVICE_CONFIG_ENABLE_WIFI #include #include -#if CHIP_DEVICE_CONFIG_ENABLE_WIFI && BL602_ENABLE +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI && CHIP_DEVICE_LAYER_TARGET_BL602 #include #endif -#if CHIP_DEVICE_CONFIG_ENABLE_WIFI && BL702_ENABLE +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI && CHIP_DEVICE_LAYER_TARGET_BL702 #include #endif #if CHIP_DEVICE_CONFIG_ENABLE_ETHERNET diff --git a/examples/platform/bouffalolab/common/plat/uart.h b/examples/platform/bouffalolab/common/plat/uart.h index ff2a398a395dd7..77cd7de39bdab8 100644 --- a/examples/platform/bouffalolab/common/plat/uart.h +++ b/examples/platform/bouffalolab/common/plat/uart.h @@ -20,10 +20,6 @@ #include -#ifdef __cplusplus -extern "C" { -#endif - void uartInit(void); int16_t uartWrite(const char * Buf, uint16_t BufLength); int16_t uartRead(char * Buf, uint16_t NbBytesToRead); @@ -31,7 +27,3 @@ int16_t uartRead(char * Buf, uint16_t NbBytesToRead); #ifdef CFG_USB_CDC_ENABLE void aosUartRxCallback(int fd, void * param); #endif - -#ifdef __cplusplus -} // extern "C" -#endif diff --git a/examples/platform/bouffalolab/common/route_hook/bl_lwip_hooks.h b/examples/platform/bouffalolab/common/route_hook/bl_lwip_hooks.h index 61f12f3c082632..e69383c73fb8ef 100644 --- a/examples/platform/bouffalolab/common/route_hook/bl_lwip_hooks.h +++ b/examples/platform/bouffalolab/common/route_hook/bl_lwip_hooks.h @@ -4,10 +4,6 @@ #include "lwip/err.h" #include "lwip/ip_addr.h" -#if BL616_ENABLE -#include "lwiphooks.h" -#endif - extern struct netif * lwip_hook_ip6_route(const ip6_addr_t * src, const ip6_addr_t * dest); #define LWIP_HOOK_IP6_ROUTE lwip_hook_ip6_route diff --git a/src/lwip/bl702/arch/cc.h b/src/lwip/bl702/arch/cc.h index 082afd87b53689..58ae1e521bba26 100644 --- a/src/lwip/bl702/arch/cc.h +++ b/src/lwip/bl702/arch/cc.h @@ -28,11 +28,7 @@ #include #include -#if CHIP_CONFIG_MEMORY_MGMT_MALLOC -#include -#endif - -#if __cplusplus +#ifdef __cplusplus extern "C" { #endif @@ -83,7 +79,7 @@ extern uint8_t __attribute__((section(".bss.lwip_IGMP_GROUP"))) memp_memory_IGMP extern uint8_t __attribute__((section(".bss.lwip_TCP_PCB"))) memp_memory_TCP_PCB_base[]; extern uint8_t __attribute__((section(".bss.lwip_SYS_TIMEOUT"))) memp_memory_SYS_TIMEOUT_base[]; -#if __cplusplus +#ifdef __cplusplus } #endif diff --git a/src/lwip/bl702/lwipopts.h b/src/lwip/bl702/lwipopts.h index 0ef3c210e77f05..a204f74ccdcb83 100644 --- a/src/lwip/bl702/lwipopts.h +++ b/src/lwip/bl702/lwipopts.h @@ -45,18 +45,12 @@ #define TCP_QUEUE_OOSEQ 0 #define ARP_QUEUEING (0) +#define LWIP_PBUF_CALLOUTS 0 #define LWIP_SOCKET 0 #define LWIP_RAW 1 -#define MEMP_NUM_RAW_PCB 5 -#if INET_CONFIG_ENABLE_TCP_ENDPOINT -#define LWIP_TCP 1 -#else -#define LWIP_TCP 0 -#define MEMP_NUM_TCP_PCB 0 -#endif // INET_CONFIG_ENABLE_TCP_ENDPOINT - -// TODO: verify count +#define MEMP_NUM_RAW_PCB (5) + #define MEMP_NUM_UDP_PCB (7) #define LWIP_HAVE_LOOPIF (0) diff --git a/src/lwip/bl702l/arch/cc.h b/src/lwip/bl702l/arch/cc.h index 082afd87b53689..58ae1e521bba26 100644 --- a/src/lwip/bl702l/arch/cc.h +++ b/src/lwip/bl702l/arch/cc.h @@ -28,11 +28,7 @@ #include #include -#if CHIP_CONFIG_MEMORY_MGMT_MALLOC -#include -#endif - -#if __cplusplus +#ifdef __cplusplus extern "C" { #endif @@ -83,7 +79,7 @@ extern uint8_t __attribute__((section(".bss.lwip_IGMP_GROUP"))) memp_memory_IGMP extern uint8_t __attribute__((section(".bss.lwip_TCP_PCB"))) memp_memory_TCP_PCB_base[]; extern uint8_t __attribute__((section(".bss.lwip_SYS_TIMEOUT"))) memp_memory_SYS_TIMEOUT_base[]; -#if __cplusplus +#ifdef __cplusplus } #endif diff --git a/src/lwip/bl702l/lwipopts.h b/src/lwip/bl702l/lwipopts.h index 645ccf79b2b752..0a705566e14438 100644 --- a/src/lwip/bl702l/lwipopts.h +++ b/src/lwip/bl702l/lwipopts.h @@ -45,18 +45,12 @@ #define TCP_QUEUE_OOSEQ 0 #define ARP_QUEUEING (0) +#define LWIP_PBUF_CALLOUTS 0 #define LWIP_SOCKET 0 #define LWIP_RAW 1 -#define MEMP_NUM_RAW_PCB 5 -#if INET_CONFIG_ENABLE_TCP_ENDPOINT -#define LWIP_TCP 1 -#else -#define LWIP_TCP 0 -#define MEMP_NUM_TCP_PCB 0 -#endif // INET_CONFIG_ENABLE_TCP_ENDPOINT - -// TODO: verify count +#define MEMP_NUM_RAW_PCB (5) + #define MEMP_NUM_UDP_PCB (7) #define LWIP_HAVE_LOOPIF (0) diff --git a/src/platform/bouffalolab/BL602/bl602-chip-mbedtls-config.h b/src/platform/bouffalolab/BL602/bl602-chip-mbedtls-config.h index f9cc993066a1e9..b75b719ea2449b 100644 --- a/src/platform/bouffalolab/BL602/bl602-chip-mbedtls-config.h +++ b/src/platform/bouffalolab/BL602/bl602-chip-mbedtls-config.h @@ -130,11 +130,7 @@ typedef void mbedtls_ecp_restart_ctx; #define MBEDTLS_ECP_FIXED_POINT_OPTIM 0 /**< Enable fixed-point speed-up */ #define MBEDTLS_ENTROPY_MAX_SOURCES 2 /**< Maximum number of sources supported */ -#if OPENTHREAD_CONFIG_COAP_SECURE_API_ENABLE -#define MBEDTLS_SSL_MAX_CONTENT_LEN 900 /**< Maxium fragment length in bytes */ -#else #define MBEDTLS_SSL_MAX_CONTENT_LEN 768 /**< Maxium fragment length in bytes */ -#endif #define MBEDTLS_SSL_CIPHERSUITES MBEDTLS_TLS_ECJPAKE_WITH_AES_128_CCM_8 diff --git a/src/platform/bouffalolab/BL702/bl702-openthread-core-bl-config.h b/src/platform/bouffalolab/BL702/bl702-openthread-core-bl-config.h index 6bc32bebc35f3f..220a843b9e60b8 100644 --- a/src/platform/bouffalolab/BL702/bl702-openthread-core-bl-config.h +++ b/src/platform/bouffalolab/BL702/bl702-openthread-core-bl-config.h @@ -49,6 +49,8 @@ */ #define OPENTHREAD_CONFIG_PLATFORM_FLASH_API_ENABLE 0 +#define OPENTHREAD_RADIO 0 + #ifndef LMAC154_RADIO_RECEIVE_SENSITIVITY #define LMAC154_RADIO_RECEIVE_SENSITIVITY -103 #endif @@ -63,6 +65,9 @@ #define OPENTHREAD_CONFIG_MAC_SOFTWARE_TX_SECURITY_ENABLE 0 #define OPENTHREAD_CONFIG_MAC_SOFTWARE_TX_TIMING_ENABLE 0 #define OPENTHREAD_CONFIG_MAC_SOFTWARE_ENERGY_SCAN_ENABLE 1 + +#define OPENTHREAD_CONFIG_PLATFORM_USEC_TIMER_ENABLE 1 + #define OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE 1 #define OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE 1 @@ -71,13 +76,22 @@ #define OPENTHREAD_CONFIG_DNS_CLIENT_ENABLE 1 #define OPENTHREAD_CONFIG_DNS_CLIENT_SERVICE_DISCOVERY_ENABLE 1 -#define OPENTHREAD_ENABLE_VENDOR_EXTENSION 0 -// #define OPENTHREAD_CONFIG_MLE_LINK_METRICS_SUBJECT_ENABLE 0 +#define OPENTHREAD_CONFIG_MLE_LINK_METRICS_SUBJECT_ENABLE 0 #define OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE 0 // #define OPENTHREAD_CONFIG_MAC_CSL_TRANSMITTER_ENABLE 0 #define OPENTHREAD_CONFIG_TCP_ENABLE 0 +#define OPENTHREAD_CONFIG_TLS_ENABLE 0 #define OPENTHREAD_CONFIG_PING_SENDER_ENABLE 1 // #define OPENTHREAD_CONFIG_LOG_LEVEL OT_LOG_LEVEL_DEBG +#define OPENTHREAD_ENABLE_VENDOR_EXTENSION 0 +#define OPENTHREAD_EXAMPLES_SIMULATION 0 + +#ifndef OPENTHREAD_CONFIG_DIAG_ENABLE +#define OPENTHREAD_CONFIG_DIAG_ENABLE 0 +#endif + +#define ENABLE_OPENTHREAD_BORDER_ROUTER 0 + #endif // OPENTHREAD_CORE_BL702_CONFIG_H_ diff --git a/src/platform/bouffalolab/BL702L/bl702l-openthread-core-bl-config.h b/src/platform/bouffalolab/BL702L/bl702l-openthread-core-bl-config.h index 7836304f8a0401..220a843b9e60b8 100644 --- a/src/platform/bouffalolab/BL702L/bl702l-openthread-core-bl-config.h +++ b/src/platform/bouffalolab/BL702L/bl702l-openthread-core-bl-config.h @@ -49,6 +49,8 @@ */ #define OPENTHREAD_CONFIG_PLATFORM_FLASH_API_ENABLE 0 +#define OPENTHREAD_RADIO 0 + #ifndef LMAC154_RADIO_RECEIVE_SENSITIVITY #define LMAC154_RADIO_RECEIVE_SENSITIVITY -103 #endif @@ -63,6 +65,9 @@ #define OPENTHREAD_CONFIG_MAC_SOFTWARE_TX_SECURITY_ENABLE 0 #define OPENTHREAD_CONFIG_MAC_SOFTWARE_TX_TIMING_ENABLE 0 #define OPENTHREAD_CONFIG_MAC_SOFTWARE_ENERGY_SCAN_ENABLE 1 + +#define OPENTHREAD_CONFIG_PLATFORM_USEC_TIMER_ENABLE 1 + #define OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE 1 #define OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE 1 @@ -71,10 +76,22 @@ #define OPENTHREAD_CONFIG_DNS_CLIENT_ENABLE 1 #define OPENTHREAD_CONFIG_DNS_CLIENT_SERVICE_DISCOVERY_ENABLE 1 -#define OPENTHREAD_ENABLE_VENDOR_EXTENSION 0 -// #define OPENTHREAD_CONFIG_MLE_LINK_METRICS_SUBJECT_ENABLE 0 +#define OPENTHREAD_CONFIG_MLE_LINK_METRICS_SUBJECT_ENABLE 0 #define OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE 0 // #define OPENTHREAD_CONFIG_MAC_CSL_TRANSMITTER_ENABLE 0 #define OPENTHREAD_CONFIG_TCP_ENABLE 0 +#define OPENTHREAD_CONFIG_TLS_ENABLE 0 + +#define OPENTHREAD_CONFIG_PING_SENDER_ENABLE 1 +// #define OPENTHREAD_CONFIG_LOG_LEVEL OT_LOG_LEVEL_DEBG + +#define OPENTHREAD_ENABLE_VENDOR_EXTENSION 0 +#define OPENTHREAD_EXAMPLES_SIMULATION 0 + +#ifndef OPENTHREAD_CONFIG_DIAG_ENABLE +#define OPENTHREAD_CONFIG_DIAG_ENABLE 0 +#endif + +#define ENABLE_OPENTHREAD_BORDER_ROUTER 0 #endif // OPENTHREAD_CORE_BL702_CONFIG_H_ diff --git a/src/platform/bouffalolab/common/BLEManagerImpl.cpp b/src/platform/bouffalolab/common/BLEManagerImpl.cpp index 1cb6ce696f73e6..1612f080d03575 100644 --- a/src/platform/bouffalolab/common/BLEManagerImpl.cpp +++ b/src/platform/bouffalolab/common/BLEManagerImpl.cpp @@ -16,6 +16,7 @@ */ #define __ZEPHYR__ 1 +#define CONFIG_EVENTFD 0 #include #if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE @@ -275,7 +276,7 @@ CHIP_ERROR BLEManagerImpl::StartAdvertising(void) if (!isAdvertisingRerun) { -#if CONFIG_BT_PRIVACY +#ifdef CONFIG_BT_PRIVACY static_assert(CHIP_DEVICE_CONFIG_DISCOVERY_TIMEOUT_SECS <= CONFIG_BT_RPA_TIMEOUT, "BLE advertising timeout is too long relative to RPA timeout"); // Generate new private BLE address diff --git a/src/platform/bouffalolab/common/CHIPDevicePlatformConfig.h b/src/platform/bouffalolab/common/CHIPDevicePlatformConfig.h index 77ccda53b57d16..bc34d9124b6d92 100644 --- a/src/platform/bouffalolab/common/CHIPDevicePlatformConfig.h +++ b/src/platform/bouffalolab/common/CHIPDevicePlatformConfig.h @@ -25,6 +25,10 @@ #define CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP 0 #endif +#ifndef CHIP_DEVICE_CONFIG_ENABLE_ETHERNET +#define CHIP_DEVICE_CONFIG_ENABLE_ETHERNET 0 +#endif + #if CHIP_ENABLE_OPENTHREAD #define CHIP_DEVICE_CONFIG_ENABLE_THREAD 1 #define CHIP_DEVICE_CONFIG_ENABLE_THREAD_SRP_CLIENT 1 diff --git a/src/platform/bouffalolab/common/ConnectivityManagerImpl.cpp b/src/platform/bouffalolab/common/ConnectivityManagerImpl.cpp index 598d40a24b31e4..5679674bc973fb 100644 --- a/src/platform/bouffalolab/common/ConnectivityManagerImpl.cpp +++ b/src/platform/bouffalolab/common/ConnectivityManagerImpl.cpp @@ -39,9 +39,6 @@ #if CHIP_DEVICE_LAYER_TARGET_BL702 #include #endif -#if CHIP_DEVICE_LAYER_TARGET_BL616 -#include -#endif #endif #if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE diff --git a/src/platform/bouffalolab/common/Logging.cpp b/src/platform/bouffalolab/common/Logging.cpp index b9ccf882c61165..93157e32d0ec21 100644 --- a/src/platform/bouffalolab/common/Logging.cpp +++ b/src/platform/bouffalolab/common/Logging.cpp @@ -16,13 +16,14 @@ */ #include +#include #include #include #include #include -#ifdef PW_RPC_ENABLED +#if PW_RPC_ENABLED #include "PigweedLogger.h" #endif @@ -39,7 +40,7 @@ namespace Platform { static char formattedMsg[CHIP_CONFIG_LOG_MESSAGE_MAX_SIZE]; void LogV(const char * module, uint8_t category, const char * msg, va_list v) { -#ifndef PW_RPC_ENABLED +#if !PW_RPC_ENABLED int lmsg = 0; vsnprintf(formattedMsg, sizeof(formattedMsg), msg, v); diff --git a/third_party/bouffalolab/bl602/bl_iot_sdk.gni b/third_party/bouffalolab/bl602/bl_iot_sdk.gni index a66384086278ac..d8dd045698bda1 100644 --- a/third_party/bouffalolab/bl602/bl_iot_sdk.gni +++ b/third_party/bouffalolab/bl602/bl_iot_sdk.gni @@ -42,6 +42,7 @@ template("bl_iot_sdk") { "BL602_USE_HAL_DRIVER=1", "CFG_CHIP_BL602", + "CFG_COMPONENT_BLOG_ENABLE=0", ] include_dirs = [] @@ -53,6 +54,7 @@ template("bl_iot_sdk") { defines += invoker.defines } + cflags = [ "-Wundef" ] cflags_c = [ "-include", rebase_path("${invoker.freertos_config}", root_build_dir), @@ -64,7 +66,7 @@ template("bl_iot_sdk") { if (defined(invoker.enable_debug_frame_ptr) && invoker.enable_debug_frame_ptr) { - cflags = [ "-fno-omit-frame-pointer" ] + cflags += [ "-fno-omit-frame-pointer" ] } } @@ -208,7 +210,10 @@ template("bl_iot_sdk") { } source_set("${sdk_target_name}_hosal") { - defines = [ "CFG_BLE_ENABLE" ] + 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", @@ -353,6 +358,10 @@ template("bl_iot_sdk") { } source_set("${sdk_target_name}_stage") { + 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", @@ -375,7 +384,6 @@ template("bl_iot_sdk") { "${bl_iot_sdk_root}/components/stage/yloop/src/yloop.c", ] - defines = [ "EF_ENV_CACHE_TABLE_SIZE=64" ] cflags_c = [ "-Wno-sign-compare" ] configs += [ ":${sdk_target_name}_config_BSP_Driver", @@ -468,6 +476,7 @@ 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" ] @@ -694,6 +703,8 @@ template("bl_iot_sdk") { "TD_DIAGNOSIS_STA", "OS_USING_FREERTOS", "CFG_VIRT_DEV_MAX=1", + "TDLS_ENABLE=0", + "CONFIG_NEWLIB_NANO_FORMAT=0", ] include_dirs = [ "${bl_iot_sdk_root}/components/os/bl_os_adapter/bl_os_adapter/include", @@ -716,6 +727,7 @@ template("bl_iot_sdk") { defines = [ "BL602_MATTER_SUPPORT", "LWIP_IPV6", + "CONFIG_WPA_WAPI_PSK=0", ] include_dirs = [ diff --git a/third_party/bouffalolab/bl702/bl_iot_sdk.gni b/third_party/bouffalolab/bl702/bl_iot_sdk.gni index 755179b3eb8e06..357b69e95d3c24 100644 --- a/third_party/bouffalolab/bl702/bl_iot_sdk.gni +++ b/third_party/bouffalolab/bl702/bl_iot_sdk.gni @@ -42,6 +42,7 @@ template("bl_iot_sdk") { "BL702=BL702", "BFLB_USE_ROM_DRIVER=1", "BFLB_USE_HAL_DRIVER=1", + "CFG_COMPONENT_BLOG_ENABLE=0", ] include_dirs = [] @@ -53,6 +54,7 @@ template("bl_iot_sdk") { defines += invoker.defines } + cflags = [ "-Wundef" ] cflags_c = [ "-include", rebase_path("${invoker.freertos_config}", root_build_dir), @@ -64,7 +66,7 @@ template("bl_iot_sdk") { if (defined(invoker.enable_debug_frame_ptr) && invoker.enable_debug_frame_ptr) { - cflags = [ "-fno-omit-frame-pointer" ] + cflags += [ "-fno-omit-frame-pointer" ] } } @@ -404,6 +406,10 @@ template("bl_iot_sdk") { } source_set("${sdk_target_name}_stage") { + 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", @@ -425,7 +431,7 @@ template("bl_iot_sdk") { "${bl_iot_sdk_root}/components/stage/yloop/src/select.c", "${bl_iot_sdk_root}/components/stage/yloop/src/yloop.c", ] - defines = [ "EF_ENV_CACHE_TABLE_SIZE=64" ] + cflags_c = [ "-Wno-sign-compare" ] configs += [ ":${sdk_target_name}_config_BSP_Driver", @@ -518,6 +524,7 @@ 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" ] diff --git a/third_party/bouffalolab/bl702l/bl_iot_sdk.gni b/third_party/bouffalolab/bl702l/bl_iot_sdk.gni index f0742a0fb7c679..5928d22b18e05d 100644 --- a/third_party/bouffalolab/bl702l/bl_iot_sdk.gni +++ b/third_party/bouffalolab/bl702l/bl_iot_sdk.gni @@ -18,8 +18,6 @@ import("//build_overrides/mbedtls.gni") import("//build_overrides/openthread.gni") import("${chip_root}/src/lib/lib.gni") -import("${mbedtls_root}/mbedtls.gni") - declare_args() { bl_iot_sdk_root = "${chip_root}/third_party/bouffalolab/repo" @@ -44,6 +42,7 @@ template("bl_iot_sdk") { "BL702L=BL702L", "BFLB_USE_ROM_DRIVER=1", "BFLB_USE_HAL_DRIVER=1", + "CFG_COMPONENT_BLOG_ENABLE=0", ] include_dirs = [] @@ -55,6 +54,7 @@ template("bl_iot_sdk") { defines += invoker.defines } + cflags = [ "-Wundef" ] cflags_c = [ "-include", rebase_path("${invoker.freertos_config}", root_build_dir), @@ -66,7 +66,7 @@ template("bl_iot_sdk") { if (defined(invoker.enable_debug_frame_ptr) && invoker.enable_debug_frame_ptr) { - cflags = [ "-fno-omit-frame-pointer" ] + cflags += [ "-fno-omit-frame-pointer" ] } } @@ -189,9 +189,10 @@ template("bl_iot_sdk") { } source_set("${sdk_target_name}_hosal") { + defines = [ "CFG_FPGA=0" ] if (defined(invoker.chip_config_network_layer_ble) && invoker.chip_config_network_layer_ble) { - defines = [ "CFG_BLE_ENABLE" ] + defines += [ "CFG_BLE_ENABLE" ] } sources = [ @@ -252,9 +253,9 @@ template("bl_iot_sdk") { "-Wno-old-style-declaration", "-Wno-stringop-overflow", "-Wno-format-truncation", - "-Wno-shadow", ] + configs += [ ":${sdk_target_name}_config_soc", ":${sdk_target_name}_config_BSP_Driver", @@ -264,6 +265,7 @@ template("bl_iot_sdk") { ":${sdk_target_name}_config_fs", ":${sdk_target_name}_config_utils", ] + if (defined(invoker.chip_config_network_layer_ble) && invoker.chip_config_network_layer_ble) { configs += [ ":${sdk_target_name}_config_ble" ] @@ -314,8 +316,8 @@ template("bl_iot_sdk") { "${bl_iot_sdk_root}/components/libc/newlibc/stdatomic.c", "${bl_iot_sdk_root}/components/libc/newlibc/syscalls.c", ] - configs += [ ":${sdk_target_name}_config_bl702l_rom_a0" ] cflags_c = [ "-Wno-builtin-declaration-mismatch" ] + configs += [ ":${sdk_target_name}_config_bl702l_rom_a0" ] public_configs = [ ":${sdk_target_name}_config" ] } @@ -331,6 +333,10 @@ template("bl_iot_sdk") { } source_set("${sdk_target_name}_stage") { + 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", @@ -353,7 +359,6 @@ template("bl_iot_sdk") { "${bl_iot_sdk_root}/components/stage/yloop/src/yloop.c", ] - defines = [ "EF_ENV_CACHE_TABLE_SIZE=64" ] cflags_c = [ "-Wno-sign-compare" ] configs += [ ":${sdk_target_name}_config_bl702l_rom_a0", @@ -433,6 +438,98 @@ template("bl_iot_sdk") { ] } + config("${sdk_target_name}_config_mbedtls") { + include_dirs = [ + "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/include", + "${bl_iot_sdk_root}/components/security/mbedtls_lts/port", + "${chip_root}/src/platform/bouffalolab/BL702L", + ] + + defines = [ "MBEDTLS_CONFIG_FILE=\"bl702l-chip-mbedtls-config.h\"" ] + } + + 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" ] + + sources = [ + "${bl_iot_sdk_root}/components/security/mbedtls_lts/port/hw_acc/aes_alt.c", + "${bl_iot_sdk_root}/components/security/mbedtls_lts/port/hw_acc/bignum_hw.c", + "${bl_iot_sdk_root}/components/security/mbedtls_lts/port/hw_acc/ecp_alt.c", + "${bl_iot_sdk_root}/components/security/mbedtls_lts/port/hw_acc/ecp_curves_alt.c", + "${bl_iot_sdk_root}/components/security/mbedtls_lts/port/hw_acc/hw_common.c", + "${bl_iot_sdk_root}/components/security/mbedtls_lts/port/hw_acc/hw_common.h", + "${bl_iot_sdk_root}/components/security/mbedtls_lts/port/hw_acc/sha1_alt.c", + "${bl_iot_sdk_root}/components/security/mbedtls_lts/port/hw_acc/sha256_alt.c", + ] + + sources += [ + "${bl_iot_sdk_root}/components/security/mbedtls_lts/port/bignum_ext.c", + "${bl_iot_sdk_root}/components/security/mbedtls_lts/port/hw_entropy_poll.c", + "${bl_iot_sdk_root}/components/security/mbedtls_lts/port/mbedtls_port_mem.c", + "${bl_iot_sdk_root}/components/security/mbedtls_lts/port/net_sockets.c", + "${bl_iot_sdk_root}/components/security/mbedtls_lts/port/pkparse.c", + ] + + sources += [ + "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/aes.c", + "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/asn1parse.c", + "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/asn1write.c", + "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/base64.c", + "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/bignum.c", + "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/ccm.c", + "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/cipher.c", + "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/cipher_wrap.c", + "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/cmac.c", + "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/constant_time.c", + "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/ctr_drbg.c", + "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/ecdh.c", + "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/ecdsa.c", + "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/ecjpake.c", + "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/ecp.c", + "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/ecp_curves.c", + "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/entropy.c", + "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/hkdf.c", + "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/hmac_drbg.c", + "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/md.c", + "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/oid.c", + "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/pem.c", + "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/pk.c", + "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/pk_wrap.c", + "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/pkcs5.c", + "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/pkwrite.c", + "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/platform.c", + "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/platform_util.c", + "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/sha256.c", + "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/sha512.c", + "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/ssl_ciphersuites.c", + "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/ssl_cli.c", + "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/ssl_cookie.c", + "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/ssl_msg.c", + "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/ssl_srv.c", + "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/ssl_tls.c", + "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/x509.c", + "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/x509_create.c", + "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/x509_crt.c", + "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/x509write_csr.c", + ] + + cflags_c = [ + "-Wno-sign-compare", + "-Wno-implicit-function-declaration", + ] + configs += [ + ":${sdk_target_name}_config_BSP_Driver", + ":${sdk_target_name}_config_hosal", + ":${sdk_target_name}_config_bl702l_rom_a0", + ] + public_configs = [ + ":${sdk_target_name}_config", + ":${sdk_target_name}_config_mbedtls", + ] + } + config("${sdk_target_name}_config_ble") { include_dirs = [ "${bl_iot_sdk_root}/components/network/ble/btblecontroller/btble_inc", @@ -503,24 +600,8 @@ template("bl_iot_sdk") { "${bl_iot_sdk_root}/components/network/ble/blestack/src/common/atomic_c.c", "${bl_iot_sdk_root}/components/network/ble/blestack/src/common/buf.c", "${bl_iot_sdk_root}/components/network/ble/blestack/src/common/dec.c", - "${bl_iot_sdk_root}/components/network/ble/blestack/src/common/dummy.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/tinycrypt/source/aes_decrypt.c", - "${bl_iot_sdk_root}/components/network/ble/blestack/src/common/tinycrypt/source/aes_encrypt.c", - "${bl_iot_sdk_root}/components/network/ble/blestack/src/common/tinycrypt/source/cbc_mode.c", - "${bl_iot_sdk_root}/components/network/ble/blestack/src/common/tinycrypt/source/ccm_mode.c", - "${bl_iot_sdk_root}/components/network/ble/blestack/src/common/tinycrypt/source/cmac_mode.c", - "${bl_iot_sdk_root}/components/network/ble/blestack/src/common/tinycrypt/source/ctr_mode.c", - "${bl_iot_sdk_root}/components/network/ble/blestack/src/common/tinycrypt/source/ctr_prng.c", - "${bl_iot_sdk_root}/components/network/ble/blestack/src/common/tinycrypt/source/ecc.c", - "${bl_iot_sdk_root}/components/network/ble/blestack/src/common/tinycrypt/source/ecc_dh.c", - "${bl_iot_sdk_root}/components/network/ble/blestack/src/common/tinycrypt/source/ecc_dsa.c", - "${bl_iot_sdk_root}/components/network/ble/blestack/src/common/tinycrypt/source/ecc_platform_specific.c", - "${bl_iot_sdk_root}/components/network/ble/blestack/src/common/tinycrypt/source/hmac.c", - "${bl_iot_sdk_root}/components/network/ble/blestack/src/common/tinycrypt/source/hmac_prng.c", - "${bl_iot_sdk_root}/components/network/ble/blestack/src/common/tinycrypt/source/sha256.c", - "${bl_iot_sdk_root}/components/network/ble/blestack/src/common/tinycrypt/source/utils.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", @@ -616,96 +697,6 @@ template("bl_iot_sdk") { "${openthread_root}/src/core:libopenthread_core_headers", ] } - config("${sdk_target_name}_config_mbedtls") { - include_dirs = [ - "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/include", - "${bl_iot_sdk_root}/components/security/mbedtls_lts/port", - "${chip_root}/src/platform/bouffalolab/BL702L", - ] - - defines = [ "MBEDTLS_CONFIG_FILE=\"bl702l-chip-mbedtls-config.h\"" ] - } - - source_set("${sdk_target_name}_mbedtls") { - include_dirs = - [ "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library" ] - - sources = [ - "${bl_iot_sdk_root}/components/security/mbedtls_lts/port/hw_acc/aes_alt.c", - "${bl_iot_sdk_root}/components/security/mbedtls_lts/port/hw_acc/bignum_hw.c", - "${bl_iot_sdk_root}/components/security/mbedtls_lts/port/hw_acc/ecp_alt.c", - "${bl_iot_sdk_root}/components/security/mbedtls_lts/port/hw_acc/ecp_curves_alt.c", - "${bl_iot_sdk_root}/components/security/mbedtls_lts/port/hw_acc/hw_common.c", - "${bl_iot_sdk_root}/components/security/mbedtls_lts/port/hw_acc/hw_common.h", - "${bl_iot_sdk_root}/components/security/mbedtls_lts/port/hw_acc/sha1_alt.c", - "${bl_iot_sdk_root}/components/security/mbedtls_lts/port/hw_acc/sha256_alt.c", - ] - - sources += [ - "${bl_iot_sdk_root}/components/security/mbedtls_lts/port/bignum_ext.c", - "${bl_iot_sdk_root}/components/security/mbedtls_lts/port/hw_entropy_poll.c", - "${bl_iot_sdk_root}/components/security/mbedtls_lts/port/mbedtls_port_mem.c", - "${bl_iot_sdk_root}/components/security/mbedtls_lts/port/net_sockets.c", - "${bl_iot_sdk_root}/components/security/mbedtls_lts/port/pkparse.c", - ] - - sources += [ - "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/aes.c", - "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/asn1parse.c", - "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/asn1write.c", - "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/base64.c", - "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/bignum.c", - "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/ccm.c", - "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/cipher.c", - "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/cipher_wrap.c", - "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/cmac.c", - "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/constant_time.c", - "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/ctr_drbg.c", - "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/ecdh.c", - "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/ecdsa.c", - "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/ecjpake.c", - "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/ecp.c", - "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/ecp_curves.c", - "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/entropy.c", - "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/hkdf.c", - "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/hmac_drbg.c", - "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/md.c", - "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/oid.c", - "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/pem.c", - "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/pk.c", - "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/pk_wrap.c", - "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/pkcs5.c", - "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/pkwrite.c", - "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/platform.c", - "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/platform_util.c", - "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/sha256.c", - "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/sha512.c", - "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/ssl_ciphersuites.c", - "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/ssl_cli.c", - "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/ssl_cookie.c", - "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/ssl_msg.c", - "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/ssl_srv.c", - "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/ssl_tls.c", - "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/x509.c", - "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/x509_create.c", - "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/x509_crt.c", - "${bl_iot_sdk_root}/components/security/mbedtls_lts/mbedtls/library/x509write_csr.c", - ] - - cflags_c = [ - "-Wno-sign-compare", - "-Wno-implicit-function-declaration", - ] - configs += [ - ":${sdk_target_name}_config_BSP_Driver", - ":${sdk_target_name}_config_hosal", - ":${sdk_target_name}_config_bl702l_rom_a0", - ] - public_configs = [ - ":${sdk_target_name}_config", - ":${sdk_target_name}_config_mbedtls", - ] - } config("${sdk_target_name}_config_factory_data") { include_dirs = [ "${bl_iot_sdk_root}/components/network/matter/matter_factory_data/include" ] diff --git a/third_party/bouffalolab/repo b/third_party/bouffalolab/repo index a3be70dc5341a4..690b348635806f 160000 --- a/third_party/bouffalolab/repo +++ b/third_party/bouffalolab/repo @@ -1 +1 @@ -Subproject commit a3be70dc5341a4f6c9696f071a38a5953f694ce4 +Subproject commit 690b348635806f312b61ddcc5b2c566daafe833e