From 78bc1e233dc2b3c4f5433efc0ccbecb73eb3f277 Mon Sep 17 00:00:00 2001 From: Damian Krolik Date: Fri, 14 Jun 2024 16:21:18 +0200 Subject: [PATCH] [nrfconnect] Remove shell initialization from chef app On Zephyr-based platforms, shell commands are initialized automatically on the system boot so they don't have to be manually registered. In fact, initializing OpenThread CLI at this stage replaces the SRP client callback registered by the Matter stack and breaks SRP in chef app. --- examples/chef/nrfconnect/main.cpp | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/examples/chef/nrfconnect/main.cpp b/examples/chef/nrfconnect/main.cpp index ca9d25655e3d52..1c7a3aa02aebf5 100644 --- a/examples/chef/nrfconnect/main.cpp +++ b/examples/chef/nrfconnect/main.cpp @@ -15,8 +15,6 @@ * limitations under the License. */ -#include - #include #include #include @@ -35,10 +33,6 @@ #include -#if CONFIG_ENABLE_CHIP_SHELL || CONFIG_CHIP_LIB_SHELL -#include -#endif - #ifdef CONFIG_CHIP_PW_RPC #include "Rpc.h" #endif @@ -53,7 +47,6 @@ LOG_MODULE_REGISTER(app, CONFIG_CHIP_APP_LOG_LEVEL); using namespace chip; -using namespace chip::Shell; using namespace chip::DeviceLayer; namespace { @@ -159,27 +152,7 @@ int main() ChipLogError(AppServer, "OpenBasicCommissioningWindow() failed"); } -#if CONFIG_CHIP_LIB_SHELL - int rc = Engine::Root().Init(); - if (rc != 0) - { - ChipLogError(AppServer, "Streamer initialization failed: %d", rc); - return 1; - } - - cmd_misc_init(); - cmd_otcli_init(); -#endif - -#if CHIP_SHELL_ENABLE_CMD_SERVER - cmd_app_server_init(); -#endif - chip::DeviceLayer::PlatformMgr().ScheduleWork(InitServer); -#if CONFIG_CHIP_LIB_SHELL - Engine::Root().RunMainLoop(); -#endif - return 0; }