From 5271585331abc7ca8a65bec2e6ee7148a0cf10a5 Mon Sep 17 00:00:00 2001 From: Maciej Bojczuk Date: Thu, 16 Feb 2023 17:46:39 +0200 Subject: [PATCH] [Telink] Update RPC implementation (#25069) Make RPC working working again after pigweed update. Signed-off-by: Maciej Bojczuk --- examples/lighting-app/telink/CMakeLists.txt | 21 +++++++------------ .../platform/telink/pw_sys_io/CMakeLists.txt | 2 ++ 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/examples/lighting-app/telink/CMakeLists.txt b/examples/lighting-app/telink/CMakeLists.txt index 628e10410e816c..d1d4df8ed4307c 100644 --- a/examples/lighting-app/telink/CMakeLists.txt +++ b/examples/lighting-app/telink/CMakeLists.txt @@ -76,12 +76,16 @@ set(PIGWEED_ROOT "${CHIP_ROOT}/third_party/pigweed/repo") include(${PIGWEED_ROOT}/pw_build/pigweed.cmake) include(${PIGWEED_ROOT}/pw_protobuf_compiler/proto.cmake) +include($ENV{PW_ROOT}/pw_assert/backend.cmake) +include($ENV{PW_ROOT}/pw_log/backend.cmake) +include($ENV{PW_ROOT}/pw_sys_io/backend.cmake) + pw_set_module_config(pw_rpc_CONFIG pw_rpc.disable_global_mutex_config) pw_set_backend(pw_log pw_log_basic) pw_set_backend(pw_assert.check pw_assert_log.check_backend) pw_set_backend(pw_assert.assert pw_assert.assert_compatibility_backend) pw_set_backend(pw_sys_io pw_sys_io.telink) -pw_set_backend(pw_trace pw_trace_tokenized) + set(dir_pw_third_party_nanopb "${CHIP_ROOT}/third_party/nanopb/repo" CACHE STRING "" FORCE) add_subdirectory(third_party/connectedhomeip/third_party/pigweed/repo) @@ -195,9 +199,7 @@ target_compile_options(app PRIVATE "-DPW_RPC_DESCRIPTOR_SERVICE=1" "-DPW_RPC_DEVICE_SERVICE=1" "-DPW_RPC_LIGHTING_SERVICE=1" - "-DPW_RPC_THREAD_SERVICE=1" - "-DPW_RPC_TRACING_SERVICE=1" - "-DPW_TRACE_BACKEND_SET=1") + "-DPW_RPC_THREAD_SERVICE=1") target_link_libraries(app PRIVATE attributes_service.nanopb_rpc @@ -208,17 +210,10 @@ target_link_libraries(app PRIVATE thread_service.nanopb_rpc pw_checksum pw_hdlc + pw_hdlc.pw_rpc pw_log pw_rpc.server - pw_trace_tokenized - pw_trace_tokenized.trace_buffer - pw_trace_tokenized.rpc_service - pw_trace_tokenized.protos.nanopb_rpc -) - -target_link_options(app - PUBLIC - "-T${PIGWEED_ROOT}/pw_tokenizer/pw_tokenizer_linker_sections.ld" + pw_sys_io ) endif(CONFIG_CHIP_PW_RPC) diff --git a/examples/platform/telink/pw_sys_io/CMakeLists.txt b/examples/platform/telink/pw_sys_io/CMakeLists.txt index f8675a4ec1f05a..e59739aaef768d 100644 --- a/examples/platform/telink/pw_sys_io/CMakeLists.txt +++ b/examples/platform/telink/pw_sys_io/CMakeLists.txt @@ -11,6 +11,8 @@ target_compile_options(suppress_zephyr_warnings INTERFACE pw_add_library(pw_sys_io.telink STATIC SOURCES sys_io_telink.cc + PUBLIC_INCLUDES + public PRIVATE_DEPS pw_sys_io suppress_zephyr_warnings