From ecfa1623b2a85873cadc4692cb6e97c8463fa0d5 Mon Sep 17 00:00:00 2001 From: Jiacheng Guo Date: Mon, 9 May 2022 21:33:54 +0800 Subject: [PATCH] platform: add custom include path config for external platform --- connectedhomeip/connectedhomeip | 2 +- docs/custom_platform_guide/README.md | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/connectedhomeip/connectedhomeip b/connectedhomeip/connectedhomeip index cfc35951b..dbb374f7e 160000 --- a/connectedhomeip/connectedhomeip +++ b/connectedhomeip/connectedhomeip @@ -1 +1 @@ -Subproject commit cfc35951be66a664a6efdadea56d1b8ea6e63e96 +Subproject commit dbb374f7e98985f252be76af0c21d592440067be diff --git a/docs/custom_platform_guide/README.md b/docs/custom_platform_guide/README.md index 265caa8b8..44a24e3e1 100644 --- a/docs/custom_platform_guide/README.md +++ b/docs/custom_platform_guide/README.md @@ -10,23 +10,24 @@ Create a directory `platform/${NEW_PLATFORM_NAME}` in your codebase. You can typ We've provided an example BUILD.gn file for the `ESP32_custom` example platform. It simply compiles the ESP32 platform in Matter without any modifications. -The new platform directory must be added to the Matter include path. See the `ESP32_custion_include` config in the [BUILD.gn](./BUILD.gn). +The new platform directory must be added to the Matter include path. See the `ESP32_custom_include` config in the [BUILD.gn](./BUILD.gn). Multiple build configs must be exported to the build system. See the `buildconfig_header` section in the [BUILD.gn](./BUILD.gn) for the required definitions. ## Required Kconfigs The config `CONFIG_CHIP_ENABLE_EXTERNAL_PLATFORM` shall be enabled. -The config `CONFIG_CHIP_EXTERNAL_PLATFORM_TARGET` shall be the relative path from `${ESP_MATTER_PATH}/connectedhomeip/connectedhomeip/config/esp32` to the external platform directory. For instance, if your source tree is: +The config `CONFIG_CHIP_EXTERNAL_PLATFORM_DIR` shall be the relative path from `${ESP_MATTER_PATH}/connectedhomeip/connectedhomeip/config/esp32` to the external platform directory. +For instance, if your source tree is: ``` -. +my_project ├── esp-matter └── platform └── ESP32_custom ``` -Then `CONFIG_CHIP_EXTERNAL_PLATFORM_TARGET` will be `//../../../../../platform/ESP32_custom` +Then `CONFIG_CHIP_EXTERNAL_PLATFORM_DIR` will be `../../../../../platform/ESP32_custom`. The config `CONFIG_BUILD_CHIP_TESTS` shall be disabled.