|
67 | 67 | IDF_ENV_VERSION = "1.0.0"
|
68 | 68 | FRAMEWORK_DIR = platform.get_package_dir("framework-espidf")
|
69 | 69 | TOOLCHAIN_DIR = platform.get_package_dir(
|
70 |
| - "toolchain-riscv32-esp" |
71 |
| - if mcu in ("esp32c3", "esp32c6") |
72 |
| - else ( |
73 |
| - ( |
74 |
| - "toolchain-xtensa-esp-elf" |
75 |
| - if "arduino" not in env.subst("$PIOFRAMEWORK") |
76 |
| - else "toolchain-xtensa-%s" % mcu |
77 |
| - ) |
78 |
| - ) |
| 70 | + "toolchain-%s" % ("riscv32-esp" if mcu in ("esp32c2", "esp32c3", "esp32c6", "esp32h2") else ("xtensa-%s" % mcu)) |
79 | 71 | )
|
80 | 72 |
|
81 | 73 |
|
|
91 | 83 | ):
|
92 | 84 | print("Warning! Debugging an IDF project requires PlatformIO Core >= 6.1.11!")
|
93 | 85 |
|
94 |
| -# Arduino framework as a component is not compatible with ESP-IDF >=4.1 |
| 86 | +# Arduino framework as a component is not compatible with ESP-IDF >5.2 |
95 | 87 | if "arduino" in env.subst("$PIOFRAMEWORK"):
|
96 | 88 | ARDUINO_FRAMEWORK_DIR = platform.get_package_dir("framework-arduinoespressif32")
|
97 | 89 | # Possible package names in 'package@version' format is not compatible with CMake
|
@@ -256,7 +248,7 @@ def populate_idf_env_vars(idf_env):
|
256 | 248 | os.path.dirname(get_python_exe()),
|
257 | 249 | ]
|
258 | 250 |
|
259 |
| - if mcu not in ("esp32c3", "esp32c6"): |
| 251 | + if mcu not in ("esp32c2", "esp32c3", "esp32c6","esp32h2"): |
260 | 252 | additional_packages.append(
|
261 | 253 | os.path.join(platform.get_package_dir("toolchain-esp32ulp"), "bin"),
|
262 | 254 | )
|
@@ -511,7 +503,7 @@ def extract_linker_script_fragments_backup(framework_components_dir, sdk_config)
|
511 | 503 | sys.stderr.write("Error: Failed to extract paths to linker script fragments\n")
|
512 | 504 | env.Exit(1)
|
513 | 505 |
|
514 |
| - if mcu in ("esp32c3", "esp32c6"): |
| 506 | + if mcu in ("esp32c2", "esp32c3", "esp32c6", "esp32h2"): |
515 | 507 | result.append(os.path.join(framework_components_dir, "riscv", "linker.lf"))
|
516 | 508 |
|
517 | 509 | # Add extra linker fragments
|
@@ -1201,6 +1193,7 @@ def _get_installed_pip_packages(python_exe_path):
|
1201 | 1193 | return
|
1202 | 1194 |
|
1203 | 1195 | deps = {
|
| 1196 | + "wheel": ">=0.35.1", |
1204 | 1197 | # https://github.com/platformio/platformio-core/issues/4614
|
1205 | 1198 | "urllib3": "<2",
|
1206 | 1199 | # https://github.com/platformio/platform-espressif32/issues/635
|
@@ -1606,7 +1599,7 @@ def _skip_prj_source_files(node):
|
1606 | 1599 | (
|
1607 | 1600 | board.get(
|
1608 | 1601 | "upload.bootloader_offset",
|
1609 |
| - "0x0" if mcu in ("esp32c3", "esp32c6", "esp32s3") else "0x1000", |
| 1602 | + "0x0" if mcu in ("esp32c2", "esp32c3", "esp32c6", "esp32s3", "esp32h2") else "0x1000", |
1610 | 1603 | ),
|
1611 | 1604 | os.path.join("$BUILD_DIR", "bootloader.bin"),
|
1612 | 1605 | ),
|
@@ -1717,7 +1710,7 @@ def _skip_prj_source_files(node):
|
1717 | 1710 | #
|
1718 | 1711 |
|
1719 | 1712 | ulp_dir = os.path.join(PROJECT_DIR, "ulp")
|
1720 |
| -if os.path.isdir(ulp_dir) and os.listdir(ulp_dir) and mcu not in ("esp32c3", "esp32c6"): |
| 1713 | +if os.path.isdir(ulp_dir) and os.listdir(ulp_dir) and mcu not in ("esp32c2", "esp32c3", "esp32c6", "esp32h2"): |
1721 | 1714 | env.SConscript("ulp.py", exports="env sdk_config project_config idf_variant")
|
1722 | 1715 |
|
1723 | 1716 | #
|
|
0 commit comments