diff --git a/CHANGELOG.md b/CHANGELOG.md index 234cc85ba..27900222c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,16 @@ # Changelog for esp_matter component registry +## [1.3.1](https://components.espressif.com/components/espressif/esp_matter/versions/1.3.1) + +#### Features + +- Work with IDF component management (version >= 2.0) without hash problem +- External platform path setting: support both absolute path or relative path to top-level CMakeLists +- More default compile options for the source files +- Could enable CONFIG_CHIP_OTA_IMAGE_BUILD to generate ota.bin file with IDF component management (version >= 2.0) +- esp-matter commit: 5a9bc09a640d5cfd4c6b137f7e3b13ce5fa9cca4 +- connectedhomeip commit: 735b69f73e386cb675242371afd0b237a8a78982 + ## [1.3.0](https://components.espressif.com/components/espressif/esp_matter/versions/1.3.0) #### Features diff --git a/CMakeLists.txt b/CMakeLists.txt index 761593255..0a9912522 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,6 @@ get_filename_component(MATTER_SDK_PATH ${CMAKE_CURRENT_SOURCE_DIR}/connectedhomeip/connectedhomeip/ REALPATH) get_filename_component(CHIP_ROOT ${CMAKE_CURRENT_LIST_DIR}/connectedhomeip/connectedhomeip/ REALPATH) -include(${CMAKE_CURRENT_LIST_DIR}/connectedhomeip/connectedhomeip/config/esp32/components/chip/ota-image.cmake) set(ESP_COMPONENTS_PATH ${CMAKE_CURRENT_SOURCE_DIR}/components) @@ -27,6 +26,7 @@ endfunction() set(SRC_DIRS_LIST "${MATTER_SDK_PATH}/src/access" "${MATTER_SDK_PATH}/src/access/examples" "${MATTER_SDK_PATH}/src/app" + "${MATTER_SDK_PATH}/src/app/data-model" "${MATTER_SDK_PATH}/src/app/MessageDef" "${MATTER_SDK_PATH}/src/app/reporting" "${MATTER_SDK_PATH}/src/app/server" @@ -54,6 +54,7 @@ set(SRC_DIRS_LIST "${MATTER_SDK_PATH}/src/access" "${MATTER_SDK_PATH}/src/protocols" "${MATTER_SDK_PATH}/src/protocols/bdx" "${MATTER_SDK_PATH}/src/protocols/echo" + "${MATTER_SDK_PATH}/src/protocols/interaction_model" "${MATTER_SDK_PATH}/src/protocols/secure_channel" "${MATTER_SDK_PATH}/src/protocols/user_directed_commissioning" "${MATTER_SDK_PATH}/src/setup_payload" @@ -111,6 +112,7 @@ set(EXCLUDE_SRCS_LIST "${MATTER_SDK_PATH}/src/controller/ExamplePersistentStorag "${MATTER_SDK_PATH}/src/lib/shell/commands/NFC.cpp" "${MATTER_SDK_PATH}/src/platform/DeviceSafeQueue.cpp" "${MATTER_SDK_PATH}/src/platform/SyscallStubs.cpp" + "${MATTER_SDK_PATH}/src/platform/OpenThread/DnssdImpl.cpp" "${MATTER_SDK_PATH}/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread_LwIP.cpp" "${MATTER_SDK_PATH}/src/system/SystemLayerImplSelect.cpp" "${MATTER_SDK_PATH}/src/transport/TraceMessage.cpp") @@ -254,8 +256,7 @@ if((NOT CONFIG_ENABLE_WIFI_STATION) AND (NOT CONFIG_ENABLE_WIFI_AP)) endif() if (NOT CONFIG_ENABLE_MATTER_OVER_THREAD) - list(APPEND EXCLUDE_SRCS_LIST "${MATTER_SDK_PATH}/src/platform/OpenThread/DnssdImpl.cpp" - "${MATTER_SDK_PATH}/src/platform/OpenThread/GenericNetworkCommissioningThreadDriver.cpp" + list(APPEND EXCLUDE_SRCS_LIST "${MATTER_SDK_PATH}/src/platform/OpenThread/GenericNetworkCommissioningThreadDriver.cpp" "${MATTER_SDK_PATH}/src/platform/OpenThread/OpenThreadUtils.cpp" "${MATTER_SDK_PATH}/src/platform/OpenThread/OpenThreadDnssdImpl.cpp") endif() @@ -272,7 +273,7 @@ else() set(CHIP_PROJECT_CONFIG "") endif() -if (CONFIG_ENABLE_ESP_INSIGHTS_TRACE) +if (CONFIG_ENABLE_ESP_INSIGHTS_TRACE AND (NOT "${IDF_TARGET}" STREQUAL "esp32h2")) list(APPEND SRC_DIRS_LIST "${MATTER_SDK_PATH}/src/tracing/esp32_trace") list(APPEND INCLUDE_DIRS_LIST "${MATTER_SDK_PATH}/src/tracing/esp32_trace/include" "${MATTER_SDK_PATH}/src/tracing/esp32_trace") @@ -288,8 +289,14 @@ endif() if (CONFIG_CHIP_ENABLE_EXTERNAL_PLATFORM) # check the source file dir if external platform is enable - if ((EXISTS ${CONFIG_CHIP_EXTERNAL_PLATFORM_DIR}/external_platform.cmake)) - include(${CONFIG_CHIP_EXTERNAL_PLATFORM_DIR}/external_platform.cmake) + if (IS_ABSOLUTE ${CONFIG_CHIP_EXTERNAL_PLATFORM_DIR}) + get_filename_component(EXTERNAL_PLATFORM_DIR ${CONFIG_CHIP_EXTERNAL_PLATFORM_DIR} REALPATH) + else() + get_filename_component(EXTERNAL_PLATFORM_DIR ${CMAKE_SOURCE_DIR}/${CONFIG_CHIP_EXTERNAL_PLATFORM_DIR} REALPATH) + endif() + message("EXTERNAL_PLATFORM_DIR: ${EXTERNAL_PLATFORM_DIR}") + if ((EXISTS ${EXTERNAL_PLATFORM_DIR}/external_platform.cmake)) + include(${EXTERNAL_PLATFORM_DIR}/external_platform.cmake) list(APPEND SRC_DIRS_LIST ${EXPLANT_SRC_DIRS_LIST}) list(APPEND INCLUDE_DIRS_LIST ${EXPLANT_INCLUDE_DIRS_LIST}) list(APPEND EXCLUDE_SRCS_LIST ${EXPLANT_EXCLUDE_SRCS_LIST}) @@ -328,17 +335,15 @@ else() if ((CONFIG_BT_ENABLED) AND (CONFIG_ENABLE_CHIPOBLE)) if (CONFIG_BT_NIMBLE_ENABLED) list(APPEND SRC_DIRS_LIST "${MATTER_SDK_PATH}/src/platform/ESP32/nimble") - list(APPEND EXCLUDE_SRCS_LIST "${MATTER_SDK_PATH}/src/platform/ESP32/bluedroid/BLEManagerImpl.cpp") - if(NOT CONFIG_ENABLE_ESP32_BLE_CONTROLLER) - list(APPEND EXCLUDE_SRCS_LIST "${MATTER_SDK_PATH}/src/platform/ESP32/bluedroid/ChipDeviceScanner.cpp") + if (NOT CONFIG_ENABLE_ESP32_BLE_CONTROLLER) + list(APPEND EXCLUDE_SRCS_LIST "${MATTER_SDK_PATH}/src/platform/ESP32/nimble/ChipDeviceScanner.cpp" + "${MATTER_SDK_PATH}/src/platform/ESP32/nimble/misc.c" + "${MATTER_SDK_PATH}/src/platform/ESP32/nimble/peer.c") endif() else() list(APPEND SRC_DIRS_LIST "${MATTER_SDK_PATH}/src/platform/ESP32/bluedroid") - list(APPEND EXCLUDE_SRCS_LIST "${MATTER_SDK_PATH}/src/platform/ESP32/nimble/BLEManagerImpl.cpp") - if(NOT CONFIG_ENABLE_ESP32_BLE_CONTROLLER) - list(APPEND EXCLUDE_SRCS_LIST "${MATTER_SDK_PATH}/src/platform/ESP32/nimble/ChipDeviceScanner.cpp" - "${MATTER_SDK_PATH}/src/platform/ESP32/nimble/misc.c" - "${MATTER_SDK_PATH}/src/platform/ESP32/nimble/peer.c") + if (NOT CONFIG_ENABLE_ESP32_BLE_CONTROLLER) + list(APPEND EXCLUDE_SRCS_LIST "${MATTER_SDK_PATH}/src/platform/ESP32/bluedroid/ChipDeviceScanner.cpp") endif() endif() endif() @@ -362,7 +367,8 @@ else() endif() if (NOT CONFIG_ENABLE_ESP32_DEVICE_INFO_PROVIDER) - list(APPEND EXCLUDE_SRCS_LIST "${MATTER_SDK_PATH}/src/platform/ESP32/ESP32DeviceInfoProvider.cpp") + list(APPEND EXCLUDE_SRCS_LIST "${MATTER_SDK_PATH}/src/platform/ESP32/ESP32DeviceInfoProvider.cpp" + "${MATTER_SDK_PATH}/src/platform/ESP32/StaticESP32DeviceInfoProvider.cpp") endif() if (NOT CONFIG_SEC_CERT_DAC_PROVIDER) @@ -394,7 +400,8 @@ idf_component_register(SRC_DIRS ${SRC_DIRS_LIST} target_compile_options(${COMPONENT_LIB} PUBLIC "-DCHIP_ADDRESS_RESOLVE_IMPL_INCLUDE_HEADER=" - "-DCHIP_CONFIG_SOFTWARE_VERSION_NUMBER=${chip_config_software_version_number}") + "-DCHIP_CONFIG_SOFTWARE_VERSION_NUMBER=${chip_config_software_version_number}" + "-DNDEBUG") if (CHIP_PROJECT_CONFIG) target_compile_options(${COMPONENT_LIB} PUBLIC @@ -402,9 +409,25 @@ if (CHIP_PROJECT_CONFIG) "-DSYSTEM_PROJECT_CONFIG_INCLUDE=${CHIP_PROJECT_CONFIG}") endif() -idf_build_set_property(COMPILE_OPTIONS "-Wno-error=uninitialized;-Wno-error=maybe-uninitialized;-Wno-format-nonliteral;-Wno-missing-field-initializers;" APPEND) -idf_build_set_property(COMPILE_OPTIONS "-Wno-error=array-bounds" APPEND) -idf_build_set_property(COMPILE_OPTIONS "-Wno-write-strings" APPEND) +# compile options from connectedhomeip/build/config/compiler except -Wconversion, -Wshadow, and -Wno-unknown-warning-option +target_compile_options(${COMPONENT_LIB} PRIVATE "-g2;-fno-common;-fno-unwind-tables;-fno-asynchronous-unwind-tables") +target_compile_options(${COMPONENT_LIB} PRIVATE "-Wstack-usage=8192;-Wunreachable-code;-Wvla") +target_compile_options(${COMPONENT_LIB} PRIVATE "-Wformat;-Wformat-nonliteral;-Wformat-security") +target_compile_options(${COMPONENT_LIB} PRIVATE "-Wno-deprecated-declarations;-Wno-unused") +target_compile_options(${COMPONENT_LIB} PRIVATE "-Wno-cast-function-type;-Wno-psabi;-Wno-maybe-uninitialized;-fno-strict-aliasing") +target_compile_options(${COMPONENT_LIB} PRIVATE $<$:-Wnon-virtual-dtor>) + +# link options from connectedhomeip/build/config/compiler +target_link_options(${COMPONENT_LIB} PRIVATE -Wl,-O2 -Wl,--gc-sections -Os -Werror -Wl,--fatal-warnings -fdiagnostics-color) + +# compile options from esp-matter/components/ +target_compile_options(${COMPONENT_LIB} PRIVATE "-Wno-error=uninitialized;-Wno-error=maybe-uninitialized;-Wno-missing-field-initializers") +target_compile_options(${COMPONENT_LIB} PRIVATE "-Wno-error=array-bounds;-Wno-write-strings") + +# TODO: remove this when building connectedhomeip/src/controller/CHIPDeviceController.cpp with no format error +if (CONFIG_ENABLE_CHIP_CONTROLLER_BUILD) + target_compile_options(${COMPONENT_LIB} PRIVATE "-Wno-error=format") +endif() # For Xtensa chips, uint32_t was defined as 'unsigned' before v5.0, and after IDF v5.0 it is defined # as 'unsigned long', same as RISC-V. add this compile option to avoid format errors. @@ -422,9 +445,13 @@ if (CONFIG_USE_MINIMAL_MDNS) target_compile_options(${COMPONENT_LIB} PUBLIC "-DCHIP_MINMDNS_DEFAULT_POLICY=1" "-DCHIP_MINMDNS_USE_EPHEMERAL_UNICAST_PORT=0" "-DCHIP_MINMDNS_HIGH_VERBOSITY=0" - "-DCHIP_DNSSD_DEFAULT_MINIMAL=1") + "-DCHIP_DNSSD_DEFAULT_MINIMAL=true" + "-DCHIP_DNSSD_DEFAULT_NONE=false" + "-DCHIP_DNSSD_DEFAULT_PLATFORM=false") else() - target_compile_options(${COMPONENT_LIB} PUBLIC "-DCHIP_DNSSD_DEFAULT_PLATFORM=1") + target_compile_options(${COMPONENT_LIB} PUBLIC "-DCHIP_DNSSD_DEFAULT_PLATFORM=true" + "-DCHIP_DNSSD_DEFAULT_NONE=false" + "-DCHIP_DNSSD_DEFAULT_MINIMAL=false") endif() if (NOT CMAKE_BUILD_EARLY_EXPANSION) @@ -455,9 +482,12 @@ target_link_libraries(${COMPONENT_LIB} INTERFACE -Wl,--start-group ${chip_libraries} -Wl,--end-group) -# TODO: Build OTA image need a python package, leading a file change and distorying the hash of managed_components. +cmake_policy(GET CMP0007 policy_status) +# Set new CMP0007 policy to prevent cmake warning +cmake_policy(SET CMP0007 NEW) +include(${CMAKE_CURRENT_LIST_DIR}/connectedhomeip/connectedhomeip/config/esp32/components/chip/ota-image.cmake) # Build Matter OTA image -if (false AND CONFIG_CHIP_OTA_IMAGE_BUILD) +if (CONFIG_CHIP_OTA_IMAGE_BUILD) chip_ota_image(chip-ota-image INPUT_FILES ${BUILD_DIR}/${CMAKE_PROJECT_NAME}.bin OUTPUT_FILE ${BUILD_DIR}/${CMAKE_PROJECT_NAME}-ota.bin @@ -465,3 +495,4 @@ if (false AND CONFIG_CHIP_OTA_IMAGE_BUILD) # Adding dependecy as app target so that this runs after images are ready add_dependencies(chip-ota-image app) endif() +cmake_policy(SET CMP0007 ${policy_status}) diff --git a/docs/en/developing.rst b/docs/en/developing.rst index fd4796a14..d84cab41d 100644 --- a/docs/en/developing.rst +++ b/docs/en/developing.rst @@ -204,8 +204,9 @@ An example with esp_matter component is offered: .. note:: - To use this component, the version of IDF component management should be 1.4.*. - Use ``compote version`` to show the version. Use ``pip install 'idf-component-manager~=1.4.0'`` to install. + To use this component, the version of IDF component management should be ``1.4.*`` or ``>= 2.0``. + Use ``compote version`` to show the version. Use ``pip install 'idf-component-manager~=1.4.0'`` + or ``pip install 'idf-component-manager~=2.0.0'`` to install. 2.2.3 Building Applications ~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/examples/common/blemesh_platform/platform/ESP32_custom/external_platform.cmake b/examples/common/blemesh_platform/platform/ESP32_custom/external_platform.cmake index 65300d13a..a1317d24a 100644 --- a/examples/common/blemesh_platform/platform/ESP32_custom/external_platform.cmake +++ b/examples/common/blemesh_platform/platform/ESP32_custom/external_platform.cmake @@ -53,8 +53,8 @@ if (NOT CONFIG_ENABLE_ETHERNET_TELEMETRY) "${CMAKE_CURRENT_LIST_DIR}/NetworkCommissioningDriver_Ethernet.cpp") endif() -if (NOT CONFIG_ENABLE_MATTER_OVER_THREAD) - list(APPEND EXPLANT_EXCLUDE_SRCS_LIST "${CMAKE_CURRENT_LIST_DIR}/OpenthreadLauncher.c" +if ((NOT CONFIG_OPENTHREAD_ENABLED) OR (NOT CONFIG_ENABLE_MATTER_OVER_THREAD)) + list(APPEND EXPLANT_EXCLUDE_SRCS_LIST "${CMAKE_CURRENT_LIST_DIR}/OpenthreadLauncher.cpp" "${CMAKE_CURRENT_LIST_DIR}/ThreadStackManagerImpl.cpp") endif() @@ -78,3 +78,9 @@ endif() if (NOT CONFIG_USE_ESP32_ECDSA_PERIPHERAL) list(APPEND EXPLANT_EXCLUDE_SRCS_LIST "${CMAKE_CURRENT_LIST_DIR}/ESP32CHIPCryptoPAL.cpp") endif() + +if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/generate-include-files.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/generate-include-files.cmake) +else() + message(FATAL_ERROR "There should be a generate-include-files.cmake file in CONFIG_CHIP_EXTERNAL_PLATFORM_DIR!") +endif() diff --git a/examples/common/blemesh_platform/platform/ESP32_custom/generate-include-files.cmake b/examples/common/blemesh_platform/platform/ESP32_custom/generate-include-files.cmake new file mode 100644 index 000000000..26f6303c0 --- /dev/null +++ b/examples/common/blemesh_platform/platform/ESP32_custom/generate-include-files.cmake @@ -0,0 +1,84 @@ +if (CONFIG_CHIP_ENABLE_EXTERNAL_PLATFORM) +# Generating platform/CHIPDeviceBuildConfig.h +file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/platform/CHIPDeviceBuildConfig.h +"#pragma once\n +#include \n + +#if defined(CONFIG_ENABLE_WIFI_STATION) || defined(CONFIG_ENABLE_WIFI_AP) +#define CHIP_DEVICE_CONFIG_ENABLE_WPA 1 +#else +#define CHIP_DEVICE_CONFIG_ENABLE_WPA 0 +#endif + +#ifdef CONFIG_ENABLE_MATTER_OVER_THREAD +#define CHIP_ENABLE_OPENTHREAD 1 +#else +#define CHIP_ENABLE_OPENTHREAD 0 +#endif + +#ifdef CONFIG_OPENTHREAD_FTD +#define CHIP_DEVICE_CONFIG_THREAD_FTD 1 +#else +#define CHIP_DEVICE_CONFIG_THREAD_FTD 0 +#endif + +#ifdef CONFIG_OPENTHREAD_BORDER_ROUTER +#define CHIP_DEVICE_CONFIG_THREAD_BORDER_ROUTER 1 +#else +#define CHIP_DEVICE_CONFIG_THREAD_BORDER_ROUTER 0 +#endif + +#define CHIP_DEVICE_CONFIG_USES_OTBR_POSIX_DBUS_STACK 0 +#define CHIP_STACK_LOCK_TRACKING_ENABLED 1 +#define CHIP_STACK_LOCK_TRACKING_ERROR_FATAL 1 + +#ifdef CONFIG_ENABLE_ROTATING_DEVICE_ID +#define CHIP_ENABLE_ADDITIONAL_DATA_ADVERTISING 1 +#else +#define CHIP_ENABLE_ADDITIONAL_DATA_ADVERTISING 0 +#endif + +#define CHIP_DEVICE_CONFIG_RUN_AS_ROOT 1 +#define CHIP_DISABLE_PLATFORM_KVS 0 + +#ifdef CONFIG_ENABLE_OTA_REQUESTOR +#define CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR 1 +#else +#define CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR 0 +#endif + +#ifdef CONFIG_ENABLE_ESP32_FACTORY_DATA_PROVIDER +#define CHIP_USE_TRANSITIONAL_COMMISSIONABLE_DATA_PROVIDER 0 +#else +#define CHIP_USE_TRANSITIONAL_COMMISSIONABLE_DATA_PROVIDER 1 +#endif + +#define CHIP_USE_TRANSITIONAL_DEVICE_INSTANCE_INFO_PROVIDER 1 +#define CHIP_DEVICE_LAYER_TARGET_ESP32 1 + + +#define CHIP_DEVICE_CONFIG_MAX_DISCOVERED_IP_ADDRESSES 5 +#define CHIP_DEVICE_CONFIG_ENABLE_DYNAMIC_MRP_CONFIG 0 + +#define CHIP_DEVICE_CONFIG_ENABLE_WIFIPAF 0 + +#if defined(CONFIG_ENABLE_MATTER_OVER_THREAD) && defined(CONFIG_THREAD_NETWORK_COMMISSIONING_DRIVER) +#define CHIP_DEVICE_CONFIG_THREAD_NETWORK_ENDPOINT_ID CONFIG_THREAD_NETWORK_ENDPOINT_ID +#endif + +// For definitions for external platform +#define CHIP_DEVICE_LAYER_TARGET ESP32_custom +#define BLE_PLATFORM_CONFIG_INCLUDE +#define CHIP_DEVICE_PLATFORM_CONFIG_INCLUDE +#define CHIP_PLATFORM_CONFIG_INCLUDE +#define INET_CONFIG_INCLUDE +#define SYSTEM_PLATFORM_CONFIG_INCLUDE +#define EXTERNAL_CONFIGURATIONMANAGERIMPL_HEADER +#define EXTERNAL_CHIPDEVICEPLATFORMEVENT_HEADER +#define EXTERNAL_CONNECTIVITYMANAGERIMPL_HEADER +#define EXTERNAL_BLEMANAGERIMPL_HEADER +#define EXTERNAL_KEYVALUESTOREMANAGERIMPL_HEADER +#define EXTERNAL_PLATFORMMANAGERIMPL_HEADER +#define EXTERNAL_THREADSTACKMANAGERIMPL_HEADER +") +endif() diff --git a/generate-include-files.cmake b/generate-include-files.cmake index 20dd53f5b..f1712d1c3 100644 --- a/generate-include-files.cmake +++ b/generate-include-files.cmake @@ -355,11 +355,11 @@ file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/core/CHIPBuildConfig.h #define CHIP_CONFIG_TEST 0 #endif -#define CHIP_ERROR_LOGGING (CONFIG_LOG_DEFAULT_LEVEL >= 1) -#define CHIP_PROGRESS_LOGGING (CONFIG_LOG_DEFAULT_LEVEL >= 3) -#define CHIP_DETAIL_LOGGING (CONFIG_LOG_DEFAULT_LEVEL >= 4) +#define CHIP_ERROR_LOGGING (CONFIG_CHIP_LOG_DEFAULT_LEVEL >= 1) +#define CHIP_PROGRESS_LOGGING (CONFIG_CHIP_LOG_DEFAULT_LEVEL >= 3) +#define CHIP_DETAIL_LOGGING (CONFIG_CHIP_LOG_DEFAULT_LEVEL >= 4) #define CHIP_CONFIG_LOG_MESSAGE_MAX_SIZE 256 -#define CHIP_AUTOMATION_LOGGING (CONFIG_LOG_DEFAULT_LEVEL >= 5) +#define CHIP_AUTOMATION_LOGGING (CONFIG_CHIP_LOG_DEFAULT_LEVEL >= 5) #define CHIP_PW_TOKENIZER_LOGGING 0 #define CHIP_USE_PW_LOGGING 0 #define CHIP_CONFIG_SHORT_ERROR_STR 1 @@ -432,14 +432,15 @@ file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/lwip/lwip_buildconfig.h file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/matter/tracing/build_config.h "#pragma once\n #include \n -#ifdef CONFIG_ENABLE_ESP_INSIGHTS_TRACE +#if defined(CONFIG_ENABLE_ESP_INSIGHTS_TRACE) && !defined(CONFIG_IDF_TARGET_ESP32H2) #define MATTER_TRACING_ENABLED 1 #else #define MATTER_TRACING_ENABLED 0 #endif ") -# Generating platform/CHIPDeviceBuildConfig.h +if (NOT CONFIG_CHIP_ENABLE_EXTERNAL_PLATFORM) +# Generating platform/CHIPDeviceBuildConfig.h when external platform is not enabled. file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/platform/CHIPDeviceBuildConfig.h "#pragma once\n #include \n @@ -491,13 +492,7 @@ file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/platform/CHIPDeviceBuildConfig.h #define CHIP_USE_TRANSITIONAL_DEVICE_INSTANCE_INFO_PROVIDER 1 #define CHIP_DEVICE_LAYER_TARGET_ESP32 1 -#ifdef CONFIG_CHIP_ENABLE_EXTERNAL_PLATFORM -#define CHIP_DEVICE_PLATFORM_CONFIG_INCLUDE -#define BLE_PLATFORM_CONFIG_INCLUDE -#define CHIP_PLATFORM_CONFIG_INCLUDE -#define SYSTEM_PLATFORM_CONFIG_INCLUDE -#define CHIP_DEVICE_LAYER_TARGET ESP32_custom -#else +#ifndef CONFIG_CHIP_ENABLE_EXTERNAL_PLATFORM #define CHIP_DEVICE_PLATFORM_CONFIG_INCLUDE #define CHIP_DEVICE_LAYER_TARGET ESP32 #endif @@ -505,6 +500,7 @@ file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/platform/CHIPDeviceBuildConfig.h #define CHIP_DEVICE_CONFIG_MAX_DISCOVERED_IP_ADDRESSES 5 #define CHIP_DEVICE_CONFIG_ENABLE_DYNAMIC_MRP_CONFIG 0 ") +endif() # Generating setup_payload/CHIPAdditionalDataPayloadBuildConfig.h file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/setup_payload/CHIPAdditionalDataPayloadBuildConfig.h @@ -557,6 +553,7 @@ file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/system/SystemBuildConfig.h #ifndef CONFIG_CHIP_ENABLE_EXTERNAL_PLATFORM #define CHIP_PLATFORM_CONFIG_INCLUDE #define SYSTEM_PLATFORM_CONFIG_INCLUDE +// SYSTEM_PROJECT_CONFIG_INCLUDE and CHIP_PROJECT_CONFIG_INCLUDE are defined in CMakeLists.txt #endif #define CHIP_SYSTEM_LAYER_IMPL_CONFIG_FILE @@ -735,3 +732,28 @@ file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/CHIPVersion.h */ #define CHIP_VERSION_CODE CHIP_VERSION_CODE_ENCODE(CHIP_VERSION_MAJOR, CHIP_VERSION_MINOR, CHIP_VERSION_PATCH) ") + +# Automatically added defines for script +#define CHIP_CONFIG_SKIP_APP_SPECIFIC_GENERATED_HEADER_INCLUDES 1 +#define CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT 1 +#define BLE_PROJECT_CONFIG_INCLUDE 1 +#define INET_PROJECT_CONFIG_INCLUDE 1 +#define LWIP_DEBUG 1 +#define CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE 1 +#define CHIP_DEVICE_CONFIG_ENABLE_NFC 1 +#define CONFIG_CHIP_NFC_COMMISSIONING 1 +#define CHIP_DEVICE_PROJECT_CONFIG_INCLUDE 1 +#define CHIP_DEVICE_CONFIG_FIRWMARE_BUILD_DATE 1 +#define CHIP_DEVICE_CONFIG_ENABLE_WIFI 1 +#define CHIP_DEVICE_LAYER_TARGET_NXP_ZEPHYR 1 +#define CHIP_DEVICE_ENABLE_DATA_MODEL 1 +#define CHIP_DEVICE_LAYER_TARGET_${possible_device_layer_target_define} 1 +#define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION 1 +#define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING 1 +#define CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID 1 +#define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID 1 +#define CHIP_DEVICE_LAYER_NONE 1 +#define EXTERNAL_KEYVALUESTOREMANAGERIMPL_HEADER 1 +#define CHIP_PROJECT_CONFIG_INCLUDE 1 +#define SYSTEM_PROJECT_CONFIG_INCLUDE 1 +#define SYSTEM_ENABLE_CLANG_THREAD_SAFETY_ANALYSIS 1 diff --git a/idf_component.yml b/idf_component.yml index 55d555eca..1cc86476a 100644 --- a/idf_component.yml +++ b/idf_component.yml @@ -1,5 +1,5 @@ ## IDF Component Manager Manifest File -version: 1.3.0 +version: 1.3.1 description: Espressif's Matter SDK Component url: https://github.com/espressif/esp-matter files: @@ -32,6 +32,7 @@ files: - "./connectedhomeip/connectedhomeip/src/ble/*.*" - "./connectedhomeip/connectedhomeip/src/controller/*.*" - "./connectedhomeip/connectedhomeip/src/controller/python/chip/tlv/tlvlist.py" + - "./connectedhomeip/connectedhomeip/src/controller/python/chip/tlv/__init__.py" - "./connectedhomeip/connectedhomeip/src/credentials/*.*" - "./connectedhomeip/connectedhomeip/src/credentials/attestation_verifier/**/*" - "./connectedhomeip/connectedhomeip/src/credentials/examples/**/*" @@ -84,7 +85,7 @@ dependencies: - if: "idf_version >=4.4" espressif/esp_insights: - version: "1.0.1" + version: "1.2.2" require: public # There is an issue with IDF-Component-Manager when ESP Insights is included. # Issue: https://github.com/project-chip/connectedhomeip/issues/29125 @@ -94,3 +95,8 @@ dependencies: espressif/json_parser: "~1.0.0" espressif/json_generator: "~1.1.0" + + espressif/esp_rcp_update: + version: "~1.2.0" + rules: + - if: "idf_version >=5.0"