diff --git a/examples/all-clusters-app/nrfconnect/boards/nrf52840dongle_nrf52840.conf b/examples/all-clusters-app/nrfconnect/boards/nrf52840dongle_nrf52840.conf index dc8c38ed741291..4da8bbcd8ac81b 100644 --- a/examples/all-clusters-app/nrfconnect/boards/nrf52840dongle_nrf52840.conf +++ b/examples/all-clusters-app/nrfconnect/boards/nrf52840dongle_nrf52840.conf @@ -27,7 +27,7 @@ CONFIG_USB_CDC_ACM_LOG_LEVEL_OFF=y # The minimal logging mode does not work properly with the USB CDC device, so use the deferred mode CONFIG_LOG_MODE_MINIMAL=n -CONFIG_LOG2_MODE_DEFERRED=y +CONFIG_LOG_MODE_DEFERRED=y CONFIG_LOG_BUFFER_SIZE=8192 # Reduce the code size as the dongle reserves some space for MBR and Open Bootloader diff --git a/examples/all-clusters-minimal-app/nrfconnect/boards/nrf52840dongle_nrf52840.conf b/examples/all-clusters-minimal-app/nrfconnect/boards/nrf52840dongle_nrf52840.conf index dc8c38ed741291..4da8bbcd8ac81b 100644 --- a/examples/all-clusters-minimal-app/nrfconnect/boards/nrf52840dongle_nrf52840.conf +++ b/examples/all-clusters-minimal-app/nrfconnect/boards/nrf52840dongle_nrf52840.conf @@ -27,7 +27,7 @@ CONFIG_USB_CDC_ACM_LOG_LEVEL_OFF=y # The minimal logging mode does not work properly with the USB CDC device, so use the deferred mode CONFIG_LOG_MODE_MINIMAL=n -CONFIG_LOG2_MODE_DEFERRED=y +CONFIG_LOG_MODE_DEFERRED=y CONFIG_LOG_BUFFER_SIZE=8192 # Reduce the code size as the dongle reserves some space for MBR and Open Bootloader diff --git a/examples/chef/nrfconnect/main.cpp b/examples/chef/nrfconnect/main.cpp index 81a69255ba58dc..fe031e7145ff35 100644 --- a/examples/chef/nrfconnect/main.cpp +++ b/examples/chef/nrfconnect/main.cpp @@ -53,7 +53,7 @@ namespace { constexpr int kExtDiscoveryTimeoutSecs = 20; } -CHIP_ERROR main() +int main() { CHIP_ERROR err = CHIP_NO_ERROR; @@ -65,14 +65,14 @@ CHIP_ERROR main() if (err != CHIP_NO_ERROR) { ChipLogError(AppServer, "Platform::MemoryInit() failed"); - return err; + return 1; } err = PlatformMgr().InitChipStack(); if (err != CHIP_NO_ERROR) { ChipLogError(AppServer, "PlatformMgr().InitChipStack() failed"); - return err; + return 1; } // Network connectivity @@ -84,7 +84,7 @@ CHIP_ERROR main() if (err != CHIP_NO_ERROR) { ChipLogError(AppServer, "ThreadStackMgr().InitThreadStack() failed"); - return err; + return 1; } #ifdef CONFIG_OPENTHREAD_MTD @@ -95,7 +95,7 @@ CHIP_ERROR main() if (err != CHIP_NO_ERROR) { ChipLogError(AppServer, "ConnectivityMgr().SetThreadDeviceType() failed"); - return err; + return 1; } #endif /* CHIP_ENABLE_OPENTHREAD */ @@ -108,7 +108,11 @@ CHIP_ERROR main() // Start IM server static chip::CommonCaseDeviceServerInitParams initParams; (void) initParams.InitializeStaticResourcesBeforeServerInit(); - ReturnErrorOnFailure(chip::Server::GetInstance().Init(initParams)); + err = chip::Server::GetInstance().Init(initParams); + if (err != CHIP_NO_ERROR) + { + return 1; + } chip::DeviceLayer::ConfigurationMgr().LogDeviceConfig(); @@ -136,7 +140,7 @@ CHIP_ERROR main() if (rc != 0) { ChipLogError(AppServer, "Streamer initialization failed: %d", rc); - return CHIP_ERROR_INTERNAL; + return 1; } cmd_misc_init(); @@ -151,5 +155,5 @@ CHIP_ERROR main() Engine::Root().RunMainLoop(); #endif - return err; + return 0; } diff --git a/examples/chef/nrfconnect/rpc.overlay b/examples/chef/nrfconnect/rpc.overlay index 77066d5c0ef5ac..858c311b616306 100644 --- a/examples/chef/nrfconnect/rpc.overlay +++ b/examples/chef/nrfconnect/rpc.overlay @@ -44,6 +44,7 @@ CONFIG_LOG_MODE_MINIMAL=n CONFIG_LOG_MODE_IMMEDIATE=y CONFIG_LOG_BACKEND_UART=n CONFIG_LOG_BACKEND_RTT=n +CONFIG_LOG_OUTPUT=y # Increase zephyr tty rx buffer CONFIG_CONSOLE_GETCHAR_BUFSIZE=128 diff --git a/examples/lighting-app/nrfconnect/boards/nrf52840dongle_nrf52840_no_dfu.conf b/examples/lighting-app/nrfconnect/boards/nrf52840dongle_nrf52840_no_dfu.conf index 7e9d26f886667c..01eedaf2e36856 100644 --- a/examples/lighting-app/nrfconnect/boards/nrf52840dongle_nrf52840_no_dfu.conf +++ b/examples/lighting-app/nrfconnect/boards/nrf52840dongle_nrf52840_no_dfu.conf @@ -27,7 +27,7 @@ CONFIG_USB_CDC_ACM_LOG_LEVEL_OFF=y # The minimal logging mode does not work properly with the USB CDC device, so use the deferred mode CONFIG_LOG_MODE_MINIMAL=n -CONFIG_LOG2_MODE_DEFERRED=y +CONFIG_LOG_MODE_DEFERRED=y CONFIG_LOG_BUFFER_SIZE=8192 # Reduce the code size as the dongle reserves some space for MBR and Open Bootloader diff --git a/examples/lighting-app/nrfconnect/rpc.overlay b/examples/lighting-app/nrfconnect/rpc.overlay index d2ab72bdbac9a0..a97621181efc75 100644 --- a/examples/lighting-app/nrfconnect/rpc.overlay +++ b/examples/lighting-app/nrfconnect/rpc.overlay @@ -41,6 +41,7 @@ CONFIG_LOG_MODE_MINIMAL=n CONFIG_LOG_MODE_IMMEDIATE=y CONFIG_LOG_BACKEND_UART=n CONFIG_LOG_BACKEND_RTT=n +CONFIG_LOG_OUTPUT=y # Increase zephyr tty rx buffer CONFIG_CONSOLE_GETCHAR_BUFSIZE=128 diff --git a/examples/platform/nrfconnect/util/PigweedLogger.cpp b/examples/platform/nrfconnect/util/PigweedLogger.cpp index 0cb97ecb3bb109..33e7fdc01068bd 100644 --- a/examples/platform/nrfconnect/util/PigweedLogger.cpp +++ b/examples/platform/nrfconnect/util/PigweedLogger.cpp @@ -98,7 +98,7 @@ void init(const log_backend *) pw_sys_io_Init(); } -void processMessage(const struct log_backend * const backend, union log_msg2_generic * msg) +void processMessage(const struct log_backend * const backend, union log_msg_generic * msg) { int ret = k_sem_take(&sLoggerLock, K_FOREVER); assert(ret == 0);