From b2be128c969047a65091ad08829166127290423c Mon Sep 17 00:00:00 2001 From: WanqQixiang Date: Mon, 21 Aug 2023 18:54:22 +0800 Subject: [PATCH] Update IDF to v5.1.1 tag for ESP32-H2 and ESP32-C6 builds --- .gitlab-ci.yml | 8 ++++---- README.md | 2 +- RELEASE_NOTES.md | 4 ++++ docs/en/developing.rst | 2 +- examples/generic_switch/main/app_priv.h | 18 +++++++++--------- examples/generic_switch/partitions_thread.csv | 11 ----------- .../generic_switch/sdkconfig.defaults.esp32c6 | 2 +- .../generic_switch/sdkconfig.defaults.esp32h2 | 2 +- examples/light/main/app_priv.h | 18 +++++++++--------- examples/light/partitions_thread.csv | 11 ----------- examples/light/sdkconfig.defaults.esp32c6 | 2 +- examples/light/sdkconfig.defaults.esp32h2 | 2 +- examples/light_switch/main/app_priv.h | 18 +++++++++--------- examples/light_switch/partitions_thread.csv | 11 ----------- .../light_switch/sdkconfig.defaults.esp32c6 | 2 +- .../light_switch/sdkconfig.defaults.esp32h2 | 2 +- examples/refrigerator/main/app_main.cpp | 13 +++++++++++++ examples/refrigerator/main/app_priv.h | 17 +++++++++++++++++ examples/refrigerator/partitions_c6.csv | 9 --------- examples/refrigerator/partitions_thread.csv | 10 ---------- .../refrigerator/sdkconfig.defaults.esp32c6 | 2 +- .../refrigerator/sdkconfig.defaults.esp32h2 | 2 +- examples/room_air_conditioner/main/app_priv.h | 18 +++++++++--------- .../room_air_conditioner/partitions_thread.csv | 11 ----------- .../sdkconfig.defaults.esp32c6 | 2 +- .../sdkconfig.defaults.esp32h2 | 2 +- examples/zap_light/main/app_priv.h | 18 +++++++++--------- examples/zap_light/partitions_thread.csv | 11 ----------- examples/zap_light/sdkconfig.defaults.esp32h2 | 2 +- examples/zigbee_bridge/main/idf_component.yml | 4 ++-- 30 files changed, 98 insertions(+), 138 deletions(-) delete mode 100644 examples/generic_switch/partitions_thread.csv delete mode 100644 examples/light/partitions_thread.csv delete mode 100644 examples/light_switch/partitions_thread.csv delete mode 100644 examples/refrigerator/partitions_c6.csv delete mode 100644 examples/refrigerator/partitions_thread.csv delete mode 100644 examples/room_air_conditioner/partitions_thread.csv delete mode 100644 examples/zap_light/partitions_thread.csv diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 085031684..75db925f4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -71,7 +71,7 @@ variables: - cd ${CI_PROJECT_DIR} - git clone ${ESP_THREAD_BR_REPO_URL} - cd ${BR_PATH}/examples/basic_thread_border_router - - git checkout 25cfe641 + - git checkout f03f1ca - idf.py set-target esp32s3 - idf.py build @@ -164,7 +164,7 @@ build_esp_matter_examples_pytest_C6_idf_v5_1: when: always expire_in: 4 days variables: - IDF_VERSION: "ea5e0ff298e6257b31d8e0c81435e6d3937f04c7" + IDF_VERSION: "v5.1.1" script: - cd ${ESP_MATTER_PATH} - pip install -r tools/ci/requirements-build.txt @@ -197,7 +197,7 @@ build_esp_matter_examples_pytest_H2_idf_v5_1: when: always expire_in: 4 days variables: - IDF_VERSION: "ea5e0ff298e6257b31d8e0c81435e6d3937f04c7" + IDF_VERSION: "v5.1.1" script: - *setup_ot_rcp - *setup_ot_br @@ -221,7 +221,7 @@ build_esp_matter_examples_non_pytest_idf_v5_1: when: always expire_in: 4 days variables: - IDF_VERSION: "ea5e0ff298e6257b31d8e0c81435e6d3937f04c7" + IDF_VERSION: "v5.1.1" script: - *build_external_platform_example - cd ${ESP_MATTER_PATH} diff --git a/README.md b/README.md index 7535e229f..55a867440 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Espressif's SDK for Matter is the official Matter development framework for ESP3 - This SDK currently works with [5b4f800](https://github.com/project-chip/connectedhomeip/commit/5b4f8004662d00bdb111367fec7d3ea978c23372) of connectedhomeip. - For ESP32, ESP32-C3, and ESP32-S3, ESP-IDF [v5.0.1 release](https://github.com/espressif/esp-idf/releases/tag/v5.0.1) is required. -- For ESP32-C2, ESP32-H2(preview) and ESP32-C6(preview) and Zigbee Bridge example, ESP-IDF branch at [commit ea5e0ff](https://github.com/espressif/esp-idf/tree/ea5e0ff) in branch release/v5.1 should be used. +- For ESP32-C2, ESP32-H2 and ESP32-C6 and Zigbee Bridge example, ESP-IDF [v5.1.1 release](https://github.com/espressif/esp-idf/releases/tag/v5.1.1) is required. ## Documentation diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 0de309d90..07f9e595f 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,3 +1,7 @@ +# 29-August-2023 + +- `ot_storage` partition is no longere required for thread devices as the mechanism for storing data related to the Thread network has been changed in the `openthread` component in ESP-IDF. + # 14-April-2023 #### *Changed how attribute data is stored in NVS* diff --git a/docs/en/developing.rst b/docs/en/developing.rst index eabda9852..496e2cb2a 100644 --- a/docs/en/developing.rst +++ b/docs/en/developing.rst @@ -62,7 +62,7 @@ For using VSCode for development, please check `Developing in WSL #include #include +#if CHIP_DEVICE_CONFIG_ENABLE_THREAD +#include +#endif static const char *TAG = "app_main"; static uint16_t refrigerator_endpoint_id = 0; @@ -123,6 +126,16 @@ extern "C" void app_main() ESP_LOGE(TAG, "Failed to set parent %d", err); } +#if CHIP_DEVICE_CONFIG_ENABLE_THREAD + /* Set OpenThread platform config */ + esp_openthread_platform_config_t config = { + .radio_config = ESP_OPENTHREAD_DEFAULT_RADIO_CONFIG(), + .host_config = ESP_OPENTHREAD_DEFAULT_HOST_CONFIG(), + .port_config = ESP_OPENTHREAD_DEFAULT_PORT_CONFIG(), + }; + set_openthread_platform_config(&config); +#endif + /* Matter start */ err = esp_matter::start(app_event_cb); if (err != ESP_OK) { diff --git a/examples/refrigerator/main/app_priv.h b/examples/refrigerator/main/app_priv.h index 18e70d1c8..056e69bf1 100644 --- a/examples/refrigerator/main/app_priv.h +++ b/examples/refrigerator/main/app_priv.h @@ -21,3 +21,20 @@ typedef void *app_driver_handle_t; * @return NULL in case of failure. */ app_driver_handle_t app_driver_button_init(); + +#if CHIP_DEVICE_CONFIG_ENABLE_THREAD +#define ESP_OPENTHREAD_DEFAULT_RADIO_CONFIG() \ + { \ + .radio_mode = RADIO_MODE_NATIVE, \ + } + +#define ESP_OPENTHREAD_DEFAULT_HOST_CONFIG() \ + { \ + .host_connection_mode = HOST_CONNECTION_MODE_NONE, \ + } + +#define ESP_OPENTHREAD_DEFAULT_PORT_CONFIG() \ + { \ + .storage_partition_name = "nvs", .netif_queue_size = 10, .task_queue_size = 10, \ + } +#endif diff --git a/examples/refrigerator/partitions_c6.csv b/examples/refrigerator/partitions_c6.csv deleted file mode 100644 index 8056fc3cc..000000000 --- a/examples/refrigerator/partitions_c6.csv +++ /dev/null @@ -1,9 +0,0 @@ -# Name, Type, SubType, Offset, Size, Flags -# Note: Firmware partition offset needs to be 64K aligned, initial 36K (9 sectors) are reserved for bootloader and partition table -esp_secure_cert, 0x3F, ,0xd000, 0x2000, encrypted -nvs, data, nvs, 0x10000, 0x6000, -nvs_keys, data, nvs_keys, , 0x1000, encrypted -phy_init, data, phy, , 0x1000, -ota_0, app, ota_0, , 0x1C0000, -ota_1, app, ota_1, , 0x1C0000, -ot_storage,data, fat, , 0x6000, diff --git a/examples/refrigerator/partitions_thread.csv b/examples/refrigerator/partitions_thread.csv deleted file mode 100644 index af05f427a..000000000 --- a/examples/refrigerator/partitions_thread.csv +++ /dev/null @@ -1,10 +0,0 @@ -# Name, Type, SubType, Offset, Size, Flags -# Note: Firmware partition offset needs to be 64K aligned, initial 36K (9 sectors) are reserved for bootloader and partition table -esp_secure_cert, 0x3F, ,0xd000, 0x2000, encrypted -nvs, data, nvs, 0x10000, 0x6000, -nvs_keys, data, nvs_keys, , 0x1000, encrypted -phy_init, data, phy, , 0x1000, -ota_0, app, ota_0, , 0x1C0000, -ota_1, app, ota_1, , 0x1C0000, -# For Wi-Fi device, this partition can be deleted. -ot_storage,data, fat, , 0x6000, diff --git a/examples/refrigerator/sdkconfig.defaults.esp32c6 b/examples/refrigerator/sdkconfig.defaults.esp32c6 index 862c7c93a..b31792812 100644 --- a/examples/refrigerator/sdkconfig.defaults.esp32c6 +++ b/examples/refrigerator/sdkconfig.defaults.esp32c6 @@ -35,7 +35,7 @@ CONFIG_LWIP_IPV6_AUTOCONFIG=n # Use a custom partition table CONFIG_PARTITION_TABLE_CUSTOM=y -CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions_thread.csv" +CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv" # LwIP config for OpenThread CONFIG_LWIP_IPV6_NUM_ADDRESSES=8 diff --git a/examples/refrigerator/sdkconfig.defaults.esp32h2 b/examples/refrigerator/sdkconfig.defaults.esp32h2 index cd9116d92..fef128357 100644 --- a/examples/refrigerator/sdkconfig.defaults.esp32h2 +++ b/examples/refrigerator/sdkconfig.defaults.esp32h2 @@ -36,7 +36,7 @@ CONFIG_LWIP_IPV6_AUTOCONFIG=n # Use a custom partition table CONFIG_PARTITION_TABLE_CUSTOM=y -CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions_thread.csv" +CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv" # LwIP config for OpenThread CONFIG_LWIP_IPV6_NUM_ADDRESSES=8 diff --git a/examples/room_air_conditioner/main/app_priv.h b/examples/room_air_conditioner/main/app_priv.h index 09b4c4ffb..c5229d329 100644 --- a/examples/room_air_conditioner/main/app_priv.h +++ b/examples/room_air_conditioner/main/app_priv.h @@ -66,18 +66,18 @@ esp_err_t app_driver_attribute_update(app_driver_handle_t driver_handle, uint16_ esp_err_t app_driver_room_air_conditioner_set_defaults(uint16_t endpoint_id); #if CHIP_DEVICE_CONFIG_ENABLE_THREAD -#define ESP_OPENTHREAD_DEFAULT_RADIO_CONFIG() \ - { \ - .radio_mode = RADIO_MODE_NATIVE, \ +#define ESP_OPENTHREAD_DEFAULT_RADIO_CONFIG() \ + { \ + .radio_mode = RADIO_MODE_NATIVE, \ } -#define ESP_OPENTHREAD_DEFAULT_HOST_CONFIG() \ - { \ - .host_connection_mode = HOST_CONNECTION_MODE_NONE, \ +#define ESP_OPENTHREAD_DEFAULT_HOST_CONFIG() \ + { \ + .host_connection_mode = HOST_CONNECTION_MODE_NONE, \ } -#define ESP_OPENTHREAD_DEFAULT_PORT_CONFIG() \ - { \ - .storage_partition_name = "ot_storage", .netif_queue_size = 10, .task_queue_size = 10, \ +#define ESP_OPENTHREAD_DEFAULT_PORT_CONFIG() \ + { \ + .storage_partition_name = "nvs", .netif_queue_size = 10, .task_queue_size = 10, \ } #endif diff --git a/examples/room_air_conditioner/partitions_thread.csv b/examples/room_air_conditioner/partitions_thread.csv deleted file mode 100644 index e5f11bdd4..000000000 --- a/examples/room_air_conditioner/partitions_thread.csv +++ /dev/null @@ -1,11 +0,0 @@ -# Name, Type, SubType, Offset, Size, Flags -# Note: Firmware partition offset needs to be 64K aligned, initial 36K (9 sectors) are reserved for bootloader and partition table -esp_secure_cert, 0x3F, ,0xd000, 0x2000, encrypted -nvs, data, nvs, 0x10000, 0x6000, -nvs_keys, data, nvs_keys, , 0x1000, encrypted -otadata, data, ota, , 0x2000 -phy_init, data, phy, , 0x1000, -ota_0, app, ota_0, , 0x1C0000, -ota_1, app, ota_1, , 0x1C0000, -# For Wi-Fi device, this partition can be deleted. -ot_storage,data, fat, , 0x2000, diff --git a/examples/room_air_conditioner/sdkconfig.defaults.esp32c6 b/examples/room_air_conditioner/sdkconfig.defaults.esp32c6 index ae631c7ba..c10ac5328 100644 --- a/examples/room_air_conditioner/sdkconfig.defaults.esp32c6 +++ b/examples/room_air_conditioner/sdkconfig.defaults.esp32c6 @@ -18,7 +18,7 @@ CONFIG_LWIP_IPV6_AUTOCONFIG=n # Use a custom partition table CONFIG_PARTITION_TABLE_CUSTOM=y -CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions_thread.csv" +CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv" # Use minimal mDNS CONFIG_USE_MINIMAL_MDNS=y diff --git a/examples/room_air_conditioner/sdkconfig.defaults.esp32h2 b/examples/room_air_conditioner/sdkconfig.defaults.esp32h2 index 0a4d4149f..3533a4b66 100644 --- a/examples/room_air_conditioner/sdkconfig.defaults.esp32h2 +++ b/examples/room_air_conditioner/sdkconfig.defaults.esp32h2 @@ -27,7 +27,7 @@ CONFIG_LWIP_IPV6_AUTOCONFIG=n # Use a custom partition table CONFIG_PARTITION_TABLE_CUSTOM=y -CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions_thread.csv" +CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv" # LwIP config for OpenThread CONFIG_LWIP_IPV6_NUM_ADDRESSES=8 diff --git a/examples/zap_light/main/app_priv.h b/examples/zap_light/main/app_priv.h index 7728ba092..11106ee68 100644 --- a/examples/zap_light/main/app_priv.h +++ b/examples/zap_light/main/app_priv.h @@ -77,18 +77,18 @@ esp_err_t app_driver_attribute_update(app_driver_handle_t driver_handle, uint16_ esp_err_t app_driver_light_set_defaults(uint16_t endpoint_id); #if CHIP_DEVICE_CONFIG_ENABLE_THREAD -#define ESP_OPENTHREAD_DEFAULT_RADIO_CONFIG() \ - { \ - .radio_mode = RADIO_MODE_NATIVE, \ +#define ESP_OPENTHREAD_DEFAULT_RADIO_CONFIG() \ + { \ + .radio_mode = RADIO_MODE_NATIVE, \ } -#define ESP_OPENTHREAD_DEFAULT_HOST_CONFIG() \ - { \ - .host_connection_mode = HOST_CONNECTION_MODE_NONE, \ +#define ESP_OPENTHREAD_DEFAULT_HOST_CONFIG() \ + { \ + .host_connection_mode = HOST_CONNECTION_MODE_NONE, \ } -#define ESP_OPENTHREAD_DEFAULT_PORT_CONFIG() \ - { \ - .storage_partition_name = "ot_storage", .netif_queue_size = 10, .task_queue_size = 10, \ +#define ESP_OPENTHREAD_DEFAULT_PORT_CONFIG() \ + { \ + .storage_partition_name = "nvs", .netif_queue_size = 10, .task_queue_size = 10, \ } #endif diff --git a/examples/zap_light/partitions_thread.csv b/examples/zap_light/partitions_thread.csv deleted file mode 100644 index 362679948..000000000 --- a/examples/zap_light/partitions_thread.csv +++ /dev/null @@ -1,11 +0,0 @@ -# Name, Type, SubType, Offset, Size, Flags -# Note: Firmware partition offset needs to be 64K aligned, initial 36K (9 sectors) are reserved for bootloader and partition table -esp_secure_cert, 0x3F, ,0xd000, 0x2000, encrypted -nvs, data, nvs, 0x10000, 0xC000, -nvs_keys, data, nvs_keys, , 0x1000, encrypted -otadata, data, ota, , 0x2000 -phy_init, data, phy, , 0x1000, -ota_0, app, ota_0, , 0x1C0000, -ota_1, app, ota_1, , 0x1C0000, -# For Wi-Fi device, this partition can be deleted. -ot_storage,data, fat, , 0x2000, diff --git a/examples/zap_light/sdkconfig.defaults.esp32h2 b/examples/zap_light/sdkconfig.defaults.esp32h2 index 0a4d4149f..3533a4b66 100644 --- a/examples/zap_light/sdkconfig.defaults.esp32h2 +++ b/examples/zap_light/sdkconfig.defaults.esp32h2 @@ -27,7 +27,7 @@ CONFIG_LWIP_IPV6_AUTOCONFIG=n # Use a custom partition table CONFIG_PARTITION_TABLE_CUSTOM=y -CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions_thread.csv" +CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv" # LwIP config for OpenThread CONFIG_LWIP_IPV6_NUM_ADDRESSES=8 diff --git a/examples/zigbee_bridge/main/idf_component.yml b/examples/zigbee_bridge/main/idf_component.yml index fcc36a272..1d60ab379 100644 --- a/examples/zigbee_bridge/main/idf_component.yml +++ b/examples/zigbee_bridge/main/idf_component.yml @@ -1,7 +1,7 @@ ## IDF Component Manager Manifest File dependencies: - espressif/esp-zboss-lib: "~0.3.0" - espressif/esp-zigbee-lib: "~0.5.0" + espressif/esp-zboss-lib: "~0.5.0" + espressif/esp-zigbee-lib: "~0.7.0" ## Required IDF version idf: version: ">=5.0.0"