From cfec75b864b4f6b9b658f7cf6e6d9f9997184172 Mon Sep 17 00:00:00 2001 From: zwx Date: Tue, 14 Apr 2026 17:13:59 +0800 Subject: [PATCH] fix(openthread): fix build failure in spinel-only mode --- .../openthread-core-esp32x-spinel-config.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/components/openthread/private_include/openthread-core-esp32x-spinel-config.h b/components/openthread/private_include/openthread-core-esp32x-spinel-config.h index 7c3853ecb5..9e01fb818a 100644 --- a/components/openthread/private_include/openthread-core-esp32x-spinel-config.h +++ b/components/openthread/private_include/openthread-core-esp32x-spinel-config.h @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2021-2026 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -76,3 +76,15 @@ #ifndef OPENTHREAD_SPINEL_CONFIG_COPROCESSOR_RESET_FAILURE_CALLBACK_ENABLE #define OPENTHREAD_SPINEL_CONFIG_COPROCESSOR_RESET_FAILURE_CALLBACK_ENABLE 1 #endif + +/** + * @def OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_ENABLE + * + * In spinel-only mode no Instance object is compiled or instantiated, so the + * single-instance path (Instance::Get().GetLogLevel()) is unavailable. Enabling + * multiple-instance support forces the logging APIs to use the global log level + * (Instance::GetGlobalLogLevel()), which does not depend on an Instance object. + */ +#ifndef OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_ENABLE +#define OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_ENABLE 1 +#endif