Skip to content

Commit 5b3c221

Browse files
committed
Merge branch 'master' into server-cluster-interface
2 parents f9d2efa + d1ec1ac commit 5b3c221

File tree

61 files changed

+1722
-1163
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+1722
-1163
lines changed

config/esp32/components/chip/Kconfig

+3-2
Original file line numberDiff line numberDiff line change
@@ -228,14 +228,15 @@ menu "CHIP Core"
228228
help
229229
Enable this option to start a UDP Endpoint queue filter for mDNS Broadcast packets
230230

231-
config ENABLE_LWIP_THREAD_SAFETY
232-
bool "Enable LwIP Thread safety options"
231+
config USE_TCPIP_CORE_LOCK_FOR_THREAD_SAFETY
232+
bool "Use TCPIP core locking for LwIP thread safety"
233233
default y
234234
select LWIP_TCPIP_CORE_LOCKING
235235
select LWIP_CHECK_THREAD_SAFETY
236236
help
237237
CHIP SDK performs LwIP core locking before calling an LwIP API.
238238
To make the calls thread safe we have to enable LWIP_TCPIP_CORE_LOCKING.
239+
Otherwise CHIP SDK will post LwIP APIs to TCPIP task to ensure thread safety.
239240
Here, we are also enabling LWIP_CHECK_THREAD_SAFETY which will assert when
240241
LwIP code gets called from any other context or without holding the LwIP lock.
241242

examples/contact-sensor-app/bouffalolab/bl702l/app_pds.cpp

-12
Original file line numberDiff line numberDiff line change
@@ -59,17 +59,9 @@ extern "C" void vApplicationSleep(TickType_t xExpectedIdleTime)
5959
extern BaseType_t TrapNetCounter, *pTrapNetCounter;
6060
if (app_pds_wakeup_source == PDS_WAKEUP_BY_RTC)
6161
{
62-
extern void * pxCurrentTCB;
63-
64-
ChipLogProgress(NotSpecified, "wakeup source: rtc. %lu vs %lu ms @ %lu\r\n", xExpectedIdleTime,
65-
(uint32_t) (bl_rtc_get_timestamp_ms() - sleep_before), (uint32_t) bl_rtc_get_timestamp_ms());
66-
67-
ChipLogProgress(NotSpecified, "application_sleep; %lu, %lu, %lu\r\n", (uint32_t) sleep_calling_time, (uint32_t) sleep_time,
68-
(uint32_t) wakeup_time);
6962
}
7063
else if (app_pds_wakeup_source == PDS_WAKEUP_BY_GPIO)
7164
{
72-
7365
if (((1 << CHIP_RESET_PIN) & app_pds_wakeup_pin) && app_pds_irq_handler)
7466
{
7567
app_pds_irq_handler(&gpio_key);
@@ -79,10 +71,6 @@ extern "C" void vApplicationSleep(TickType_t xExpectedIdleTime)
7971
{
8072
app_pds_irq_handler(&gpio_contact);
8173
}
82-
83-
ChipLogProgress(NotSpecified, "wakeup source: gpio -> 0x%08lX. %lu vs %lu ms @ %lu\r\n", app_pds_wakeup_pin,
84-
xExpectedIdleTime, (uint32_t) (bl_rtc_get_timestamp_ms() - sleep_before),
85-
(uint32_t) bl_rtc_get_timestamp_ms());
8674
}
8775

8876
app_pds_wakeup_source = -1;

examples/lighting-app/bouffalolab/bl602/BUILD.gn

+9-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ bouffalolab_executable("lighting_app") {
9696
output_name = "chip-bl602-lighting-example.out"
9797

9898
defines = [
99-
"APP_TASK_STACK_SIZE=2044",
99+
"APP_TASK_STACK_SIZE=4096",
100100
"CHIP_UART_BAUDRATE=${baudrate}",
101101
"START_ENTRY=bfl_main",
102102
"SYS_AOS_LOOP_ENABLE",
@@ -109,6 +109,10 @@ bouffalolab_executable("lighting_app") {
109109
defines +=
110110
[ "CONFIG_BOUFFALOLAB_FACTORY_DATA_ENABLE=${chip_enable_factory_data}" ]
111111

112+
if (enable_lwip_pbuf_ram) {
113+
defines += [ "CHIP_SYSTEM_CONFIG_PACKETBUFFER_LWIP_PBUF_RAM=1" ]
114+
}
115+
112116
bl_plat_name = "bl602"
113117
sources = [
114118
"${examples_plat_dir}/common/route_hook/bl_route_hook.c",
@@ -227,6 +231,10 @@ bouffalolab_executable("lighting_app") {
227231
inputs = [ ldscript ]
228232

229233
if (chip_print_memory_usage) {
234+
if (enable_lwip_pbuf_ram) {
235+
ldflags += [ "-Wl,--defsym=__RAM_PBUF_POOL=0" ]
236+
}
237+
230238
ldflags += [
231239
"-Wl,--print-memory-usage",
232240
"-fstack-usage",

examples/lighting-app/bouffalolab/bl616/BUILD.gn

+4
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,10 @@ bouffalolab_executable("lighting_app") {
121121
defines += [ "BOOT_PIN_RESET=2" ]
122122
}
123123

124+
if (enable_lwip_pbuf_ram) {
125+
defines += [ "CHIP_SYSTEM_CONFIG_PACKETBUFFER_LWIP_PBUF_RAM=1" ]
126+
}
127+
124128
defines += [ "BL616DK" ]
125129

126130
sources = [

examples/lighting-app/bouffalolab/bl616/args.gni

+1-10
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,7 @@ import("${chip_root}/src/platform/bouffalolab/BL616/args.gni")
1919

2020
bouffalo_sdk_target = get_label_info(":sdk", "label_no_toolchain")
2121

22-
pw_log_BACKEND = "${chip_root}/src/pw_backends/log"
23-
pw_assert_BACKEND = "${chip_root}/src/pw_backends/assert"
24-
pw_rpc_CONFIG = "$dir_pw_rpc:disable_global_mutex"
25-
26-
chip_detail_logging = true
22+
chip_detail_logging = false
2723

2824
# use -Os instead of -Og
2925
is_debug = false
30-
31-
pw_build_LINK_DEPS = [
32-
"$dir_pw_assert:impl",
33-
"$dir_pw_log:impl",
34-
]

examples/lighting-app/bouffalolab/bl702/BUILD.gn

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ bouffalolab_executable("lighting_app") {
126126
bl_plat_name = "bl702"
127127

128128
defines = [
129-
"APP_TASK_STACK_SIZE=2048",
129+
"APP_TASK_STACK_SIZE=4096",
130130
"CHIP_UART_BAUDRATE=${baudrate}",
131131
"START_ENTRY=bl702_main",
132132
]

examples/lighting-app/bouffalolab/bl702l/BUILD.gn

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ bouffalolab_executable("lighting_app") {
106106
bl_plat_name = "bl702l"
107107

108108
defines = [
109-
"APP_TASK_STACK_SIZE=2048",
109+
"APP_TASK_STACK_SIZE=4096",
110110
"CHIP_UART_BAUDRATE=${baudrate}",
111111
"START_ENTRY=bl702_main",
112112
]

0 commit comments

Comments
 (0)