From 2d8bfd5faa0de9e9e25d7f2b65baa22c49067567 Mon Sep 17 00:00:00 2001 From: liyashuai Date: Tue, 2 Apr 2024 17:02:49 +0800 Subject: [PATCH] update idf version to v5.2.1 --- .github/workflows/docker-image.yml | 2 +- .gitlab-ci.yml | 6 ++--- README.md | 2 +- docs/en/developing.rst | 22 +++++++++---------- docs/en/security.rst | 2 +- .../main/esp_matter_console_helpers.cpp | 22 +++++++++++-------- examples/controller/main/esp_ot_config.h | 2 +- 7 files changed, 31 insertions(+), 27 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 0b3fb14f3..46d931305 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -30,7 +30,7 @@ env: # Github runner is running out of space when we are building for multiple architectures in single runner BUILD_PLATFORMS: linux/amd64 DOCKERHUB_REPO: ${{ github.repository }} - REQUIRED_IDF_VERSION: v5.1.1 + REQUIRED_IDF_VERSION: v5.2.1 jobs: build: diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 934ef0d14..af3e9f777 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -166,7 +166,7 @@ build_esp_matter_examples_pytest_C6_idf_v5_1: when: always expire_in: 4 days variables: - IDF_VERSION: "6b1f40b9bfb91ec82fab4a60e5bfb4ca0c9b062f" + IDF_VERSION: "v5.2.1" script: - cd ${ESP_MATTER_PATH} - pip install -r tools/ci/requirements-build.txt @@ -198,7 +198,7 @@ build_esp_matter_examples_pytest_H2_idf_v5_1: when: always expire_in: 4 days variables: - IDF_VERSION: "6b1f40b9bfb91ec82fab4a60e5bfb4ca0c9b062f" + IDF_VERSION: "v5.2.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: "6b1f40b9bfb91ec82fab4a60e5bfb4ca0c9b062f" + IDF_VERSION: "v5.2.1" script: - *build_external_platform_example - *build_esp32c6_thread_example diff --git a/README.md b/README.md index 750ade928..3b93496c2 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ section in the ESP-Matter Programming Guide. ## Supported ESP-IDF and connectedhomeip versions - This SDK currently works with [v1.2-branch](https://github.com/espressif/connectedhomeip/tree/v1.2-branch) of espressif/connectedhomeip. -- For Matter projects development with this SDK, it is recommended to utilize ESP-IDF [v5.1.2](https://github.com/espressif/esp-idf/tree/v5.1.2). +- For Matter projects development with this SDK, it is recommended to utilize ESP-IDF [v5.2.1](https://github.com/espressif/esp-idf/tree/v5.2.1). ## Documentation diff --git a/docs/en/developing.rst b/docs/en/developing.rst index 3b7b0ae07..8f2eebd6e 100644 --- a/docs/en/developing.rst +++ b/docs/en/developing.rst @@ -23,7 +23,7 @@ Additionally, we also support developing on Windows Host using WSL. The Prerequisites for ESP-IDF and Matter: -- Please see `Prerequisites `__ for ESP IDF. +- Please see `Prerequisites `__ for ESP IDF. - Please get the `Prerequisites `__ for Matter. @@ -41,7 +41,7 @@ Development on Windows is supported using Windows Subsystem for Linux (WSL). Ple - Windows does not support exposing COM ports to WSL distros. Install usbipd-win on `Windows `__ and `WSL `__ (usbipd-win `WSL Support `__). - Here onwards process for setting esp-matter and building examples is same as other hosts. -- Please clone the repositories from inside the WSL environment and not inside a mounted directory. +- Please clone the repositories from inside the WSL environment and not inside a mounted directory. For using VSCode for development, please check `Developing in WSL `__. @@ -233,7 +233,7 @@ Choose IDF target. :: ERROR: This script was called from a virtual environment, can not create a virtual environment again - + Run: :: @@ -632,14 +632,14 @@ creating in the *app_main.cpp* of the example. Examples: - on_off_light: :: - + on_off_light::config_t light_config; endpoint_t *endpoint = on_off_light::create(node, &light_config, ENDPOINT_FLAG_NONE); - fan: :: - + fan::config_t fan_config; endpoint_t *endpoint = fan::create(node, &fan_config, ENDPOINT_FLAG_NONE); @@ -677,7 +677,7 @@ creating in the *app_main.cpp* of the example. Examples: 2.4.2.2 Clusters ^^^^^^^^^^^^^^^^ -Additional clusters can also be added to an endpoint. Examples: +Additional clusters can also be added to an endpoint. Examples: - on_off: @@ -696,7 +696,7 @@ Additional clusters can also be added to an endpoint. Examples: - window_covering: :: - + window_covering::config_t window_covering_config(static_cast(chip::app::Clusters::WindowCovering::EndProductType::kTiltOnlyInteriorBlind)); cluster_t *cluster = window_covering::create(endpoint, &window_covering_config, CLUSTER_FLAG_SERVER); @@ -719,7 +719,7 @@ Additional clusters can also be added to an endpoint. Examples: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Additional attributes and commands can also be added to a cluster. -Examples: +Examples: - attribute: on_off: @@ -768,19 +768,19 @@ Non-Standard endpoint can be created, without any clusters. 2.4.3.2 Clusters ^^^^^^^^^^^^^^^^ -Non-Standard/Custom clusters can also be created: +Non-Standard/Custom clusters can also be created: - Cluster create: :: - + uint32_t custom_cluster_id = 0x131bfc00; cluster_t *cluster = cluster::create(endpoint, custom_cluster_id, CLUSTER_FLAG_SERVER); 2.4.3.3 Attributes and Commands ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Non-Standard/Custom attributes can also be created on any cluster: +Non-Standard/Custom attributes can also be created on any cluster: - Attribute create: diff --git a/docs/en/security.rst b/docs/en/security.rst index c5bc248b8..31d3b9963 100644 --- a/docs/en/security.rst +++ b/docs/en/security.rst @@ -1,7 +1,7 @@ 5. Security Considerations ========================== -{IDF_TARGET_RELEASE:default="v5.1.1"} +{IDF_TARGET_RELEASE:default="v5.2.1"} 5.1 Overview ------------ diff --git a/examples/all_device_types_app/main/esp_matter_console_helpers.cpp b/examples/all_device_types_app/main/esp_matter_console_helpers.cpp index 83b7838a8..5f3d636d9 100644 --- a/examples/all_device_types_app/main/esp_matter_console_helpers.cpp +++ b/examples/all_device_types_app/main/esp_matter_console_helpers.cpp @@ -77,10 +77,14 @@ static void initialize_console(void) .source_clk = UART_SCLK_XTAL, #endif }; +#if (CONFIG_ESP_CONSOLE_UART_NUM == 0) + uart_port_t uart_port = UART_NUM_0; +#elif (CONFIG_ESP_CONSOLE_UART_NUM == 1) + uart_port_t uart_port = UART_NUM_1; +#endif /* Install UART driver for interrupt-driven reads and writes */ - ESP_ERROR_CHECK( uart_driver_install(CONFIG_ESP_CONSOLE_UART_NUM, - 256, 0, 0, NULL, 0) ); - ESP_ERROR_CHECK( uart_param_config(CONFIG_ESP_CONSOLE_UART_NUM, &uart_config) ); + ESP_ERROR_CHECK( uart_driver_install(uart_port, 256, 0, 0, NULL, 0) ); + ESP_ERROR_CHECK( uart_param_config(uart_port, &uart_config) ); /* Tell VFS to use UART driver */ esp_vfs_dev_uart_use_driver(CONFIG_ESP_CONSOLE_UART_NUM); @@ -354,7 +358,7 @@ int create(uint8_t device_type_index) break; } } - + if (!endpoint) { ESP_LOGE(TAG, "Matter create endpoint failed"); return 1; @@ -372,7 +376,7 @@ int create(uint8_t device_type_index) xSemaphoreGive(semaphoreHandle); } } - + return 0; } @@ -387,7 +391,7 @@ namespace console { struct arg_str *device_type; struct arg_end *end; } create_device_args; - + static int create(int argc, char **argv) { int nerrors = arg_parse(argc, argv, (void **) &create_device_args); @@ -426,11 +430,11 @@ esp_err_t register_create_device_commands() }; return esp_console_cmd_register(&create_cmd); - + } void init(void) -{ +{ #if CONFIG_STORE_HISTORY initialize_filesystem(); ESP_LOGI(TAG, "Command history enabled"); @@ -498,7 +502,7 @@ void init(void) } void deinit(void) -{ +{ fflush(stdout); fsync(fileno(stdout)); esp_console_deinit(); diff --git a/examples/controller/main/esp_ot_config.h b/examples/controller/main/esp_ot_config.h index dbb5f34c4..dbe997704 100644 --- a/examples/controller/main/esp_ot_config.h +++ b/examples/controller/main/esp_ot_config.h @@ -28,7 +28,7 @@ { \ .radio_mode = RADIO_MODE_UART_RCP, \ .radio_uart_config = { \ - .port = 1, \ + .port = UART_NUM_1, \ .uart_config = \ { \ .baud_rate = 460800, \