From f8d30110a16a27296b4a331eeefce3b2d226930a Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Tue, 29 Oct 2024 16:35:54 -0400 Subject: [PATCH 01/15] Add a matter backend for assertions, to not depend on basic assertions in pigweed itself --- .gn | 2 +- src/backends/assert/BUILD.gn | 68 ++++++++++++++++++ src/backends/assert/handler.cpp | 42 +++++++++++ .../assert/public/pw_assert_matter/handler.h | 35 +++++++++ .../pw_assert_backend/check_backend.h | 72 +++++++++++++++++++ 5 files changed, 218 insertions(+), 1 deletion(-) create mode 100644 src/backends/assert/BUILD.gn create mode 100644 src/backends/assert/handler.cpp create mode 100644 src/backends/assert/public/pw_assert_matter/handler.h create mode 100644 src/backends/assert/public_overrides/pw_assert_backend/check_backend.h diff --git a/.gn b/.gn index f844fd20e9b87d..ee06aad4503e28 100644 --- a/.gn +++ b/.gn @@ -35,7 +35,7 @@ default_args = { # Required for pw_unit_test pw_sys_io_BACKEND = "$dir_pw_sys_io_stdio" - pw_assert_BACKEND = "$dir_pw_assert_log" + pw_assert_BACKEND = "//src/backends/assert" pw_log_BACKEND = "$dir_pw_log_basic" # TODO: Make sure only unit tests link against this diff --git a/src/backends/assert/BUILD.gn b/src/backends/assert/BUILD.gn new file mode 100644 index 00000000000000..7960e24916fcca --- /dev/null +++ b/src/backends/assert/BUILD.gn @@ -0,0 +1,68 @@ +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build_overrides/build.gni") +import("//build_overrides/chip.gni") +import("//build_overrides/pigweed.gni") + +import("$dir_pw_build/facade.gni") + +config("public_include_path") { + include_dirs = [ "public" ] + visibility = [ ":*" ] +} + +config("backend_config") { + include_dirs = [ "public_overrides" ] + visibility = [ ":*" ] +} + +pw_facade("handler") { + backend = "${chip_root}/src/backends/assert:assert.impl" + public_configs = [ ":public_include_path" ] + public_deps = [ "$dir_pw_preprocessor" ] + public = [ "public/pw_assert_matter/handler.h" ] +} + +pw_source_set("assert") { + public_configs = [ + ":backend_config", + ":public_include_path", + ] + public = [ + "public/pw_assert_matter/handler.h", + ] + public_deps = [ ":handler.facade" ] +} + +# A basic handler backend using pw_sys_io. +pw_source_set("assert.impl") { + # Turn off GN check since this target intentionally leaves out deps to avoid + # circular dependencies. + check_includes = false + + configs = [ + "$dir_pw_string:public_include_path", + "$dir_pw_result:public_include_path", + ] + + deps = [ + ":handler.facade", + "$dir_pw_assert:config", + "$dir_pw_preprocessor", + "$dir_pw_string:builder", + "${chip_root}/src/lib/support", + ] + sources = [ "handler.cpp" ] +} diff --git a/src/backends/assert/handler.cpp b/src/backends/assert/handler.cpp new file mode 100644 index 00000000000000..cfa33b875f3d3e --- /dev/null +++ b/src/backends/assert/handler.cpp @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include + +#include +#include +#include + +void pw_assert_matter_HandleFailure(const char * file_name, int line_number, const char * function_name, const char * format, ...) +{ + + pw::StringBuffer<64> builder; + + builder.Format("Assertion failed: %s:%d (in %s):", file_name, line_number, function_name); + + va_list args; + va_start(args, format); + builder.FormatVaList(format, args); + va_end(args); + + ChipLogError(Support, "%s", builder.c_str()); + chipDie(); +} + +extern "C" void pw_assert_HandleFailure(void) +{ + pw_assert_matter_HandleFailure(nullptr, -1, nullptr, "Crash: PW_ASSERT() or PW_DASSERT() failure"); +} diff --git a/src/backends/assert/public/pw_assert_matter/handler.h b/src/backends/assert/public/pw_assert_matter/handler.h new file mode 100644 index 00000000000000..ffc12c69877f43 --- /dev/null +++ b/src/backends/assert/public/pw_assert_matter/handler.h @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2020 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#pragma once + +#include "pw_preprocessor/compiler.h" +#include "pw_preprocessor/util.h" + +PW_EXTERN_C_START + +// Application-defined assert failure handler for pw_assert_basic. +// file_name - may be nullptr if not available +// line_number - may be -1 if not available +// function_name - may be nullptr if not available +// format & varags - The assert reason can be built using the format string and +// the varargs. +// +// Applications must define this function; it is not defined by pw_assert_basic. +void pw_assert_matter_HandleFailure(const char * file_name, int line_number, const char * function_name, const char * format, ...) + PW_PRINTF_FORMAT(4, 5) PW_NO_RETURN; + +PW_EXTERN_C_END diff --git a/src/backends/assert/public_overrides/pw_assert_backend/check_backend.h b/src/backends/assert/public_overrides/pw_assert_backend/check_backend.h new file mode 100644 index 00000000000000..c8413b51603c51 --- /dev/null +++ b/src/backends/assert/public_overrides/pw_assert_backend/check_backend.h @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2020 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#pragma once + +#include "pw_assert_matter/handler.h" + +// Use __PRETTY_FUNCTION__, a GNU extension, in place of the __func__ macro when +// supported. __PRETTY_FUNCTION__ expands to the full C++ function name. +#ifdef __GNUC__ +#define _PW_ASSERT_MATTER_FUNCTION_NAME __PRETTY_FUNCTION__ +#else +#define _PW_ASSERT_MATTER_FUNCTION_NAME __func__ +#endif // __GNUC__ + +// Die with a message with many attributes included. This is the crash macro +// frontend that funnels everything into the C handler provided by the user, +// pw_assert_MATTER_HandleFailure(). +#define PW_HANDLE_CRASH(...) \ + pw_assert_matter_HandleFailure( \ + __FILE__, \ + __LINE__, \ + _PW_ASSERT_MATTER_FUNCTION_NAME PW_COMMA_ARGS(__VA_ARGS__)) + +// Die with a message with many attributes included. This is the crash macro +// frontend that funnels everything into the C handler provided by the user, +// pw_assert_matter_HandleFailure(). +#define PW_HANDLE_ASSERT_FAILURE(condition_string, message, ...) \ + pw_assert_matter_HandleFailure(__FILE__, \ + __LINE__, \ + _PW_ASSERT_MATTER_FUNCTION_NAME, \ + "Check failed: " condition_string \ + ". " message PW_COMMA_ARGS(__VA_ARGS__)) + +// Sample assert failure message produced by the below implementation: +// +// Check failed: current_sensor (=610) < new_sensor (=50). More details! +// +// Putting the value next to the operand makes the string easier to read. + +// clang-format off +// This is too hairy for clang format to handle and retain readability. +#define PW_HANDLE_ASSERT_BINARY_COMPARE_FAILURE(arg_a_str, \ + arg_a_val, \ + comparison_op_str, \ + arg_b_str, \ + arg_b_val, \ + type_fmt, \ + message, ...) \ + pw_assert_matter_HandleFailure( \ + __FILE__, \ + __LINE__, \ + _PW_ASSERT_MATTER_FUNCTION_NAME, \ + "Check failed: " \ + arg_a_str " (=" type_fmt ") " \ + comparison_op_str " " \ + arg_b_str " (=" type_fmt ")" \ + ". " message, \ + arg_a_val, arg_b_val PW_COMMA_ARGS(__VA_ARGS__)) From 11b05bc80c7f1605fb402259cb6fbfbd6873d901 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Tue, 29 Oct 2024 16:36:33 -0400 Subject: [PATCH 02/15] No nullptr pass --- src/backends/assert/handler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backends/assert/handler.cpp b/src/backends/assert/handler.cpp index cfa33b875f3d3e..b776cb892d1e64 100644 --- a/src/backends/assert/handler.cpp +++ b/src/backends/assert/handler.cpp @@ -38,5 +38,5 @@ void pw_assert_matter_HandleFailure(const char * file_name, int line_number, con extern "C" void pw_assert_HandleFailure(void) { - pw_assert_matter_HandleFailure(nullptr, -1, nullptr, "Crash: PW_ASSERT() or PW_DASSERT() failure"); + pw_assert_matter_HandleFailure("", -1, "", "Crash: PW_ASSERT() or PW_DASSERT() failure"); } From 734ffd6c6efe673189509dbcbafff50a2514328d Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Wed, 30 Oct 2024 10:40:04 -0400 Subject: [PATCH 03/15] Add a log backend, update copyrights --- .gn | 2 +- .../assert/public/pw_assert_matter/handler.h | 2 +- .../pw_assert_backend/check_backend.h | 2 +- src/backends/log/BUILD.gn | 68 +++++++++++++++++++ .../log/public/pw_log_matter/log_matter.h | 52 ++++++++++++++ .../pw_log_backend/log_backend.h | 20 ++++++ 6 files changed, 143 insertions(+), 3 deletions(-) create mode 100644 src/backends/log/BUILD.gn create mode 100644 src/backends/log/public/pw_log_matter/log_matter.h create mode 100644 src/backends/log/public_overrides/pw_log_backend/log_backend.h diff --git a/.gn b/.gn index ee06aad4503e28..466dbf94a7d59d 100644 --- a/.gn +++ b/.gn @@ -36,7 +36,7 @@ default_args = { # Required for pw_unit_test pw_sys_io_BACKEND = "$dir_pw_sys_io_stdio" pw_assert_BACKEND = "//src/backends/assert" - pw_log_BACKEND = "$dir_pw_log_basic" + pw_log_BACKEND = "//src/backends/log" # TODO: Make sure only unit tests link against this pw_build_LINK_DEPS = [ diff --git a/src/backends/assert/public/pw_assert_matter/handler.h b/src/backends/assert/public/pw_assert_matter/handler.h index ffc12c69877f43..efeac9a1c71d4b 100644 --- a/src/backends/assert/public/pw_assert_matter/handler.h +++ b/src/backends/assert/public/pw_assert_matter/handler.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2024 Project CHIP Authors * All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/backends/assert/public_overrides/pw_assert_backend/check_backend.h b/src/backends/assert/public_overrides/pw_assert_backend/check_backend.h index c8413b51603c51..d4a5a11d3c49e7 100644 --- a/src/backends/assert/public_overrides/pw_assert_backend/check_backend.h +++ b/src/backends/assert/public_overrides/pw_assert_backend/check_backend.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2024 Project CHIP Authors * All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/backends/log/BUILD.gn b/src/backends/log/BUILD.gn new file mode 100644 index 00000000000000..c38ab2884ec487 --- /dev/null +++ b/src/backends/log/BUILD.gn @@ -0,0 +1,68 @@ +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build_overrides/build.gni") +import("//build_overrides/chip.gni") +import("//build_overrides/pigweed.gni") + +import("$dir_pw_build/facade.gni") + +config("public_include_path") { + include_dirs = [ "public" ] + visibility = [ ":*" ] +} + +config("backend_config") { + include_dirs = [ "public_overrides" ] + visibility = [ ":*" ] +} + +pw_facade("handler") { + backend = "${chip_root}/src/backends/log:log.impl" + public_configs = [ ":public_include_path" ] + public_deps = [ "$dir_pw_preprocessor" ] + public = [ "public/pw_log_matter/log_matter.h" ] +} + +pw_source_set("log") { + public_configs = [ + ":backend_config", + ":public_include_path", + ] + public = [ + "public/pw_log_matter/log_matter.h", + ] + public_deps = [ ":handler.facade" ] +} + +# A basic handler backend using pw_sys_io. +pw_source_set("log.impl") { + # Turn off GN check since this target intentionally leaves out deps to avoid + # circular dependencies. + check_includes = false + + configs = [ + "$dir_pw_string:public_include_path", + "$dir_pw_result:public_include_path", + ] + + deps = [ + ":handler.facade", + "$dir_pw_log:config", + "$dir_pw_preprocessor", + "$dir_pw_string:builder", + "${chip_root}/src/lib/support", + ] + sources = [ ] +} diff --git a/src/backends/log/public/pw_log_matter/log_matter.h b/src/backends/log/public/pw_log_matter/log_matter.h new file mode 100644 index 00000000000000..38b492c1f6ff95 --- /dev/null +++ b/src/backends/log/public/pw_log_matter/log_matter.h @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#pragma once + +#include "lib/support/logging/Constants.h" +#include +#include + +// Pigweed defines more granular logging than CHIP. +// we match the following: +// - Detail == DEBUG +// - Progress == INFO +// - ERROR = WARN, ERROR, CRITICAL + +constexpr chip::Logging::LogCategory PwLogLevelToChipLogCategory(int level) +{ + switch (level) + { + case PW_LOG_LEVEL_DEBUG: + return chip::Logging::kLogCategory_Detail; + case PW_LOG_LEVEL_INFO: + return chip::Logging::kLogCategory_Progress; + default: + return chip::Logging::kLogCategory_Error; + } +} + +#define PW_LOG_DEBUG(...) ChipLogDetail(NotSpecified, __VA_ARGS__) +#define PW_LOG_INFO(...) ChipLogProgress(NotSpecified, __VA_ARGS__) +#define PW_LOG_WARN(...) ChipLogError(NotSpecified, __VA_ARGS__) +#define PW_LOG_ERROR(...) ChipLogError(NotSpecified, __VA_ARGS__) +#define PW_LOG_CRITICAL(...) ChipLogError(NotSpecified, __VA_ARGS__) + +// Log a message with many attributes included. +// +// This is the main macro that functions not included above will use +#define PW_HANDLE_LOG(level, module, flags, message, ...) \ + ChipInternalLogImpl(Application, PwLogLevelToChipLogCategory(level), message, __VA_ARGS__) diff --git a/src/backends/log/public_overrides/pw_log_backend/log_backend.h b/src/backends/log/public_overrides/pw_log_backend/log_backend.h new file mode 100644 index 00000000000000..81e6a456663d53 --- /dev/null +++ b/src/backends/log/public_overrides/pw_log_backend/log_backend.h @@ -0,0 +1,20 @@ +/* + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#pragma once + +#include "pw_log_matter/log_matter.h" + From ce47b10d8519b408c073c86043c2c1c5dd0054f3 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Wed, 30 Oct 2024 10:40:19 -0400 Subject: [PATCH 04/15] Restyle --- src/backends/assert/BUILD.gn | 4 +--- .../pw_assert_backend/check_backend.h | 18 ++++++------------ src/backends/log/BUILD.gn | 6 ++---- .../pw_log_backend/log_backend.h | 1 - 4 files changed, 9 insertions(+), 20 deletions(-) diff --git a/src/backends/assert/BUILD.gn b/src/backends/assert/BUILD.gn index 7960e24916fcca..0e1436bd3d04d7 100644 --- a/src/backends/assert/BUILD.gn +++ b/src/backends/assert/BUILD.gn @@ -40,9 +40,7 @@ pw_source_set("assert") { ":backend_config", ":public_include_path", ] - public = [ - "public/pw_assert_matter/handler.h", - ] + public = [ "public/pw_assert_matter/handler.h" ] public_deps = [ ":handler.facade" ] } diff --git a/src/backends/assert/public_overrides/pw_assert_backend/check_backend.h b/src/backends/assert/public_overrides/pw_assert_backend/check_backend.h index d4a5a11d3c49e7..af6c76aa0db302 100644 --- a/src/backends/assert/public_overrides/pw_assert_backend/check_backend.h +++ b/src/backends/assert/public_overrides/pw_assert_backend/check_backend.h @@ -24,26 +24,20 @@ #define _PW_ASSERT_MATTER_FUNCTION_NAME __PRETTY_FUNCTION__ #else #define _PW_ASSERT_MATTER_FUNCTION_NAME __func__ -#endif // __GNUC__ +#endif // __GNUC__ // Die with a message with many attributes included. This is the crash macro // frontend that funnels everything into the C handler provided by the user, // pw_assert_MATTER_HandleFailure(). -#define PW_HANDLE_CRASH(...) \ - pw_assert_matter_HandleFailure( \ - __FILE__, \ - __LINE__, \ - _PW_ASSERT_MATTER_FUNCTION_NAME PW_COMMA_ARGS(__VA_ARGS__)) +#define PW_HANDLE_CRASH(...) \ + pw_assert_matter_HandleFailure(__FILE__, __LINE__, _PW_ASSERT_MATTER_FUNCTION_NAME PW_COMMA_ARGS(__VA_ARGS__)) // Die with a message with many attributes included. This is the crash macro // frontend that funnels everything into the C handler provided by the user, // pw_assert_matter_HandleFailure(). -#define PW_HANDLE_ASSERT_FAILURE(condition_string, message, ...) \ - pw_assert_matter_HandleFailure(__FILE__, \ - __LINE__, \ - _PW_ASSERT_MATTER_FUNCTION_NAME, \ - "Check failed: " condition_string \ - ". " message PW_COMMA_ARGS(__VA_ARGS__)) +#define PW_HANDLE_ASSERT_FAILURE(condition_string, message, ...) \ + pw_assert_matter_HandleFailure(__FILE__, __LINE__, _PW_ASSERT_MATTER_FUNCTION_NAME, \ + "Check failed: " condition_string ". " message PW_COMMA_ARGS(__VA_ARGS__)) // Sample assert failure message produced by the below implementation: // diff --git a/src/backends/log/BUILD.gn b/src/backends/log/BUILD.gn index c38ab2884ec487..80b024cb0e964f 100644 --- a/src/backends/log/BUILD.gn +++ b/src/backends/log/BUILD.gn @@ -40,9 +40,7 @@ pw_source_set("log") { ":backend_config", ":public_include_path", ] - public = [ - "public/pw_log_matter/log_matter.h", - ] + public = [ "public/pw_log_matter/log_matter.h" ] public_deps = [ ":handler.facade" ] } @@ -64,5 +62,5 @@ pw_source_set("log.impl") { "$dir_pw_string:builder", "${chip_root}/src/lib/support", ] - sources = [ ] + sources = [] } diff --git a/src/backends/log/public_overrides/pw_log_backend/log_backend.h b/src/backends/log/public_overrides/pw_log_backend/log_backend.h index 81e6a456663d53..8e9e15947ab0d9 100644 --- a/src/backends/log/public_overrides/pw_log_backend/log_backend.h +++ b/src/backends/log/public_overrides/pw_log_backend/log_backend.h @@ -17,4 +17,3 @@ #pragma once #include "pw_log_matter/log_matter.h" - From b1bfe6df039c59c72cff16a21e2c9d5c7a2acd55 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Wed, 30 Oct 2024 10:54:25 -0400 Subject: [PATCH 05/15] Switch all backends for log and assert to the new chip backends instead of previous built-in/basic ones. Remove old log backend --- .../bouffalolab/common/lib/pw_rpc/pw_rpc.gni | 4 +- config/efr32/lib/pw_rpc/pw_rpc.gni | 4 +- config/mbed/chip-gn/lib/pw_rpc/pw_rpc.gni | 4 +- config/nxp/lib/pw_rpc/pw_rpc.gni | 4 +- config/qpg/lib/pw_rpc/pw_rpc.gni | 4 +- .../all-clusters-app/linux/with_pw_rpc.gni | 4 +- examples/android/CHIPTest/args.gni | 4 +- examples/chef/linux/with_pw_rpc.gni | 4 +- examples/fabric-admin/with_pw_rpc.gni | 4 +- .../fabric-bridge-app/linux/with_pw_rpc.gni | 4 +- examples/light-switch-app/genio/args.gni | 4 +- .../genio/build_for_wifi_args.gni | 4 +- examples/light-switch-app/qpg/args.gni | 4 +- .../linux/with_pw_rpc.gni | 4 +- .../lighting-app/bouffalolab/bl602/args.gni | 4 +- .../lighting-app/bouffalolab/bl702/args.gni | 4 +- .../lighting-app/bouffalolab/bl702l/args.gni | 4 +- examples/lighting-app/genio/args.gni | 4 +- .../genio/build_for_wifi_args.gni | 4 +- examples/lighting-app/linux/with_pw_rpc.gni | 4 +- examples/lighting-app/qpg/args.gni | 4 +- examples/lock-app/genio/args.gni | 4 +- .../lock-app/genio/build_for_wifi_args.gni | 4 +- examples/lock-app/qpg/args.gni | 4 +- examples/ota-requestor-app/genio/args.gni | 4 +- .../genio/build_for_wifi_args.gni | 4 +- examples/shell/genio/args.gni | 4 +- examples/shell/qpg/args.gni | 4 +- examples/thermostat/genio/args.gni | 4 +- .../thermostat/genio/build_for_wifi_args.gni | 4 +- examples/thermostat/qpg/args.gni | 4 +- src/app/tests/BUILD.gn | 2 - src/lib/support/pw_log_chip/BUILD.gn | 35 ------------- .../pw_log_chip/public/pw_log_chip/log_chip.h | 50 ------------------- .../pw_log_backend/log_backend.h | 24 --------- src/test_driver/efr32/args.gni | 4 +- 36 files changed, 64 insertions(+), 175 deletions(-) delete mode 100644 src/lib/support/pw_log_chip/BUILD.gn delete mode 100644 src/lib/support/pw_log_chip/public/pw_log_chip/log_chip.h delete mode 100644 src/lib/support/pw_log_chip/public_overrides/pw_log_backend/log_backend.h diff --git a/config/bouffalolab/common/lib/pw_rpc/pw_rpc.gni b/config/bouffalolab/common/lib/pw_rpc/pw_rpc.gni index 2cfbc034e875eb..7efdd73772f786 100644 --- a/config/bouffalolab/common/lib/pw_rpc/pw_rpc.gni +++ b/config/bouffalolab/common/lib/pw_rpc/pw_rpc.gni @@ -15,8 +15,8 @@ import("//build_overrides/chip.gni") import("//build_overrides/pigweed.gni") -pw_log_BACKEND = "$dir_pw_log_basic" -pw_assert_BACKEND = "$dir_pw_assert_log" +pw_log_BACKEND = "${chip_root}/src/backends/log" +pw_assert_BACKEND = "${chip_root}/src/backends/assert" pw_sys_io_BACKEND = "${chip_root}/examples/platform/bouffalolab/common/rpc/pw_sys_io:pw_sys_io" diff --git a/config/efr32/lib/pw_rpc/pw_rpc.gni b/config/efr32/lib/pw_rpc/pw_rpc.gni index 101112c12dadc9..be80db059b3507 100644 --- a/config/efr32/lib/pw_rpc/pw_rpc.gni +++ b/config/efr32/lib/pw_rpc/pw_rpc.gni @@ -15,8 +15,8 @@ import("//build_overrides/chip.gni") import("//build_overrides/pigweed.gni") -pw_log_BACKEND = "$dir_pw_log_basic" -pw_assert_BACKEND = "$dir_pw_assert_log:check_backend" +pw_log_BACKEND = "${chip_root}/src/backends/log" +pw_assert_BACKEND = "${chip_root}/src/backends/assert" pw_rpc_CONFIG = "$dir_pw_rpc:disable_global_mutex" pw_sys_io_BACKEND = "${chip_root}/examples/platform/silabs/pw_sys_io:pw_sys_io_silabs" diff --git a/config/mbed/chip-gn/lib/pw_rpc/pw_rpc.gni b/config/mbed/chip-gn/lib/pw_rpc/pw_rpc.gni index 2b03f6b4c9958c..98b7674970ee53 100644 --- a/config/mbed/chip-gn/lib/pw_rpc/pw_rpc.gni +++ b/config/mbed/chip-gn/lib/pw_rpc/pw_rpc.gni @@ -15,8 +15,8 @@ import("//build_overrides/chip.gni") import("//build_overrides/pigweed.gni") -pw_log_BACKEND = "$dir_pw_log_basic" -pw_assert_BACKEND = "$dir_pw_assert_log:check_backend" +pw_log_BACKEND = "${chip_root}/src/backends/log" +pw_assert_BACKEND = "${chip_root}/src/backends/assert" pw_sys_io_BACKEND = "${chip_root}/examples/platform/mbed/pw_sys_io:pw_sys_io_mbed" pw_rpc_system_server_BACKEND = diff --git a/config/nxp/lib/pw_rpc/pw_rpc.gni b/config/nxp/lib/pw_rpc/pw_rpc.gni index 68255db8bb96da..bb29126216b94e 100644 --- a/config/nxp/lib/pw_rpc/pw_rpc.gni +++ b/config/nxp/lib/pw_rpc/pw_rpc.gni @@ -15,8 +15,8 @@ import("//build_overrides/chip.gni") import("//build_overrides/pigweed.gni") -pw_log_BACKEND = "$dir_pw_log_basic" -pw_assert_BACKEND = "$dir_pw_assert_log:check_backend" +pw_log_BACKEND = "${chip_root}/src/backends/log" +pw_assert_BACKEND = "${chip_root}/src/backends/assert" pw_rpc_CONFIG = "$dir_pw_rpc:disable_global_mutex" pw_sys_io_BACKEND = "${chip_root}/examples/platform/nxp/pw_sys_io:pw_sys_io_nxp" diff --git a/config/qpg/lib/pw_rpc/pw_rpc.gni b/config/qpg/lib/pw_rpc/pw_rpc.gni index 60fb93e6b8fc44..b4757e6ae6e01f 100644 --- a/config/qpg/lib/pw_rpc/pw_rpc.gni +++ b/config/qpg/lib/pw_rpc/pw_rpc.gni @@ -15,8 +15,8 @@ import("//build_overrides/chip.gni") import("//build_overrides/pigweed.gni") -pw_log_BACKEND = "$dir_pw_log_basic" -pw_assert_BACKEND = "$dir_pw_assert_log:check_backend" +pw_log_BACKEND = "${chip_root}/src/backends/log" +pw_assert_BACKEND = "${chip_root}/src/backends/assert" pw_sys_io_BACKEND = "${chip_root}/examples/platform/qpg/pw_sys_io:pw_sys_io_qpg" pw_build_LINK_DEPS = [ diff --git a/examples/all-clusters-app/linux/with_pw_rpc.gni b/examples/all-clusters-app/linux/with_pw_rpc.gni index 0f1ab1ea89c121..02b81fed845458 100644 --- a/examples/all-clusters-app/linux/with_pw_rpc.gni +++ b/examples/all-clusters-app/linux/with_pw_rpc.gni @@ -21,8 +21,8 @@ import("${chip_root}/config/standalone/args.gni") import("//build_overrides/pigweed.gni") -pw_log_BACKEND = "$dir_pw_log_basic" -pw_assert_BACKEND = "$dir_pw_assert_log:check_backend" +pw_log_BACKEND = "${chip_root}/src/backends/log" +pw_assert_BACKEND = "${chip_root}/src/backends/assert" pw_sys_io_BACKEND = "$dir_pw_sys_io_stdio" pw_trace_BACKEND = "$dir_pw_trace_tokenized" pw_unit_test_MAIN = "$dir_pw_unit_test:logging_main" diff --git a/examples/android/CHIPTest/args.gni b/examples/android/CHIPTest/args.gni index df7c34af9c20ae..d11b391cd59561 100644 --- a/examples/android/CHIPTest/args.gni +++ b/examples/android/CHIPTest/args.gni @@ -28,8 +28,8 @@ chip_monolithic_tests = false pw_sys_io_BACKEND = "$dir_pw_sys_io_stdio" -pw_assert_BACKEND = "$dir_pw_assert_log" -pw_log_BACKEND = "$dir_pw_log_basic" +pw_assert_BACKEND = "${chip_root}/src/backends/assert" +pw_log_BACKEND = "${chip_root}/src/backends/log" pw_unit_test_BACKEND = "$dir_pw_unit_test:light" diff --git a/examples/chef/linux/with_pw_rpc.gni b/examples/chef/linux/with_pw_rpc.gni index 0f1ab1ea89c121..02b81fed845458 100644 --- a/examples/chef/linux/with_pw_rpc.gni +++ b/examples/chef/linux/with_pw_rpc.gni @@ -21,8 +21,8 @@ import("${chip_root}/config/standalone/args.gni") import("//build_overrides/pigweed.gni") -pw_log_BACKEND = "$dir_pw_log_basic" -pw_assert_BACKEND = "$dir_pw_assert_log:check_backend" +pw_log_BACKEND = "${chip_root}/src/backends/log" +pw_assert_BACKEND = "${chip_root}/src/backends/assert" pw_sys_io_BACKEND = "$dir_pw_sys_io_stdio" pw_trace_BACKEND = "$dir_pw_trace_tokenized" pw_unit_test_MAIN = "$dir_pw_unit_test:logging_main" diff --git a/examples/fabric-admin/with_pw_rpc.gni b/examples/fabric-admin/with_pw_rpc.gni index abb9ac65f27e78..e6525c71e7b492 100644 --- a/examples/fabric-admin/with_pw_rpc.gni +++ b/examples/fabric-admin/with_pw_rpc.gni @@ -21,8 +21,8 @@ import("${chip_root}/config/standalone/args.gni") import("//build_overrides/pigweed.gni") -pw_log_BACKEND = "$dir_pw_log_basic" -pw_assert_BACKEND = "$dir_pw_assert_log:check_backend" +pw_log_BACKEND = "${chip_root}/src/backends/log" +pw_assert_BACKEND = "${chip_root}/src/backends/assert" pw_sys_io_BACKEND = "$dir_pw_sys_io_stdio" pw_trace_BACKEND = "$dir_pw_trace_tokenized" pw_unit_test_MAIN = "$dir_pw_unit_test:logging_main" diff --git a/examples/fabric-bridge-app/linux/with_pw_rpc.gni b/examples/fabric-bridge-app/linux/with_pw_rpc.gni index e1bd567cf22db2..d680d838e1010f 100644 --- a/examples/fabric-bridge-app/linux/with_pw_rpc.gni +++ b/examples/fabric-bridge-app/linux/with_pw_rpc.gni @@ -21,8 +21,8 @@ import("${chip_root}/config/standalone/args.gni") import("//build_overrides/pigweed.gni") -pw_log_BACKEND = "$dir_pw_log_basic" -pw_assert_BACKEND = "$dir_pw_assert_log:check_backend" +pw_log_BACKEND = "${chip_root}/src/backends/log" +pw_assert_BACKEND = "${chip_root}/src/backends/assert" pw_sys_io_BACKEND = "$dir_pw_sys_io_stdio" pw_trace_BACKEND = "$dir_pw_trace_tokenized" pw_unit_test_MAIN = "$dir_pw_unit_test:logging_main" diff --git a/examples/light-switch-app/genio/args.gni b/examples/light-switch-app/genio/args.gni index ddbfb9fa47f20d..0bf08059fdf649 100644 --- a/examples/light-switch-app/genio/args.gni +++ b/examples/light-switch-app/genio/args.gni @@ -18,8 +18,8 @@ import("${chip_root}/src/platform/mt793x/args.gni") mt793x_sdk_target = get_label_info(":sdk", "label_no_toolchain") -pw_log_BACKEND = "${chip_root}/src/lib/support/pw_log_chip" -pw_assert_BACKEND = "$dir_pw_assert_log" +pw_log_BACKEND = "${chip_root}/src/backends/log" +pw_assert_BACKEND = "${chip_root}/src/backends/assert" chip_enable_ble = true diff --git a/examples/light-switch-app/genio/build_for_wifi_args.gni b/examples/light-switch-app/genio/build_for_wifi_args.gni index cb0ea7600a2dd5..7ea45da9f2e2bb 100644 --- a/examples/light-switch-app/genio/build_for_wifi_args.gni +++ b/examples/light-switch-app/genio/build_for_wifi_args.gni @@ -18,5 +18,5 @@ mt793x_sdk_target = get_label_info(":sdk", "label_no_toolchain") chip_enable_openthread = false import("${chip_root}/src/platform/MT793X/wifi_args.gni") -pw_log_BACKEND = "${chip_root}/src/lib/support/pw_log_chip" -pw_assert_BACKEND = "$dir_pw_assert_log" +pw_log_BACKEND = "${chip_root}/src/backends/log" +pw_assert_BACKEND = "${chip_root}/src/backends/assert" diff --git a/examples/light-switch-app/qpg/args.gni b/examples/light-switch-app/qpg/args.gni index 9a69cd16959f6d..b8c79577e7e1e3 100644 --- a/examples/light-switch-app/qpg/args.gni +++ b/examples/light-switch-app/qpg/args.gni @@ -32,5 +32,5 @@ chip_stack_lock_tracking = "none" matter_device_vid = "0xFFF1" matter_device_pid = "0x8004" -pw_log_BACKEND = "${chip_root}/src/lib/support/pw_log_chip" -pw_assert_BACKEND = "$dir_pw_assert_log:check_backend" +pw_log_BACKEND = "${chip_root}/src/backends/log" +pw_assert_BACKEND = "${chip_root}/src/backends/assert" diff --git a/examples/lighting-app-data-mode-no-unique-id/linux/with_pw_rpc.gni b/examples/lighting-app-data-mode-no-unique-id/linux/with_pw_rpc.gni index 0f1ab1ea89c121..02b81fed845458 100644 --- a/examples/lighting-app-data-mode-no-unique-id/linux/with_pw_rpc.gni +++ b/examples/lighting-app-data-mode-no-unique-id/linux/with_pw_rpc.gni @@ -21,8 +21,8 @@ import("${chip_root}/config/standalone/args.gni") import("//build_overrides/pigweed.gni") -pw_log_BACKEND = "$dir_pw_log_basic" -pw_assert_BACKEND = "$dir_pw_assert_log:check_backend" +pw_log_BACKEND = "${chip_root}/src/backends/log" +pw_assert_BACKEND = "${chip_root}/src/backends/assert" pw_sys_io_BACKEND = "$dir_pw_sys_io_stdio" pw_trace_BACKEND = "$dir_pw_trace_tokenized" pw_unit_test_MAIN = "$dir_pw_unit_test:logging_main" diff --git a/examples/lighting-app/bouffalolab/bl602/args.gni b/examples/lighting-app/bouffalolab/bl602/args.gni index 0fcb5aac2edc9b..470bce11160017 100644 --- a/examples/lighting-app/bouffalolab/bl602/args.gni +++ b/examples/lighting-app/bouffalolab/bl602/args.gni @@ -19,8 +19,8 @@ import("${chip_root}/src/platform/bouffalolab/BL602/args.gni") bl_iot_sdk_target = get_label_info(":sdk", "label_no_toolchain") -pw_log_BACKEND = "${chip_root}/src/lib/support/pw_log_chip" -pw_assert_BACKEND = "$dir_pw_assert_log" +pw_log_BACKEND = "${chip_root}/src/backends/log" +pw_assert_BACKEND = "${chip_root}/src/backends/assert" pw_rpc_CONFIG = "$dir_pw_rpc:disable_global_mutex" chip_detail_logging = false diff --git a/examples/lighting-app/bouffalolab/bl702/args.gni b/examples/lighting-app/bouffalolab/bl702/args.gni index e06c706903b935..08612ba63362ec 100644 --- a/examples/lighting-app/bouffalolab/bl702/args.gni +++ b/examples/lighting-app/bouffalolab/bl702/args.gni @@ -19,8 +19,8 @@ import("${chip_root}/src/platform/bouffalolab/BL702/args.gni") bl_iot_sdk_target = get_label_info(":sdk", "label_no_toolchain") -pw_log_BACKEND = "${chip_root}/src/lib/support/pw_log_chip" -pw_assert_BACKEND = "$dir_pw_assert_log" +pw_log_BACKEND = "${chip_root}/src/backends/log" +pw_assert_BACKEND = "${chip_root}/src/backends/assert" pw_rpc_CONFIG = "$dir_pw_rpc:disable_global_mutex" chip_detail_logging = false diff --git a/examples/lighting-app/bouffalolab/bl702l/args.gni b/examples/lighting-app/bouffalolab/bl702l/args.gni index 3120af1cce60f6..63fdf6b241b068 100644 --- a/examples/lighting-app/bouffalolab/bl702l/args.gni +++ b/examples/lighting-app/bouffalolab/bl702l/args.gni @@ -19,8 +19,8 @@ import("${chip_root}/src/platform/bouffalolab/BL702L/args.gni") bl_iot_sdk_target = get_label_info(":sdk", "label_no_toolchain") -pw_log_BACKEND = "${chip_root}/src/lib/support/pw_log_chip" -pw_assert_BACKEND = "$dir_pw_assert_log" +pw_log_BACKEND = "${chip_root}/src/backends/log" +pw_assert_BACKEND = "${chip_root}/src/backends/assert" pw_rpc_CONFIG = "$dir_pw_rpc:disable_global_mutex" chip_detail_logging = false diff --git a/examples/lighting-app/genio/args.gni b/examples/lighting-app/genio/args.gni index e22869653722a7..1de2a080aca8a5 100644 --- a/examples/lighting-app/genio/args.gni +++ b/examples/lighting-app/genio/args.gni @@ -19,8 +19,8 @@ import("${chip_root}/src/platform/mt793x/args.gni") mt793x_sdk_target = get_label_info(":sdk", "label_no_toolchain") -pw_log_BACKEND = "${chip_root}/src/lib/support/pw_log_chip" -pw_assert_BACKEND = "$dir_pw_assert_log" +pw_log_BACKEND = "${chip_root}/src/backends/log" +pw_assert_BACKEND = "${chip_root}/src/backends/assert" chip_enable_ble = true diff --git a/examples/lighting-app/genio/build_for_wifi_args.gni b/examples/lighting-app/genio/build_for_wifi_args.gni index cb0ea7600a2dd5..7ea45da9f2e2bb 100644 --- a/examples/lighting-app/genio/build_for_wifi_args.gni +++ b/examples/lighting-app/genio/build_for_wifi_args.gni @@ -18,5 +18,5 @@ mt793x_sdk_target = get_label_info(":sdk", "label_no_toolchain") chip_enable_openthread = false import("${chip_root}/src/platform/MT793X/wifi_args.gni") -pw_log_BACKEND = "${chip_root}/src/lib/support/pw_log_chip" -pw_assert_BACKEND = "$dir_pw_assert_log" +pw_log_BACKEND = "${chip_root}/src/backends/log" +pw_assert_BACKEND = "${chip_root}/src/backends/assert" diff --git a/examples/lighting-app/linux/with_pw_rpc.gni b/examples/lighting-app/linux/with_pw_rpc.gni index 0f1ab1ea89c121..02b81fed845458 100644 --- a/examples/lighting-app/linux/with_pw_rpc.gni +++ b/examples/lighting-app/linux/with_pw_rpc.gni @@ -21,8 +21,8 @@ import("${chip_root}/config/standalone/args.gni") import("//build_overrides/pigweed.gni") -pw_log_BACKEND = "$dir_pw_log_basic" -pw_assert_BACKEND = "$dir_pw_assert_log:check_backend" +pw_log_BACKEND = "${chip_root}/src/backends/log" +pw_assert_BACKEND = "${chip_root}/src/backends/assert" pw_sys_io_BACKEND = "$dir_pw_sys_io_stdio" pw_trace_BACKEND = "$dir_pw_trace_tokenized" pw_unit_test_MAIN = "$dir_pw_unit_test:logging_main" diff --git a/examples/lighting-app/qpg/args.gni b/examples/lighting-app/qpg/args.gni index ea22dfd187fbb2..373429464dc3ff 100644 --- a/examples/lighting-app/qpg/args.gni +++ b/examples/lighting-app/qpg/args.gni @@ -30,5 +30,5 @@ chip_stack_lock_tracking = "none" matter_device_vid = "0xFFF1" matter_device_pid = "0x8005" -pw_log_BACKEND = "${chip_root}/src/lib/support/pw_log_chip" -pw_assert_BACKEND = "$dir_pw_assert_log:check_backend" +pw_log_BACKEND = "${chip_root}/src/backends/log" +pw_assert_BACKEND = "${chip_root}/src/backends/assert" diff --git a/examples/lock-app/genio/args.gni b/examples/lock-app/genio/args.gni index ddbfb9fa47f20d..0bf08059fdf649 100644 --- a/examples/lock-app/genio/args.gni +++ b/examples/lock-app/genio/args.gni @@ -18,8 +18,8 @@ import("${chip_root}/src/platform/mt793x/args.gni") mt793x_sdk_target = get_label_info(":sdk", "label_no_toolchain") -pw_log_BACKEND = "${chip_root}/src/lib/support/pw_log_chip" -pw_assert_BACKEND = "$dir_pw_assert_log" +pw_log_BACKEND = "${chip_root}/src/backends/log" +pw_assert_BACKEND = "${chip_root}/src/backends/assert" chip_enable_ble = true diff --git a/examples/lock-app/genio/build_for_wifi_args.gni b/examples/lock-app/genio/build_for_wifi_args.gni index cb0ea7600a2dd5..7ea45da9f2e2bb 100644 --- a/examples/lock-app/genio/build_for_wifi_args.gni +++ b/examples/lock-app/genio/build_for_wifi_args.gni @@ -18,5 +18,5 @@ mt793x_sdk_target = get_label_info(":sdk", "label_no_toolchain") chip_enable_openthread = false import("${chip_root}/src/platform/MT793X/wifi_args.gni") -pw_log_BACKEND = "${chip_root}/src/lib/support/pw_log_chip" -pw_assert_BACKEND = "$dir_pw_assert_log" +pw_log_BACKEND = "${chip_root}/src/backends/log" +pw_assert_BACKEND = "${chip_root}/src/backends/assert" diff --git a/examples/lock-app/qpg/args.gni b/examples/lock-app/qpg/args.gni index d5dcdfe217c635..c0b0d9e11a0d8f 100644 --- a/examples/lock-app/qpg/args.gni +++ b/examples/lock-app/qpg/args.gni @@ -31,5 +31,5 @@ chip_stack_lock_tracking = "none" matter_device_vid = "0xFFF1" matter_device_pid = "0x8006" -pw_log_BACKEND = "${chip_root}/src/lib/support/pw_log_chip" -pw_assert_BACKEND = "$dir_pw_assert_log:check_backend" +pw_log_BACKEND = "${chip_root}/src/backends/log" +pw_assert_BACKEND = "${chip_root}/src/backends/assert" diff --git a/examples/ota-requestor-app/genio/args.gni b/examples/ota-requestor-app/genio/args.gni index 7a6cc1c74c6394..c7521664841c23 100644 --- a/examples/ota-requestor-app/genio/args.gni +++ b/examples/ota-requestor-app/genio/args.gni @@ -18,8 +18,8 @@ import("${chip_root}/src/platform/mt793x/args.gni") mt793x_sdk_target = get_label_info(":sdk", "label_no_toolchain") -pw_log_BACKEND = "${chip_root}/src/lib/support/pw_log_chip" -pw_assert_BACKEND = "$dir_pw_assert_log" +pw_log_BACKEND = "${chip_root}/src/backends/log" +pw_assert_BACKEND = "${chip_root}/src/backends/assert" chip_enable_ble = true diff --git a/examples/ota-requestor-app/genio/build_for_wifi_args.gni b/examples/ota-requestor-app/genio/build_for_wifi_args.gni index cb0ea7600a2dd5..7ea45da9f2e2bb 100644 --- a/examples/ota-requestor-app/genio/build_for_wifi_args.gni +++ b/examples/ota-requestor-app/genio/build_for_wifi_args.gni @@ -18,5 +18,5 @@ mt793x_sdk_target = get_label_info(":sdk", "label_no_toolchain") chip_enable_openthread = false import("${chip_root}/src/platform/MT793X/wifi_args.gni") -pw_log_BACKEND = "${chip_root}/src/lib/support/pw_log_chip" -pw_assert_BACKEND = "$dir_pw_assert_log" +pw_log_BACKEND = "${chip_root}/src/backends/log" +pw_assert_BACKEND = "${chip_root}/src/backends/assert" diff --git a/examples/shell/genio/args.gni b/examples/shell/genio/args.gni index 8d2c11daa5b180..5099f70ee68ace 100644 --- a/examples/shell/genio/args.gni +++ b/examples/shell/genio/args.gni @@ -19,8 +19,8 @@ import("${chip_root}/src/platform/mt793x/args.gni") mt793x_sdk_target = get_label_info(":sdk", "label_no_toolchain") -pw_log_BACKEND = "${chip_root}/src/lib/support/pw_log_chip" -pw_assert_BACKEND = "$dir_pw_assert_log" +pw_log_BACKEND = "${chip_root}/src/backends/log" +pw_assert_BACKEND = "${chip_root}/src/backends/assert" chip_enable_ble = false chip_config_network_layer_ble = false diff --git a/examples/shell/qpg/args.gni b/examples/shell/qpg/args.gni index 478e91d9cb05a6..c5b5a8241f09d8 100644 --- a/examples/shell/qpg/args.gni +++ b/examples/shell/qpg/args.gni @@ -19,8 +19,8 @@ import("${chip_root}/examples/platform/qpg/args.gni") qpg_sdk_target = get_label_info(":sdk", "label_no_toolchain") -pw_log_BACKEND = "${chip_root}/src/lib/support/pw_log_chip" -pw_assert_BACKEND = "$dir_pw_assert_log:check_backend" +pw_log_BACKEND = "${chip_root}/src/backends/log" +pw_assert_BACKEND = "${chip_root}/src/backends/assert" chip_build_libshell = true # Disable lock tracking, since our FreeRTOS configuration does not set diff --git a/examples/thermostat/genio/args.gni b/examples/thermostat/genio/args.gni index ddbfb9fa47f20d..0bf08059fdf649 100644 --- a/examples/thermostat/genio/args.gni +++ b/examples/thermostat/genio/args.gni @@ -18,8 +18,8 @@ import("${chip_root}/src/platform/mt793x/args.gni") mt793x_sdk_target = get_label_info(":sdk", "label_no_toolchain") -pw_log_BACKEND = "${chip_root}/src/lib/support/pw_log_chip" -pw_assert_BACKEND = "$dir_pw_assert_log" +pw_log_BACKEND = "${chip_root}/src/backends/log" +pw_assert_BACKEND = "${chip_root}/src/backends/assert" chip_enable_ble = true diff --git a/examples/thermostat/genio/build_for_wifi_args.gni b/examples/thermostat/genio/build_for_wifi_args.gni index cb0ea7600a2dd5..7ea45da9f2e2bb 100644 --- a/examples/thermostat/genio/build_for_wifi_args.gni +++ b/examples/thermostat/genio/build_for_wifi_args.gni @@ -18,5 +18,5 @@ mt793x_sdk_target = get_label_info(":sdk", "label_no_toolchain") chip_enable_openthread = false import("${chip_root}/src/platform/MT793X/wifi_args.gni") -pw_log_BACKEND = "${chip_root}/src/lib/support/pw_log_chip" -pw_assert_BACKEND = "$dir_pw_assert_log" +pw_log_BACKEND = "${chip_root}/src/backends/log" +pw_assert_BACKEND = "${chip_root}/src/backends/assert" diff --git a/examples/thermostat/qpg/args.gni b/examples/thermostat/qpg/args.gni index 693375e4388593..9911b1a9b2bb6f 100644 --- a/examples/thermostat/qpg/args.gni +++ b/examples/thermostat/qpg/args.gni @@ -31,5 +31,5 @@ chip_stack_lock_tracking = "none" matter_device_vid = "0xFFF1" matter_device_pid = "0x8003" -pw_log_BACKEND = "${chip_root}/src/lib/support/pw_log_chip" -pw_assert_BACKEND = "$dir_pw_assert_log:check_backend" +pw_log_BACKEND = "${chip_root}/src/backends/log" +pw_assert_BACKEND = "${chip_root}/src/backends/assert" diff --git a/src/app/tests/BUILD.gn b/src/app/tests/BUILD.gn index 9ebed234e5b45e..5e9c0005c35f8a 100644 --- a/src/app/tests/BUILD.gn +++ b/src/app/tests/BUILD.gn @@ -181,8 +181,6 @@ source_set("app-test-stubs") { "test-interaction-model-api.h", ] - public_configs = [ "${chip_root}/src/lib/support/pw_log_chip:config" ] - public_deps = [ "${chip_root}/src/app/util/mock:mock_codegen_data_model", "${chip_root}/src/app/util/mock:mock_ember", diff --git a/src/lib/support/pw_log_chip/BUILD.gn b/src/lib/support/pw_log_chip/BUILD.gn deleted file mode 100644 index 23695fa505add0..00000000000000 --- a/src/lib/support/pw_log_chip/BUILD.gn +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright 2020 The Pigweed Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may not -# use this file except in compliance with the License. You may obtain a copy of -# the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations under -# the License. -import("//build_overrides/chip.gni") -import("//build_overrides/pigweed.gni") - -import("$dir_pw_build/target_types.gni") - -config("config") { - include_dirs = [ - "public", - "public_overrides", - ] -} - -pw_source_set("pw_log_chip") { - public_configs = [ ":config" ] - public_deps = [ ":pw_log_chip.impl" ] - public = [ "public_overrides/pw_log_backend/log_backend.h" ] - sources = [ "public/pw_log_chip/log_chip.h" ] -} - -pw_source_set("pw_log_chip.impl") { - public_deps = [ "${chip_root}/src/lib/support" ] -} diff --git a/src/lib/support/pw_log_chip/public/pw_log_chip/log_chip.h b/src/lib/support/pw_log_chip/public/pw_log_chip/log_chip.h deleted file mode 100644 index 6550ec707057da..00000000000000 --- a/src/lib/support/pw_log_chip/public/pw_log_chip/log_chip.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) 2020 Project CHIP Authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @file - * This header redirects Pigweed logging prints to chip. - */ -#pragma once - -#include - -#include "pw_preprocessor/arguments.h" - -/** - * Redirect pigweed log prints to chip logging. - * Currently does not use a log module, but this could be added when needed. - * pigweed debug and info level logs are mapped to chip's kLogCategory_Detail. - * All other log levels are mapped to chip's kLogCategory_Error. - * - * Note: This function should not be called directly, instead call the functions - * in pw_log/log.h. - * - * @param[in] level Pigweed log level. - * @param[in] flags Pigweed logging flags, currently these are ignored. - * @param[in] message The printf style log string. - */ -#define PW_LOG(level, flags, message, ...) \ - do \ - { \ - if (level >= PW_LOG_LEVEL_INFO) \ - { \ - ::chip::Logging::Log(::chip::Logging::kLogModule_NotSpecified, \ - (level <= PW_LOG_LEVEL_INFO) ? ::chip::Logging::kLogCategory_Detail \ - : ::chip::Logging::kLogCategory_Error, \ - message PW_COMMA_ARGS(__VA_ARGS__)); \ - } \ - } while (0) diff --git a/src/lib/support/pw_log_chip/public_overrides/pw_log_backend/log_backend.h b/src/lib/support/pw_log_chip/public_overrides/pw_log_backend/log_backend.h deleted file mode 100644 index aee9d4abff0403..00000000000000 --- a/src/lib/support/pw_log_chip/public_overrides/pw_log_backend/log_backend.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 2020 Project CHIP Authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @file - * This header interfaces with the Pigweed logging facade by overriding - * the backend header. - */ -#pragma once - -#include "pw_log_chip/log_chip.h" diff --git a/src/test_driver/efr32/args.gni b/src/test_driver/efr32/args.gni index 35be5dd63e3870..4620b53638cb90 100644 --- a/src/test_driver/efr32/args.gni +++ b/src/test_driver/efr32/args.gni @@ -30,8 +30,8 @@ openthread_external_platform = pw_rpc_CONFIG = "$dir_pw_rpc:disable_global_mutex" -pw_assert_BACKEND = "$dir_pw_assert_log" -pw_log_BACKEND = "$dir_pw_log_basic" +pw_assert_BACKEND = "${chip_root}/src/backends/assert" +pw_log_BACKEND = "${chip_root}/src/backends/log" pw_unit_test_BACKEND = "$dir_pw_unit_test:light" From 18d17cb612773196d9aec6984f0aeaef7e844452 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Wed, 30 Oct 2024 11:17:03 -0400 Subject: [PATCH 06/15] Update public to fix linter for gn references --- src/backends/assert/BUILD.gn | 5 ++++- src/backends/log/BUILD.gn | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/backends/assert/BUILD.gn b/src/backends/assert/BUILD.gn index 0e1436bd3d04d7..492193e22c053f 100644 --- a/src/backends/assert/BUILD.gn +++ b/src/backends/assert/BUILD.gn @@ -40,7 +40,10 @@ pw_source_set("assert") { ":backend_config", ":public_include_path", ] - public = [ "public/pw_assert_matter/handler.h" ] + public = [ + "public/pw_assert_matter/handler.h", + "public_overrides/pw_assert_backend/check_backend.h", + ] public_deps = [ ":handler.facade" ] } diff --git a/src/backends/log/BUILD.gn b/src/backends/log/BUILD.gn index 80b024cb0e964f..ee10cf0e2d9ec2 100644 --- a/src/backends/log/BUILD.gn +++ b/src/backends/log/BUILD.gn @@ -32,7 +32,10 @@ pw_facade("handler") { backend = "${chip_root}/src/backends/log:log.impl" public_configs = [ ":public_include_path" ] public_deps = [ "$dir_pw_preprocessor" ] - public = [ "public/pw_log_matter/log_matter.h" ] + public = [ + "public/pw_log_matter/log_matter.h", + "public_overrides/pw_log_backend/log_backend.h", + ] } pw_source_set("log") { From d4c4a1e8b3fcc825f778fba173966287ef7b9579 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Wed, 30 Oct 2024 11:21:08 -0400 Subject: [PATCH 07/15] Fix dependencies (this should fix boufalolab compile at least --- src/backends/log/BUILD.gn | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/backends/log/BUILD.gn b/src/backends/log/BUILD.gn index ee10cf0e2d9ec2..ab3cc067e1626d 100644 --- a/src/backends/log/BUILD.gn +++ b/src/backends/log/BUILD.gn @@ -31,7 +31,10 @@ config("backend_config") { pw_facade("handler") { backend = "${chip_root}/src/backends/log:log.impl" public_configs = [ ":public_include_path" ] - public_deps = [ "$dir_pw_preprocessor" ] + public_deps = [ + "$dir_pw_preprocessor", + "${chip_root}/src/lib/support:text_only_logging", + ] public = [ "public/pw_log_matter/log_matter.h", "public_overrides/pw_log_backend/log_backend.h", @@ -44,7 +47,10 @@ pw_source_set("log") { ":public_include_path", ] public = [ "public/pw_log_matter/log_matter.h" ] - public_deps = [ ":handler.facade" ] + public_deps = [ + ":handler.facade", + "${chip_root}/src/lib/support:text_only_logging", + ] } # A basic handler backend using pw_sys_io. From b02f04b2e5d309eb22af44284990c239753409c7 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Wed, 30 Oct 2024 11:22:39 -0400 Subject: [PATCH 08/15] Remove pw_log_basic as we do not use it anymore --- examples/common/pigweed/RpcService.cpp | 14 -------------- examples/common/pigweed/system_rpc_server.cc | 3 --- 2 files changed, 17 deletions(-) diff --git a/examples/common/pigweed/RpcService.cpp b/examples/common/pigweed/RpcService.cpp index 74d0b891e9b00d..c7a7af3a6e0b61 100644 --- a/examples/common/pigweed/RpcService.cpp +++ b/examples/common/pigweed/RpcService.cpp @@ -96,20 +96,6 @@ void Start(void (*RegisterServices)(pw::rpc::Server &), ::chip::rpc::Mutex * uar PW_DASSERT(RegisterServices != nullptr); uart_mutex = uart_mutex_; - // Send log messages to HDLC address 1. This prevents logs from interfering - // with pw_rpc communications. - pw::log_basic::SetOutput([](std::string_view log) { - if (uart_mutex) - { - uart_mutex->Lock(); - } - pw::hdlc::WriteUIFrame(1, pw::as_bytes(pw::span(log)), sysIoWriter); - if (uart_mutex) - { - uart_mutex->Unlock(); - } - }); - // Set up the server and start processing data. RegisterServices(server); diff --git a/examples/common/pigweed/system_rpc_server.cc b/examples/common/pigweed/system_rpc_server.cc index 098aa3b1711058..dd56aa517a5915 100644 --- a/examples/common/pigweed/system_rpc_server.cc +++ b/examples/common/pigweed/system_rpc_server.cc @@ -42,9 +42,6 @@ rpc::Server server(channels); void Init() { - // Send log messages to HDLC address 1. This prevents logs from interfering - // with pw_rpc communications. - pw::log_basic::SetOutput([](std::string_view log) { pw::hdlc::WriteUIFrame(1, pw::as_bytes(pw::span(log)), writer); }); } rpc::Server & Server() From 3a431aab9d77cd0d2e28374d80b35fb49fca7be8 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Wed, 30 Oct 2024 11:22:53 -0400 Subject: [PATCH 09/15] Restyle --- examples/common/pigweed/system_rpc_server.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/examples/common/pigweed/system_rpc_server.cc b/examples/common/pigweed/system_rpc_server.cc index dd56aa517a5915..32bfc614aa7a9d 100644 --- a/examples/common/pigweed/system_rpc_server.cc +++ b/examples/common/pigweed/system_rpc_server.cc @@ -40,9 +40,7 @@ rpc::Server server(channels); } // namespace -void Init() -{ -} +void Init() {} rpc::Server & Server() { From 301f11a870f4acadaa0de1a7ccff7d87a605c88c Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Wed, 30 Oct 2024 11:28:52 -0400 Subject: [PATCH 10/15] Remove one more log_basic usage --- examples/platform/linux/system_rpc_server.cc | 5 ----- 1 file changed, 5 deletions(-) diff --git a/examples/platform/linux/system_rpc_server.cc b/examples/platform/linux/system_rpc_server.cc index 6323ad597d0cfe..3b32e56cd90f13 100644 --- a/examples/platform/linux/system_rpc_server.cc +++ b/examples/platform/linux/system_rpc_server.cc @@ -56,11 +56,6 @@ void set_socket_port(uint16_t new_socket_port) void Init() { - log_basic::SetOutput([](std::string_view log) { - std::fprintf(stderr, "%.*s\n", static_cast(log.size()), log.data()); - hdlc::WriteUIFrame(1, as_bytes(span(log)), socket_stream).IgnoreError(); // TODO(pwbug/387): Handle Status properly - }); - PW_LOG_INFO("Starting pw_rpc server on port %d", socket_port); PW_CHECK_OK(server_socket.Listen(socket_port)); auto accept_result = server_socket.Accept(); From 415d7266a5235ed6ffa7553d1f8acd40d0c46ea5 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Wed, 30 Oct 2024 12:14:36 -0400 Subject: [PATCH 11/15] Fix typo in log type - application is not defined --- src/backends/log/public/pw_log_matter/log_matter.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backends/log/public/pw_log_matter/log_matter.h b/src/backends/log/public/pw_log_matter/log_matter.h index 38b492c1f6ff95..c956bcadb7aa68 100644 --- a/src/backends/log/public/pw_log_matter/log_matter.h +++ b/src/backends/log/public/pw_log_matter/log_matter.h @@ -49,4 +49,4 @@ constexpr chip::Logging::LogCategory PwLogLevelToChipLogCategory(int level) // // This is the main macro that functions not included above will use #define PW_HANDLE_LOG(level, module, flags, message, ...) \ - ChipInternalLogImpl(Application, PwLogLevelToChipLogCategory(level), message, __VA_ARGS__) + ChipInternalLogImpl(NotSpecified, PwLogLevelToChipLogCategory(level), message, __VA_ARGS__) From 5bded7863a8e03f7ef3164fef8f9049954a15f34 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Wed, 30 Oct 2024 12:48:50 -0400 Subject: [PATCH 12/15] Avoid infinite recursion on logging now that PW-logging is not used --- src/platform/Linux/Logging.cpp | 25 ------------------------- src/platform/NuttX/Logging.cpp | 25 ------------------------- 2 files changed, 50 deletions(-) diff --git a/src/platform/Linux/Logging.cpp b/src/platform/Linux/Logging.cpp index 25e132e1a12b76..5108b1724b5712 100644 --- a/src/platform/Linux/Logging.cpp +++ b/src/platform/Linux/Logging.cpp @@ -43,7 +43,6 @@ void LogV(const char * module, uint8_t category, const char * msg, va_list v) // indicate the error occurred during getting time. gettimeofday(&tv, nullptr); -#if !CHIP_USE_PW_LOGGING // Lock standard output, so a single log line will not be corrupted in case // where multiple threads are using logging subsystem at the same time. flockfile(stdout); @@ -55,30 +54,6 @@ void LogV(const char * module, uint8_t category, const char * msg, va_list v) fflush(stdout); funlockfile(stdout); -#else // !CHIP_USE_PW_LOGGING - char formattedMsg[CHIP_CONFIG_LOG_MESSAGE_MAX_SIZE]; - snprintf(formattedMsg, sizeof(formattedMsg), - "[%" PRIu64 ".%06" PRIu64 "][%lld:%lld] CHIP:%s: ", static_cast(tv.tv_sec), - static_cast(tv.tv_usec), static_cast(syscall(SYS_getpid)), - static_cast(syscall(SYS_gettid)), module); - size_t len = strnlen(formattedMsg, sizeof(formattedMsg)); - vsnprintf(formattedMsg + len, sizeof(formattedMsg) - len, msg, v); - - switch (static_cast(category)) - { - case kLogCategory_Error: - PW_LOG_ERROR("%s", formattedMsg); - break; - case kLogCategory_Progress: - PW_LOG_INFO("%s", formattedMsg); - break; - case kLogCategory_Detail: - case kLogCategory_None: - case kLogCategory_Automation: - PW_LOG_DEBUG("%s", formattedMsg); - break; - } -#endif // !CHIP_USE_PW_LOGGING // Let the application know that a log message has been emitted. DeviceLayer::OnLogOutput(); diff --git a/src/platform/NuttX/Logging.cpp b/src/platform/NuttX/Logging.cpp index ea95fdc4fbc7ef..d39782866c9750 100644 --- a/src/platform/NuttX/Logging.cpp +++ b/src/platform/NuttX/Logging.cpp @@ -43,7 +43,6 @@ void LogV(const char * module, uint8_t category, const char * msg, va_list v) // indicate the error occurred during getting time. gettimeofday(&tv, nullptr); -#if !CHIP_USE_PW_LOGGING // Lock standard output, so a single log line will not be corrupted in case // where multiple threads are using logging subsystem at the same time. flockfile(stdout); @@ -55,30 +54,6 @@ void LogV(const char * module, uint8_t category, const char * msg, va_list v) fflush(stdout); funlockfile(stdout); -#else // !CHIP_USE_PW_LOGGING - char formattedMsg[CHIP_CONFIG_LOG_MESSAGE_MAX_SIZE]; - snprintf(formattedMsg, sizeof(formattedMsg), - "[%" PRIu64 ".%06" PRIu64 "][%lld:%lld] CHIP:%s: ", static_cast(tv.tv_sec), - static_cast(tv.tv_usec), static_cast(syscall(SYS_getpid)), - static_cast(syscall(SYS_gettid)), module); - size_t len = strnlen(formattedMsg, sizeof(formattedMsg)); - vsnprintf(formattedMsg + len, sizeof(formattedMsg) - len, msg, v); - - switch (static_cast(category)) - { - case kLogCategory_Error: - PW_LOG_ERROR("%s", formattedMsg); - break; - case kLogCategory_Progress: - PW_LOG_INFO("%s", formattedMsg); - break; - case kLogCategory_Detail: - case kLogCategory_None: - case kLogCategory_Automation: - PW_LOG_DEBUG("%s", formattedMsg); - break; - } -#endif // !CHIP_USE_PW_LOGGING // Let the application know that a log message has been emitted. DeviceLayer::OnLogOutput(); From f4dcba1f9a665739e19c1067c2b2a353a0e818c1 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Wed, 30 Oct 2024 12:54:42 -0400 Subject: [PATCH 13/15] Remove echo_pb2 from the console as this is already imported by the pw_system.console it seems --- examples/common/pigweed/rpc_console/py/chip_rpc/console.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/examples/common/pigweed/rpc_console/py/chip_rpc/console.py b/examples/common/pigweed/rpc_console/py/chip_rpc/console.py index 50f0b030f51725..3e13e2f9bb80c7 100644 --- a/examples/common/pigweed/rpc_console/py/chip_rpc/console.py +++ b/examples/common/pigweed/rpc_console/py/chip_rpc/console.py @@ -52,7 +52,6 @@ from button_service import button_service_pb2 from descriptor_service import descriptor_service_pb2 from device_service import device_service_pb2 -from echo_service import echo_pb2 from fabric_admin_service import fabric_admin_service_pb2 from fabric_bridge_service import fabric_bridge_service_pb2 from lighting_service import lighting_service_pb2 @@ -137,7 +136,6 @@ def show_console(device: str, baudrate: int, button_service_pb2, descriptor_service_pb2, device_service_pb2, - echo_pb2, fabric_admin_service_pb2, fabric_bridge_service_pb2, lighting_service_pb2, From 2c57133764ce33909121d4edabb188c5f3d17091 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Wed, 30 Oct 2024 13:03:49 -0400 Subject: [PATCH 14/15] Make PWConsole work again --- .../pigweed/rpc_console/py/chip_rpc/console.py | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/examples/common/pigweed/rpc_console/py/chip_rpc/console.py b/examples/common/pigweed/rpc_console/py/chip_rpc/console.py index 3e13e2f9bb80c7..c56b41419dd480 100644 --- a/examples/common/pigweed/rpc_console/py/chip_rpc/console.py +++ b/examples/common/pigweed/rpc_console/py/chip_rpc/console.py @@ -71,13 +71,6 @@ def _parse_args(): type=int, default=115200, help='the baud rate to use') - parser.add_argument( - '-o', - '--output', - type=argparse.FileType('wb'), - default=sys.stdout.buffer, - help=('The file to which to write device output (HDLC channel 1); ' - 'provide - or omit for stdout.')) parser.add_argument( '-r', '--raw_serial', @@ -98,7 +91,7 @@ def _parse_args(): def show_console(device: str, baudrate: int, token_databases: Collection[Path], - socket_addr: str, output: Any, raw_serial: bool) -> int: + socket_addr: str, raw_serial: bool) -> int: # TODO: this shows a default console with little customization # Ideally we should at least customize the default messages @@ -113,7 +106,6 @@ def show_console(device: str, baudrate: int, device=device, baudrate=baudrate, socket_addr=socket_addr, - output=output, hdlc_encoding=not raw_serial, token_databases=token_databases, logfile="", @@ -121,14 +113,10 @@ def show_console(device: str, baudrate: int, channel_id=rpc.DEFAULT_CHANNEL_ID, # Defaults beyond the original console - proto_globs=[], ticks_per_second=None, host_logfile="", json_logfile="", rpc_logging=False, - # the pt-python based console seems to break on python 3.1 with - # "set_wakeup_fd only works in main thread of the main interpreter" - use_ipython=True, compiled_protos=[ actions_service_pb2, attributes_service_pb2, From 4935a35993c4d04f8ab044b4c64f56d1d26d3be8 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Wed, 30 Oct 2024 13:12:39 -0400 Subject: [PATCH 15/15] make linter happy --- examples/common/pigweed/rpc_console/py/chip_rpc/console.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/common/pigweed/rpc_console/py/chip_rpc/console.py b/examples/common/pigweed/rpc_console/py/chip_rpc/console.py index c56b41419dd480..31ecd9df03e0f0 100644 --- a/examples/common/pigweed/rpc_console/py/chip_rpc/console.py +++ b/examples/common/pigweed/rpc_console/py/chip_rpc/console.py @@ -39,7 +39,7 @@ import argparse import sys from pathlib import Path -from typing import Any, Collection +from typing import Collection import pw_system.console from pw_hdlc import rpc