Skip to content

Commit 4694ae9

Browse files
committed
Merge branch 'esp-matter/add_esp32c5_support' into 'main'
[Target] Add esp32c5 support See merge request app-frameworks/esp-matter!1171
2 parents 080c9e7 + d25e5de commit 4694ae9

21 files changed

+425
-25
lines changed

.gitlab-ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,7 @@ build_esp_rainmaker_apps:
632632

633633
build_docs:
634634
stage: build
635-
image: $CI_DOCKER_REGISTRY/esp-idf-doc-env-v5.1:1-1
635+
image: $CI_DOCKER_REGISTRY/esp-idf-doc-env-v5.5:3-1
636636
rules:
637637
- if: $CI_PIPELINE_SOURCE == "merge_request_event" || $CI_COMMIT_BRANCH == "main" || $CI_PIPELINE_SOURCE == "push"
638638
tags:
@@ -648,13 +648,13 @@ build_docs:
648648
script:
649649
- cd docs
650650
- pip install -r requirements.txt
651-
- build-docs -t esp32 esp32s3 esp32c2 esp32c3 esp32c6 esp32h2 esp32p4 -l en
651+
- build-docs -t esp32 esp32s3 esp32c2 esp32c3 esp32c6 esp32h2 esp32p4 esp32c5 -l en
652652
# disable link checks for now, as it is failing due to some links taking longer time to respond
653653
# - build-docs -t esp32 -l en linkcheck
654654

655655
.deploy_docs_template:
656656
stage: docs
657-
image: $CI_DOCKER_REGISTRY/esp-idf-doc-env-v5.1:1-1
657+
image: $CI_DOCKER_REGISTRY/esp-idf-doc-env-v5.5:3-1
658658
tags:
659659
- docs
660660
needs:

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ section in the ESP-Matter Programming Guide.
3030

