|
23 | 23 | import copy |
24 | 24 | import importlib.util |
25 | 25 | import json |
26 | | -import subprocess |
27 | | -import sys |
28 | | -import shutil |
29 | 26 | import os |
30 | | -from os.path import join |
| 27 | +import platform as sys_platform |
31 | 28 | import re |
32 | 29 | import requests |
33 | | -import platform as sys_platform |
| 30 | +import shutil |
| 31 | +import subprocess |
| 32 | +import sys |
34 | 33 | from pathlib import Path |
35 | 34 | from urllib.parse import urlsplit, unquote |
36 | 35 |
|
@@ -1530,6 +1529,7 @@ def _get_installed_uv_packages(python_exe_path): |
1530 | 1529 | # https://github.com/platformio/platform-espressif32/issues/635 |
1531 | 1530 | "cryptography": "~=44.0.0", |
1532 | 1531 | "pyparsing": ">=3.1.0,<4", |
| 1532 | + "pydantic": "~=2.11.10", |
1533 | 1533 | "idf-component-manager": "~=2.2", |
1534 | 1534 | "esp-idf-kconfig": "~=2.5.0" |
1535 | 1535 | } |
@@ -1672,8 +1672,8 @@ def get_python_exe(): |
1672 | 1672 |
|
1673 | 1673 | ensure_python_venv_available() |
1674 | 1674 |
|
1675 | | -# ESP-IDF package doesn't contain .git folder, instead package version is specified |
1676 | | -# in a special file "version.h" in the root folder of the package |
| 1675 | +# ESP-IDF package version is determined from version.h file |
| 1676 | +# since the package distribution doesn't include .git metadata |
1677 | 1677 |
|
1678 | 1678 | create_version_file() |
1679 | 1679 |
|
@@ -1712,7 +1712,7 @@ def get_python_exe(): |
1712 | 1712 |
|
1713 | 1713 |
|
1714 | 1714 | # |
1715 | | -# Current build script limitations |
| 1715 | +# Known build system limitations |
1716 | 1716 | # |
1717 | 1717 |
|
1718 | 1718 | if any(" " in p for p in (FRAMEWORK_DIR, BUILD_DIR)): |
@@ -1751,12 +1751,12 @@ def get_python_exe(): |
1751 | 1751 | LIBSOURCE_DIRS=[str(Path(ARDUINO_FRAMEWORK_DIR) / "libraries")] |
1752 | 1752 | ) |
1753 | 1753 |
|
1754 | | -# Set ESP-IDF version environment variables (needed for proper Kconfig processing) |
| 1754 | +# Configure ESP-IDF version environment variables for Kconfig processing |
1755 | 1755 | framework_version = get_framework_version() |
1756 | 1756 | major_version = framework_version.split('.')[0] + '.' + framework_version.split('.')[1] |
1757 | 1757 | os.environ["ESP_IDF_VERSION"] = major_version |
1758 | 1758 |
|
1759 | | -# Configure CMake arguments with ESP-IDF version |
| 1759 | +# Setup CMake configuration arguments |
1760 | 1760 | extra_cmake_args = [ |
1761 | 1761 | "-DIDF_TARGET=" + idf_variant, |
1762 | 1762 | "-DPYTHON_DEPS_CHECKED=1", |
@@ -1850,7 +1850,7 @@ def get_python_exe(): |
1850 | 1850 | env.Depends("$BUILD_DIR/$PROGNAME$PROGSUFFIX", build_bootloader(sdk_config)) |
1851 | 1851 |
|
1852 | 1852 | # |
1853 | | -# Target: ESP-IDF menuconfig |
| 1853 | +# ESP-IDF menuconfig target implementation |
1854 | 1854 | # |
1855 | 1855 |
|
1856 | 1856 | env.AddPlatformTarget( |
@@ -1995,8 +1995,8 @@ def _skip_prj_source_files(node): |
1995 | 1995 | ): |
1996 | 1996 | project_env = env.Clone() |
1997 | 1997 | if project_target_name != "__idf_main": |
1998 | | - # Manually add dependencies to CPPPATH since ESP-IDF build system doesn't generate |
1999 | | - # this info if the folder with sources is not named 'main' |
| 1998 | + # Add dependencies to CPPPATH for non-main source directories |
| 1999 | + # ESP-IDF build system requires manual dependency handling for custom source folders |
2000 | 2000 | # https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/build-system.html#rename-main |
2001 | 2001 | project_env.AppendUnique(CPPPATH=app_includes["plain_includes"]) |
2002 | 2002 |
|
@@ -2044,7 +2044,7 @@ def _skip_prj_source_files(node): |
2044 | 2044 | # |
2045 | 2045 |
|
2046 | 2046 | extra_elf2bin_flags = "--elf-sha256-offset 0xb0" |
2047 | | -# https://github.com/espressif/esp-idf/blob/master/components/esptool_py/project_include.cmake#L58 |
| 2047 | +# Reference: ESP-IDF esptool_py component configuration |
2048 | 2048 | # For chips that support configurable MMU page size feature |
2049 | 2049 | # If page size is configured to values other than the default "64KB" in menuconfig, |
2050 | 2050 | mmu_page_size = "64KB" |
|
0 commit comments