Skip to content

Commit 0259b9a

Browse files
Fix efr32 assert due to missing init, renable RTT logs with pw-rcp enable. Temporaly remove TestExchange from efr32 (#33375)
1 parent 8edcecd commit 0259b9a

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

src/messaging/tests/BUILD.gn

+3-1
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,15 @@ static_library("helpers") {
4949
chip_test_suite_using_nltest("tests") {
5050
output_name = "libMessagingLayerTests"
5151

52-
test_sources = [ "TestExchange.cpp" ]
52+
test_sources = []
5353

5454
if (chip_device_platform != "efr32") {
5555
# TODO(#10447): ReliableMessage Test has HF, and ExchangeMgr hangs on EFR32.
5656
# And TestAbortExchangesForFabric does not link on EFR32 for some reason.
57+
# TODO #33372: TestExchange.cpp asserts in ExchangeContext::SendMessage
5758
test_sources += [
5859
"TestAbortExchangesForFabric.cpp",
60+
"TestExchange.cpp",
5961
"TestExchangeMgr.cpp",
6062
"TestReliableMessageProtocol.cpp",
6163
]

src/platform/silabs/Logging.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,10 @@ static void PrintLog(const char * msg)
136136

137137
#if SILABS_LOG_OUT_UART
138138
uartLogWrite(msg, sz);
139-
#elif PW_RPC_ENABLED
140-
PigweedLogger::putString(msg, sz);
141139
#else
140+
#if PW_RPC_ENABLED
141+
PigweedLogger::putString(msg, sz);
142+
#endif // PW_RPC_ENABLED
142143
SEGGER_RTT_WriteNoLock(LOG_RTT_BUFFER_INDEX, msg, sz);
143144
#endif // SILABS_LOG_OUT_UART
144145

@@ -147,9 +148,8 @@ static void PrintLog(const char * msg)
147148
sz = strlen(newline);
148149
#if PW_RPC_ENABLED
149150
PigweedLogger::putString(newline, sz);
150-
#else
151-
SEGGER_RTT_WriteNoLock(LOG_RTT_BUFFER_INDEX, newline, sz);
152151
#endif // PW_RPC_ENABLED
152+
SEGGER_RTT_WriteNoLock(LOG_RTT_BUFFER_INDEX, newline, sz);
153153
#endif
154154
}
155155
}

src/test_driver/efr32/src/main.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
#include <platform/CHIPDeviceLayer.h>
3434
#include <platform/KeyValueStoreManager.h>
3535
#include <platform/silabs/platformAbstraction/SilabsPlatform.h>
36+
#include <sl_system_init.h>
3637
#include <sl_system_kernel.h>
3738
#include <task.h>
3839

@@ -185,6 +186,7 @@ void RunRpcService(void *)
185186

186187
int main(void)
187188
{
189+
sl_system_init();
188190
chip::DeviceLayer::Silabs::GetPlatform().Init();
189191
PigweedLogger::init();
190192
mbedtls_platform_set_calloc_free(CHIPPlatformMemoryCalloc, CHIPPlatformMemoryFree);

0 commit comments

Comments
 (0)