Skip to content

Commit

Permalink
[esp32] support CHIP project config (#19015)
Browse files Browse the repository at this point in the history
* [esp32] support CHIP project config

* Fix test_driver build for ESP32
  • Loading branch information
agners authored and pull[bot] committed Nov 13, 2023
1 parent 892edfa commit 4406601
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
18 changes: 18 additions & 0 deletions config/esp32/components/chip/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
4 changes: 2 additions & 2 deletions src/test_driver/esp32/main/Kconfig.projbuild
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@ menu "Crypto Tests"

config CHIP_PROJECT_CONFIG
string "CHIP Project Configuration file"
default "$(PROJECT_PATH)/main/include/CHIPProjectConfig.h"
endmenu
default "main/include/CHIPProjectConfig.h"
endmenu

0 comments on commit 4406601

Please sign in to comment.