diff --git a/examples/lighting-app/nrfconnect/CMakeLists.txt b/examples/lighting-app/nrfconnect/CMakeLists.txt index 524b8a72ec72c6..14e2fe43bf6af0 100644 --- a/examples/lighting-app/nrfconnect/CMakeLists.txt +++ b/examples/lighting-app/nrfconnect/CMakeLists.txt @@ -151,7 +151,6 @@ target_sources(app PRIVATE ) target_include_directories(app PRIVATE - ${ZEPHYR_BASE}/subsys // required to get access to `log_output_std.h` ${PIGWEED_ROOT}/pw_sys_io/public ${CHIP_ROOT}/src/lib/support ${CHIP_ROOT}/src/system @@ -168,4 +167,6 @@ target_link_libraries(app PRIVATE pw_rpc.server ) +target_link_libraries(pw_build INTERFACE zephyr_interface) + endif(CONFIG_CHIP_PW_RPC) diff --git a/examples/pigweed-app/nrfconnect/CMakeLists.txt b/examples/pigweed-app/nrfconnect/CMakeLists.txt index f87a5485af315b..cd1834cd044bd9 100644 --- a/examples/pigweed-app/nrfconnect/CMakeLists.txt +++ b/examples/pigweed-app/nrfconnect/CMakeLists.txt @@ -48,7 +48,6 @@ add_subdirectory(third_party/connectedhomeip/third_party/nanopb/repo) add_subdirectory(third_party/connectedhomeip/third_party/pigweed/repo) target_include_directories(app PRIVATE main/include - ${ZEPHYR_BASE}/subsys // required to get access to `log_output_std.h` ${NRFCONNECT_COMMON}/util/include ${CHIP_ROOT}/src/lib/support ${PIGWEED_ROOT}/pw_sys_io/public @@ -78,3 +77,5 @@ target_link_libraries(app PUBLIC pw_rpc.nanopb.echo_service pw_rpc.server ) + +target_link_libraries(pw_build INTERFACE zephyr_interface) diff --git a/examples/pigweed-app/nrfconnect/README.md b/examples/pigweed-app/nrfconnect/README.md index c834d06db40767..1553d1d2363a56 100644 --- a/examples/pigweed-app/nrfconnect/README.md +++ b/examples/pigweed-app/nrfconnect/README.md @@ -325,7 +325,7 @@ to read more about flashing on the nRF52840 Dongle. Run the following command to start an interactive Python shell, where the Echo RPC commands can be invoked: - python -m pw_hdlc.rpc_console --device /dev/ttyACM0 -b 115200 $CHIP_ROOT/third_party/pigweed/repo/pw_rpc/pw_rpc_protos/echo.proto -o /tmp/pw_rpc.out + python -m pw_hdlc.rpc_console --device /dev/ttyACM0 -b 115200 $CHIP_ROOT/third_party/pigweed/repo/pw_rpc/echo.proto -o /tmp/pw_rpc.out To send an Echo RPC message, type the following command, where the actual message is the text in quotation marks after the `msg=` phrase: diff --git a/examples/pigweed-app/nrfconnect/main/main.cpp b/examples/pigweed-app/nrfconnect/main/main.cpp index ba8933ebfd0c44..29947a8fef1959 100644 --- a/examples/pigweed-app/nrfconnect/main/main.cpp +++ b/examples/pigweed-app/nrfconnect/main/main.cpp @@ -30,25 +30,13 @@ LOG_MODULE_REGISTER(app); -static LEDWidget sStatusLED; - namespace { -#define RPC_STACK_SIZE (8 * 1024) -#define RPC_PRIORITY 7 - -K_THREAD_STACK_DEFINE(rpc_stack_area, RPC_STACK_SIZE); -struct k_thread rpc_thread_data; - -pw::rpc::EchoService echo_service; +LEDWidget sStatusLED; +pw::rpc::EchoService sEchoService; void RegisterServices(pw::rpc::Server & server) { - server.RegisterService(echo_service); -} - -void RunRpcService(void *, void *, void *) -{ - Start(RegisterServices, &::chip::rpc::logger_mutex); + server.RegisterService(sEchoService); } } // namespace @@ -72,8 +60,6 @@ int main() sStatusLED.Init(SYSTEM_STATE_LED); sStatusLED.Set(true); - k_thread_create(&rpc_thread_data, rpc_stack_area, K_THREAD_STACK_SIZEOF(rpc_stack_area), RunRpcService, NULL, NULL, NULL, - RPC_PRIORITY, 0, K_NO_WAIT); - k_thread_join(&rpc_thread_data, K_FOREVER); + Start(RegisterServices, &::chip::rpc::logger_mutex); return 0; } diff --git a/examples/platform/nrfconnect/pw_sys_io/CMakeLists.txt b/examples/platform/nrfconnect/pw_sys_io/CMakeLists.txt index 62b43a103e7394..84b78c3ebd31ed 100644 --- a/examples/platform/nrfconnect/pw_sys_io/CMakeLists.txt +++ b/examples/platform/nrfconnect/pw_sys_io/CMakeLists.txt @@ -10,7 +10,6 @@ pw_add_module_library(pw_sys_io.nrfconnect SOURCES sys_io_nrfconnect.cc PRIVATE_DEPS - zephyr_interface pw_sys_io suppress_zephyr_warnings )