Skip to content

Commit

Permalink
Fix efr32 assert due to missing init, renable RTT logs with pw-rcp en…
Browse files Browse the repository at this point in the history
…able. Temporaly remove TestExchange from efr32 (#33375)
  • Loading branch information
jmartinez-silabs authored May 8, 2024
1 parent 8edcecd commit 0259b9a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
4 changes: 3 additions & 1 deletion src/messaging/tests/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,15 @@ static_library("helpers") {
chip_test_suite_using_nltest("tests") {
output_name = "libMessagingLayerTests"

test_sources = [ "TestExchange.cpp" ]
test_sources = []

if (chip_device_platform != "efr32") {
# TODO(#10447): ReliableMessage Test has HF, and ExchangeMgr hangs on EFR32.
# And TestAbortExchangesForFabric does not link on EFR32 for some reason.
# TODO #33372: TestExchange.cpp asserts in ExchangeContext::SendMessage
test_sources += [
"TestAbortExchangesForFabric.cpp",
"TestExchange.cpp",
"TestExchangeMgr.cpp",
"TestReliableMessageProtocol.cpp",
]
Expand Down
8 changes: 4 additions & 4 deletions src/platform/silabs/Logging.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,10 @@ static void PrintLog(const char * msg)

#if SILABS_LOG_OUT_UART
uartLogWrite(msg, sz);
#elif PW_RPC_ENABLED
PigweedLogger::putString(msg, sz);
#else
#if PW_RPC_ENABLED
PigweedLogger::putString(msg, sz);
#endif // PW_RPC_ENABLED
SEGGER_RTT_WriteNoLock(LOG_RTT_BUFFER_INDEX, msg, sz);
#endif // SILABS_LOG_OUT_UART

Expand All @@ -147,9 +148,8 @@ static void PrintLog(const char * msg)
sz = strlen(newline);
#if PW_RPC_ENABLED
PigweedLogger::putString(newline, sz);
#else
SEGGER_RTT_WriteNoLock(LOG_RTT_BUFFER_INDEX, newline, sz);
#endif // PW_RPC_ENABLED
SEGGER_RTT_WriteNoLock(LOG_RTT_BUFFER_INDEX, newline, sz);
#endif
}
}
Expand Down
2 changes: 2 additions & 0 deletions src/test_driver/efr32/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include <platform/CHIPDeviceLayer.h>
#include <platform/KeyValueStoreManager.h>
#include <platform/silabs/platformAbstraction/SilabsPlatform.h>
#include <sl_system_init.h>
#include <sl_system_kernel.h>
#include <task.h>

Expand Down Expand Up @@ -185,6 +186,7 @@ void RunRpcService(void *)

int main(void)
{
sl_system_init();
chip::DeviceLayer::Silabs::GetPlatform().Init();
PigweedLogger::init();
mbedtls_platform_set_calloc_free(CHIPPlatformMemoryCalloc, CHIPPlatformMemoryFree);
Expand Down

0 comments on commit 0259b9a

Please sign in to comment.