From 44066018aa955870e7bcf63a191812c6e1fbcbd8 Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Fri, 3 Jun 2022 19:44:11 +0200 Subject: [PATCH] [esp32] support CHIP project config (#19015) * [esp32] support CHIP project config * Fix test_driver build for ESP32 --- config/esp32/components/chip/CMakeLists.txt | 18 ++++++++++++++++++ src/test_driver/esp32/main/Kconfig.projbuild | 4 ++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/config/esp32/components/chip/CMakeLists.txt b/config/esp32/components/chip/CMakeLists.txt index 6e7527905b092d..4f8c60e4af25d4 100644 --- a/config/esp32/components/chip/CMakeLists.txt +++ b/config/esp32/components/chip/CMakeLists.txt @@ -137,6 +137,24 @@ if (CONFIG_CHIP_ENABLE_EXTERNAL_PLATFORM) chip_gn_arg_append("chip_platform_target" "\"//${CONFIG_CHIP_EXTERNAL_PLATFORM_DIR}\"") endif() +# Set up CHIP project configuration file + +if (CONFIG_CHIP_PROJECT_CONFIG) + get_filename_component(CHIP_PROJECT_CONFIG + ${CONFIG_CHIP_PROJECT_CONFIG} + REALPATH + BASE_DIR ${CMAKE_SOURCE_DIR} + ) + set(CHIP_PROJECT_CONFIG "<${CHIP_PROJECT_CONFIG}>") +else() + set(CHIP_PROJECT_CONFIG "") +endif() + +if (CHIP_PROJECT_CONFIG) + chip_gn_arg_append("chip_project_config_include" "\"${CHIP_PROJECT_CONFIG}\"") + chip_gn_arg_append("chip_system_project_config_include" "\"${CHIP_PROJECT_CONFIG}\"") +endif() + if (CONFIG_ENABLE_ESP32_FACTORY_DATA_PROVIDER) chip_gn_arg_append("chip_use_transitional_commissionable_data_provider" "false") endif() diff --git a/src/test_driver/esp32/main/Kconfig.projbuild b/src/test_driver/esp32/main/Kconfig.projbuild index 9d7ffbefd84013..6518155d91b28e 100644 --- a/src/test_driver/esp32/main/Kconfig.projbuild +++ b/src/test_driver/esp32/main/Kconfig.projbuild @@ -37,5 +37,5 @@ menu "Crypto Tests" config CHIP_PROJECT_CONFIG string "CHIP Project Configuration file" - default "$(PROJECT_PATH)/main/include/CHIPProjectConfig.h" -endmenu \ No newline at end of file + default "main/include/CHIPProjectConfig.h" +endmenu