From ba12515589b74863c5cc24d55d7f4b97defd8073 Mon Sep 17 00:00:00 2001 From: Mathieu Kardous Date: Tue, 19 Mar 2024 13:32:04 +0800 Subject: [PATCH] fix esp all-clusters-minimal build proble --- .../esp32/main/Kconfig.projbuild | 4 ++ .../esp32/main/include/CHIPProjectConfig.h | 38 +++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 examples/all-clusters-minimal-app/esp32/main/include/CHIPProjectConfig.h diff --git a/examples/all-clusters-minimal-app/esp32/main/Kconfig.projbuild b/examples/all-clusters-minimal-app/esp32/main/Kconfig.projbuild index 171af4f0ba2c24..9fe8f460e6b0a4 100644 --- a/examples/all-clusters-minimal-app/esp32/main/Kconfig.projbuild +++ b/examples/all-clusters-minimal-app/esp32/main/Kconfig.projbuild @@ -48,6 +48,10 @@ menu "Demo" depends on IDF_TARGET_ESP32C2 endchoice + config CHIP_PROJECT_CONFIG + string "CHIP Project Configuration file" + default "main/include/CHIPProjectConfig.h" + choice prompt "Rendezvous Mode" default RENDEZVOUS_MODE_BLE if BT_ENABLED diff --git a/examples/all-clusters-minimal-app/esp32/main/include/CHIPProjectConfig.h b/examples/all-clusters-minimal-app/esp32/main/include/CHIPProjectConfig.h new file mode 100644 index 00000000000000..9fff1bd10e67b4 --- /dev/null +++ b/examples/all-clusters-minimal-app/esp32/main/include/CHIPProjectConfig.h @@ -0,0 +1,38 @@ +/* + * + * Copyright (c) 2023 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. + */ + +/** + * @file + * Example project configuration file for CHIP. + * + * This is a place to put application or project-specific overrides + * to the default configuration values for general CHIP features. + * + */ + +#pragma once + +/** + * @def CONFIG_BUILD_FOR_HOST_UNIT_TEST + * + * @brief Defines whether we're currently building for unit testing, which enables a set of features + * that are only utilized in those tests. This flag should not be enabled on devices. If you have a test + * that uses this flag, either appropriately conditionalize the entire test on this flag, or to exclude + * the compliation of that test source file entirely. + */ +#define CONFIG_BUILD_FOR_HOST_UNIT_TEST 1