3131
- This SDK currently works with commit [d144bbbaae] (https://github.com/project-chip/connectedhomeip/tree/d144bbbaae) of connectedhomeip.
3232
- For Matter projects development with this SDK, it is recommended to utilize ESP-IDF [v5.4.1](https://github.com/espressif/esp-idf/tree/v5.4.1).
33+
- For ESP32C5, it is recommended to utilize ESP-IDF [98cd765953](https://github.com/espressif/esp-idf/commit/98cd765953dfe0e7bb1c5df8367e1b54bd966cce).
3334

3435
## Documentation
3536

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
// Copyright 2025 Espressif Systems (Shanghai) CO LTD
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
// http://www.apache.org/licenses/LICENSE-2.0
7+
//
8+
// Unless required by applicable law or agreed to in writing, software
9+
// distributed under the License is distributed on an "AS IS" BASIS,
10+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
// See the License for the specific language governing permissions and
12+
// limitations under the License
13+
14+
#include <esp_log.h>
15+
#include <iot_button.h>
16+
#include <button_gpio.h>
17+
#include <driver/gpio.h>
18+
#include <led_driver.h>
19+
20+
#define LED_GPIO_PIN GPIO_NUM_27
21+
#define LED_CHANNEL 0 /* RMT_CHANNEL_0 */
22+
#define BUTTON_GPIO_PIN GPIO_NUM_28
23+
24+
static const char *TAG = "device";
25+
26+
led_driver_config_t led_driver_get_config()
27+
{
28+
led_driver_config_t config = {
29+
.gpio = LED_GPIO_PIN,
30+
.channel = LED_CHANNEL,
31+
};
32+
return config;
33+
}
34+
35+
button_gpio_config_t button_driver_get_config()
36+
{
37+
button_gpio_config_t config = {
38+
.gpio_num = BUTTON_GPIO_PIN,
39+
.active_level = 0,
40+
};
41+
return config;
42+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
cmake_minimum_required(VERSION 3.5)
2+
if (NOT ("${IDF_TARGET}" STREQUAL "esp32c5" ))
3+
message(FATAL_ERROR "please set esp32c5 as the IDF_TARGET using 'idf.py --preview set-target esp32c5'")
4+
endif()
5+
6+
SET(device_type esp32c5_devkit_c)
7+
SET(led_type ws2812)
8+
SET(button_type iot)
9+
10+
SET(extra_components_dirs_append "$ENV{ESP_MATTER_DEVICE_PATH}/../../led_driver"
11+
"$ENV{ESP_MATTER_DEVICE_PATH}/../../button_driver/iot_button")

docs/_static/esp_sdk_matter_version.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@ var DOCUMENTATION_VERSIONS = {
33
supported_targets: [ "esp32" ]
44
},
55
VERSIONS: [
6-
{ name: "latest", has_targets: true, supported_targets: [ "esp32", "esp32c2", "esp32c3", "esp32c6", "esp32s3", "esp32h2", "esp32p4" ] },
6+
{ name: "latest", has_targets: true, supported_targets: [ "esp32", "esp32c2", "esp32c3", "esp32c5", "esp32c6", "esp32s3", "esp32h2", "esp32p4" ] },
77
],
88
IDF_TARGETS: [
99
{ text: "ESP32", value: "esp32" },
1010
{ text: "ESP32-S3", value: "esp32s3" },
1111
{ text: "ESP32-C2", value: "esp32c2" },
1212
{ text: "ESP32-C3", value: "esp32c3" },
13+
{ text: "ESP32-C5", value: "esp32c5" },
1314
{ text: "ESP32-C6", value: "esp32c6" },
1415
{ text: "ESP32-H2", value: "esp32h2" },
1516
{ text: "ESP32-P4", value: "esp32p4" },

docs/conf_common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import subprocess
33

44
languages = ['en']
5-
idf_targets = ['esp32', 'esp32s3', 'esp32c2', 'esp32c3', 'esp32c6', 'esp32h2', 'esp32p4']
5+
idf_targets = ['esp32', 'esp32s3', 'esp32c2', 'esp32c3', 'esp32c5', 'esp32c6', 'esp32h2', 'esp32p4']
66

77
extensions += ['sphinx_copybutton',
88
# Needed as a trigger for running doxygen

docs/en/certification.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ The option ``-n`` (count) is the number of generated binaries. In the above comm
9999

100100
The option ``--paa-trust-store-path`` should be added when using chip-tool to pair the device for manual tests.
101101

102-
.. only:: esp32 or esp32s3 or esp32c3 or esp32c2 or esp32c6
102+
.. only:: esp32 or esp32s3 or esp32c3 or esp32c2 or esp32c6 or esp32c5
103103

104104
::
105105

@@ -110,7 +110,7 @@ The option ``--paa-trust-store-path`` should be added when using chip-tool to pa
110110

111111
or
112112

113-
.. only:: esp32h2 or esp32c6
113+
.. only:: esp32h2 or esp32c6 or esp32c5
114114

115115
::
116116

docs/en/developing.rst

Lines changed: 38 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ This section talks about setting up ESP-IDF.
1515
You should install drivers and support packages for your development
1616
host. Linux and Mac OS-X are the supported development hosts in Matter, the recommended host versions:
1717

18-
- Ubuntu 20.04 or 22.04 LTS
18+
- Ubuntu 20.04 or 22.04 or 24.04 LTS
1919
- macOS 10.15 or later
2020

2121
Additionally, we also support developing on Windows Host using WSL.
@@ -52,20 +52,36 @@ The Prerequisites for ESP-IDF:
5252

5353
- Please get the `Prerequisites for ESP-IDF`_. For beginners, please check `step by step installation guide`_ for esp-idf.
5454

55+
.. only:: esp32c5
56+
57+
- For ``ESP32C5``, the IDF version should be `98cd765953 <https://github.com/espressif/esp-idf/commit/98cd765953dfe0e7bb1c5df8367e1b54bd966cce>`__ or newer.
58+
5559
.. note::
5660

5761
``git clone`` command accepts the optional argument ``--jobs N``, which can significantly speed up the
5862
process by parallelizing submodule cloning. Consider using this option when cloning repositories.
5963

60-
Cloning esp-idf:
64+
.. only:: not esp32c5
6165

62-
::
66+
Cloning esp-idf:
67+
68+
::
69+
70+
git clone --recursive https://github.com/espressif/esp-idf.git
71+
cd esp-idf; git checkout v5.4.1; git submodule update --init --recursive;
72+
./install.sh
73+
cd ..
74+
75+
.. only:: esp32c5
6376

64-
git clone --recursive https://github.com/espressif/esp-idf.git
65-
cd esp-idf; git checkout v5.4.1; git submodule update --init --recursive;
66-
./install.sh
67-
cd ..
77+
Cloning esp-idf:
6878

79+
::
80+
81+
git clone --recursive https://github.com/espressif/esp-idf.git
82+
cd esp-idf; git checkout 98cd765953; git submodule update --init --recursive;
83+
./install.sh
84+
cd ..
6985

7086
2.1.3 Configuring the Environment
7187
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -263,6 +279,12 @@ Choose IDF target.
263279

264280
idf.py set-target esp32c6
265281

282+
.. only:: esp32c5
283+
284+
::
285+
286+
idf.py --preview set-target esp32c5
287+
266288
.. only:: esp32p4
267289

268290
::
@@ -299,9 +321,9 @@ Choose IDF target.
299321
idf.py -C managed_components/espressif__esp_hosted/slave/ -B build_slave set-target esp32c6
300322
idf.py -C managed_components/espressif__esp_hosted/slave/ -B build_slave build flash monitor
301323

302-
.. only:: esp32c6
324+
.. only:: esp32c5 or esp32c6
303325

304-
- ESP32-C6 supports both the Wi-Fi and IEEE 802.15.4 radio, so you can run Wi-Fi or Thread matter example on it.
326+
- {IDF_TARGET_NAME} supports both the Wi-Fi and IEEE 802.15.4 radio, so you can run Wi-Fi or Thread matter example on it.
305327

306328
- To enable Thread, you should change the menuconfig options to ``CONFIG_OPENTHREAD_ENABLED=y``, ``CONFIG_ENABLE_WIFI_STATION=n``, and ``CONFIG_USE_MINIMAL_MDNS=n``.
307329
- To enable Wi-Fi. you should change the menuconfig options to ``CONFIG_OPENTHREAD_ENABLED=n``, ``CONFIG_ENABLE_WIFI_STATION=y``, and ``CONFIG_USE_MINIMAL_MDNS=y``.
@@ -359,7 +381,7 @@ Use ``chip-tool`` in interactive mode to commission the device:
359381
chip-tool interactive start
360382

361383

362-
.. only:: esp32 or esp32s3 or esp32c3 or esp32c2 or esp32c6 or esp32p4
384+
.. only:: esp32 or esp32s3 or esp32c3 or esp32c2 or esp32c6 or esp32p4 or esp32c5
363385

364386
::
365387

@@ -369,7 +391,7 @@ Use ``chip-tool`` in interactive mode to commission the device:
369391

370392
or
371393

372-
.. only:: esp32h2 or esp32c6
394+
.. only:: esp32h2 or esp32c6 or esp32c5
373395

374396
::
375397

@@ -386,7 +408,7 @@ Above method commissions the device using setup passcode and discriminator. Devi
386408

387409
To Commission the device using manual pairing code 34970112332
388410

389-
.. only:: esp32 or esp32s3 or esp32c3 or esp32c2 or esp32c6 or esp32p4
411+
.. only:: esp32 or esp32s3 or esp32c3 or esp32c2 or esp32c6 or esp32p4 or esp32c5
390412

391413
::
392414

@@ -396,7 +418,7 @@ To Commission the device using manual pairing code 34970112332
396418

397419
or
398420

399-
.. only:: esp32h2 or esp32c6
421+
.. only:: esp32h2 or esp32c6 or esp32c5
400422

401423
::
402424

@@ -413,7 +435,7 @@ Above default manual pairing code contains following values:
413435

414436
To commission the device using QR code MT:Y.K9042C00KA0648G00
415437

416-
.. only:: esp32 or esp32s3 or esp32c3 or esp32c2 or esp32c6 or esp32p4
438+
.. only:: esp32 or esp32s3 or esp32c3 or esp32c2 or esp32c6 or esp32p4 or esp32c5
417439

418440
::
419441

@@ -423,7 +445,7 @@ To commission the device using QR code MT:Y.K9042C00KA0648G00
423445

424446
or
425447

426-
.. only:: esp32h2 or esp32c6
448+
.. only:: esp32h2 or esp32c6 or esp32c5
427449

428450
::
429451

@@ -571,7 +593,7 @@ Additional Matter specific commands:
571593

572594
matter esp wifi connect <ssid> <password>
573595

574-
.. only:: esp32h2 or esp32c6
596+
.. only:: esp32h2 or esp32c6 or esp32c5
575597

576598
- OpenThread command line:
577599

docs/en/introduction.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Espressif platform solutions are as shown below:
2626
:figclass: align-center
2727

2828
- The Wi-Fi-enabled SoCs and modules, such as ESP32, ESP32-C and ESP32-S series can be used to build **Matter Wi-Fi devices**.
29-
- ESP32-H SoCs and modules with 802.15.4 can be used to build **Matter Thread devices**.
29+
- SoCs and modules(ESP32-H series, ESP32-C5, and ESP32-C6) with 802.15.4 can be used to build **Matter Thread devices**.
3030
- By efficiently combining ESP32-H and our Wi-Fi SoCs, a **Thread Border Router** can be built to connect the Thread network with the Wi-Fi network. We provide hardware devkits, reference designs and production-ready SDK, which supports the latest Thread 1.3 feature for Matter.
3131
- We also provide Matter-Zigbee and Matter-BLE Mesh bridge solutions that enable non-Matter devices based on Zigbee, Bluetooth LE Mesh and other protocols to connect to the Matter ecosystem. A **Matter-Zigbee Bridge** uses ESP32-H and another Wi-Fi SoC, while a **Matter-BLE Mesh Bridge** can be done on a single SoC with both Wi-Fi and Bluetooth LE interfaces.
3232

docs/en/security.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ DAC private needs to be protected from remote as well as physical attacks in the
5959

6060
Recommended ways for DAC private key protection:
6161

62-
.. only:: esp32h2
62+
.. only:: esp32h2 or esp32c5
6363

6464
- {IDF_TARGET_NAME} supports ECDSA hardware peripheral with the ECDSA key programmed in the eFuse. This key is software read protected (in default mode). This peripheral can help to protect the identity of the DAC private key on the device.
6565

0 commit comments

Comments
 (0)