Skip to content

Commit 50ef110

Browse files
authored
[ESP32] ESP-IDF v6.1 Support (project-chip#72093)
* [ESP32] Update setup dependency constraints Signed-off-by: Zhibin (Ryan) Wen <wenzhibin@espressif.com> * [ESP32] Preserve esp_libc platform include order Signed-off-by: Zhibin (Ryan) Wen <wenzhibin@espressif.com> * [ESP32] Remove obsolete setup dependency notes Signed-off-by: Zhibin (Ryan) Wen <wenzhibin@espressif.com> --------- Signed-off-by: Zhibin (Ryan) Wen <wenzhibin@espressif.com>
1 parent ec22c98 commit 50ef110

4 files changed

Lines changed: 12 additions & 29 deletions

File tree

config/esp32/components/chip/create_args_gn.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,16 +86,19 @@ def get_compile_flags(src_file):
8686
for flag in compile_flags:
8787
expanded_flags.extend(expand_response_file(flag))
8888

89-
replace = "-I%s" % args.idf_path
90-
replace_with = "-isystem%s" % args.idf_path
89+
# Keep ESP-IDF libc overrides ahead of toolchain libc headers, matching native ESP-IDF builds
90+
def normalize_idf_include(flag):
91+
if flag == "-I%s/components/esp_libc/platform_include" % args.idf_path:
92+
return flag
93+
return flag.replace("-I%s" % args.idf_path, "-isystem%s" % args.idf_path)
9194

9295
# Escape any embedded double quotes for GN string syntax, then wrap in quotes
9396
def quote_for_gn(flag):
9497
# Escape backslashes first, then escape double quotes
9598
escaped = flag.replace('\\', '\\\\').replace('"', '\\"')
9699
return f'"{escaped}"'
97100

98-
expanded_flags = [quote_for_gn(f).replace(replace, replace_with) for f in expanded_flags]
101+
expanded_flags = [quote_for_gn(normalize_idf_include(f)) for f in expanded_flags]
99102

100103
if args.filter_out:
101104
filter_out = [f'"{f}"' for f in args.filter_out.split(';')]

docs/platforms/esp32/setup_idf_chip.md

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -60,30 +60,10 @@ source scripts/bootstrap.sh -p all,esp32
6060
Whenever Matter environment is out of date, it can be updated by running above
6161
command.
6262
63-
In IDF v4.4.x, `esptool` is part of the esp-idf repository, but in IDF v5.x, it
64-
is moved out as a Python package which can be installed using pip.
65-
66-
If you are using IDF v5.x or later, please install `esptool` using the command
67-
below:
68-
69-
```
70-
# Please make sure to run this command in the Matter Python environment
71-
python3 -m pip install esptool
72-
```
73-
7463
## Using ESP-IDF v6.0 (beta)
7564
76-
ESP-IDF v6.0 requires additional Python dependencies to be installed in the
77-
Matter environment. Run the following after bootstrapping:
78-
79-
```
80-
# Please make sure to run these commands in the Matter Python environment
81-
pip install -U cryptography==45.0.4
82-
pip install esp-idf-kconfig==3.6.0
83-
```
84-
85-
> **Note:** Only examples without display support have been verified with
86-
> ESP-IDF v6.0. Tested on ESP32-C3-Devkit
65+
Only examples without display support have been verified with ESP-IDF v6.0.
66+
Tested on ESP32-C3-Devkit.
8767
8868
---
8969

scripts/setup/constraints.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ pygments==2.14.0
164164
# via ipython
165165
pykwalify==1.8.0
166166
# via west
167-
pyparsing==3.0.9
167+
pyparsing==3.2.5
168168
# via bluezoo
169169
python-dateutil==2.8.2
170170
# via

scripts/setup/requirements.esp32.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ click>=7.0
22
future>=0.15.2
33
# pyparsing: Min version was set based on https://github.com/pyparsing/pyparsing/issues/319
44
# pyparsing: Max version was set to avoid breaking changes
5-
pyparsing>=3.0.3,<3.1
6-
idf-component-manager==2.4.2
5+
pyparsing>=3.1.0,<3.3
6+
idf-component-manager~=2.2
77
pygdbmi<=0.9.0.2
88
reedsolo>=1.5.3,<=1.5.4
99
bitarray==2.6.0
@@ -13,5 +13,5 @@ construct>=2.10.70
1313
python-socketio<5
1414
itsdangerous<2.1 ; python_version < "3.11"
1515
esp_idf_monitor==1.8.0
16-
esp-idf-kconfig==2.5.0
16+
esp-idf-kconfig>=3.2.0,<4.0.0
1717
esp_idf_nvs_partition_gen==0.1.9

0 commit comments

Comments
 (0)