Commit Graph

7734 Commits

Author SHA1 Message Date
Jiang Jiang Jian
6d021fcbce Merge branch 'task/buildv2_shim_and_ci_v6.1' into 'release/v6.1'
feat(cmakev2): IDF_BUILD_V2 shim + v1-compat layer + buildv2 CI (v6.1)

See merge request espressif/esp-idf!49725
2026-07-03 23:37:50 +08:00
Jiang Jiang Jian
e3feb73053 Merge branch 'task/buildv2_hygiene_and_dep_declarations_v6.1' into 'release/v6.1'
fix(components): generic dep-declaration and scope-leakage hygiene exposed by cmakev2 (v6.1)

See merge request espressif/esp-idf!48904
2026-07-03 17:47:24 +08:00
Sudeep Mohanty
ac527f3192 fix(test_apps/memprot): declare esp_hal_wdt as a private requirement of main
main/{esp32s2,esp32c3,esp32s3}/test_panic.c uses WDT registers from
esp_hal_wdt. Declare it explicitly so the build works under cmakev2's
strict component isolation.
2026-07-01 19:59:05 +08:00
Sudeep Mohanty
658df32a06 fix(test_apps/gdb): declare spi_flash as a private requirement of main
main/hello_world_main.c uses spi_flash headers. Declare spi_flash in
PRIV_REQUIRES so the build works under cmakev2's strict component
isolation.
2026-07-01 19:59:05 +08:00
harshal.patil
dd84cd7f10 fix(panic): handle absent IROM/DROM alignment gap in spiram-xip memprot tests
The spiram-xip IROM/DROM alignment tests assumed the XIP region always
leaves an alignment gap before the next MMU page: they executed into the
gap and expected an instruction access fault followed by a register dump.
When the section ends exactly on an MMU page boundary there is no gap - the
device prints "<IROM/DROM> alignment gap not added into heap" and returns,
the framework restarts cleanly (esp_restart_noos, no panic), and the test
timed out waiting for a register dump.
2026-07-01 10:59:50 +05:30
Jiang Jiang Jian
1e58083bdf Merge branch 'ci/backport-master-6.1-2026-06-29' into 'release/v6.1'
ci: backport master ci to 6.1 (2026-06-29)

See merge request espressif/esp-idf!50157
2026-06-30 14:25:15 +08:00
Jiang Jiang Jian
5743a9b9eb Merge branch 'fix/cmake-colors_v6.1' into 'release/v6.1'
fix: force colors in output of RunTool and ensure_build_directory (v6.1)

See merge request espressif/esp-idf!50035
2026-06-30 14:21:17 +08:00
Jiang Jiang Jian
554e88416f Merge branch 'feat/mcp_server_accept_project_dir_v6.1' into 'release/v6.1'
feat(tools): mcp-server accepts project_dir from chat (v6.1)

See merge request espressif/esp-idf!50032
2026-06-30 14:20:47 +08:00
Jiang Jiang Jian
4ff95c98a1 Merge branch 'fix/remove-menuconfig-curses_v6.1' into 'release/v6.1'
Cleanup after dropping curses from menuconfig (v6.1)

See merge request espressif/esp-idf!49772
2026-06-30 14:14:40 +08:00
Jiang Jiang Jian
bdcd883428 Merge branch 'feat/format_bt_hci_to_btsnoop_v6.1' into 'release/v6.1'
refactor(bt): migrate bt_hci_to_btsnoop to esp-pylib (6.1)

See merge request espressif/esp-idf!49711
2026-06-30 14:12:33 +08:00
Jiang Jiang Jian
c07459c1cd Merge branch 'feat/replace_click_witch_rich_click_v6.1' into 'release/v6.1'
feat(tools): Replaced click with rich_click (v6.1)

See merge request espressif/esp-idf!49020
2026-06-30 14:01:39 +08:00
Sudeep Mohanty
19d69b61eb fix(cmakev2): wrap library archives with --start-group/--end-group
Attach the flags as the first and last entries of the library's
INTERFACE_LINK_LIBRARIES so the linker re-scans archives until all
symbols resolve.
2026-06-29 22:10:21 +08:00
Sudeep Mohanty
7d8b791fff fix(cmakev2/compat): auto-append IDF_TARGET_ARCH to overridden common-requires
When an app sets __COMPONENT_REQUIRES_COMMON before project(), the
explicit value used to bypass the default branch that includes
${idf_target_arch}, dropping the arch component from the build.
IDF_TARGET_ARCH isn't known pre-project(), so apps shouldn't have to
hand-roll a target -> arch map. Append it after the explicit list during
common-component initialization; empty on linux means no append.
2026-06-29 22:10:21 +08:00
Sudeep Mohanty
201b2c61ed fix(cmakev2): mirror sdkconfig CONFIG_* onto build properties
Read sdkconfig.cmake's CONFIG_* values and re-publish them on the
build-properties target so component CMakeLists.txt code that queries
Kconfig via idf_build_get_property(var CONFIG_FOO) returns the expected
value.
2026-06-29 22:10:21 +08:00
Sudeep Mohanty
e23b1f585f fix(cmakev2): guard flash targets when esptool_py is excluded
Add a COMMAND check on esptool_py_flash_target before invoking it in
__init_project_flash_targets. Apps that restrict the build set without
esptool_py would otherwise hit "Unknown CMake command".
2026-06-29 22:10:21 +08:00
Sudeep Mohanty
4825985844 feat(cmakev2/compat): add idf_component_mock() for CMock-based test components 2026-06-29 22:10:21 +08:00
Sudeep Mohanty
d2446422d4 fix(cmakev2): respect explicit SET_COMPILER_OPTIMIZATION values
Use a DEFINED check instead of a truthy check so explicit NO/OFF/FALSE
values are honored.
2026-06-29 22:10:21 +08:00
Sudeep Mohanty
e7dca1a3f8 fix(cmakev2): integrate manager-injected dependencies with idf_component_register
Move managed-dependency injection and recursive inclusion to BEFORE the
component's add_subdirectory() call, so its CMakeLists.txt can resolve
managed-dep targets at register time. Inside idf_component_register,
union the manager-injected REQUIRES/PRIV_REQUIRES with what the
component author wrote instead of overwriting them.
2026-06-29 22:10:21 +08:00
Sudeep Mohanty
797d8deb5b feat(cmakev2): expose Build system v1 build properties under shim
Under __V1_COMPAT_SHIM, populate EXECUTABLE, EXECUTABLE_NAME, and
BUILD_COMPONENTS build properties in __project_default(), and propagate
project_elf to the caller scope. Relax the BUILD_COMPONENTS query gate
in build.cmake so component code that uses
idf_build_get_property(... BUILD_COMPONENTS) keeps working.

Co-authored-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2026-06-29 22:10:21 +08:00
Sudeep Mohanty
3b16b7a7fa feat(cmakev2/compat): main auto-dep under Build system v1 shim
Replicate Build system v1 behavior where the 'main' component implicitly
depends on the discovered components (or the app-restricted
__SHIM_COMPONENTS list) when no explicit REQUIRES/PRIV_REQUIRES is set.
Gated on __V1_COMPAT_SHIM so native Build system v2 projects retain
their explicit dependency contract.

Co-authored-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2026-06-29 22:10:21 +08:00
Sudeep Mohanty
a6d5b04dab feat(cmake): add IDF_BUILD_V2 shim for transparent cmakev2 delegation
When IDF_BUILD_V2 evaluates to a CMake-truthy value, project.cmake
delegates to Build system v2 (cmakev2). The shim wraps project(),
forwards the app-declared COMPONENTS list via __SHIM_COMPONENTS, and
publishes __V1_COMPAT_SHIM so Build system v2 internals can gate Build
system v1 compatibility behavior. Existing app CMakeLists.txt files
build unchanged.

Co-authored-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2026-06-29 22:10:21 +08:00
Igor Udot
5f255020d4 Revert "Merge branch 'ci/reproducible-build-version-txt' into 'master'"
This reverts merge request !48593
2026-06-29 14:51:06 +02:00
Jan Beran
7b4a9dba86 fix: force colors in output of RunTool and ensure_build_directory 2026-06-25 09:18:09 +02:00
Marek Fiala
a0c3c6aeeb feat(tools): Improved verification of ESP-IDF project
Closes https://github.com/espressif/esp-idf/issues/18675
2026-06-25 09:13:49 +02:00
Marek Fiala
66bbd208d3 feat(tools): mcp-server added create-project tool 2026-06-25 09:13:49 +02:00
Marek Fiala
40fe010be4 feat(tools): mcp-server accepts project_dir from chat
At the same time, it's possible to start idf.py mcp-server
outside ESP-IDF project directory.

Added ESP-IDF mcp server tests
2026-06-25 09:13:49 +02:00
Jan Beran
aa7c9b1538 fix: cleanup after dropping curses from menuconfig
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-24 21:24:21 +08:00
Zhang Hai Peng
9602947c08 refactor(bt): migrate bt_hci_to_btsnoop to esp-pylib
Replace argparse with rich-click and use esp_pylib.logger for
standardized console output and fatal error handling.


(cherry picked from commit 3a7896f2c5)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2026-06-16 15:34:11 +08:00
Jiang Jiang Jian
8f6ccd3bc3 Merge branch 'docs/ble-uart-tutorial_v6.1' into 'release/v6.1'
docs(ble): added ESP-BLE-UART OpenCode Companion Guide (6.1)

See merge request espressif/esp-idf!49385
2026-06-14 00:02:58 +08:00
Jiang Jiang Jian
6d7fde3e05 Merge branch 'feat/esp_trace_example_v6.1' into 'release/v6.1'
esp_trace example library integration (v6.1)

See merge request espressif/esp-idf!49089
2026-06-13 23:39:22 +08:00
sibeibei
bee381f77f feat(ci): enable build for esp32s31, disable CI test 2026-06-10 20:41:27 +08:00
Mahavir Jain
3664bd2d7e Merge branch 'fix/disable_secure_boot_v2_ecdsa_v6.1' into 'release/v6.1'
Fix/disable secure boot v2 ecdsa (v6.1)

See merge request espressif/esp-idf!49469
2026-06-10 14:39:06 +05:30
Jiang Jiang Jian
13d0e1084c Merge branch 'fix/optimize_menuconfig_speed_v6.1' into 'release/v6.1'
fix: optimize menuconfig speed (v6.1)

See merge request espressif/esp-idf!49097
2026-06-10 11:10:37 +08:00
Aditya Patwardhan
4f2f37ca69 change(secure_boot): mark ECDSA based Secure Boot V2 as insecure on affected SoCs
ECDSA based Secure Boot V2 is not functional for certain input vectors on
ESP32-C5/C61/H2/P4 and on the preview targets ESP32-H4/H21. RSA based Secure
Boot V2 is the recommended scheme where the SoC supports it. This issue will be
fixed in a future hardware ECO revision; more details will be shared through the
hardware errata document.

A new hidden Kconfig option SECURE_BOOT_V2_ECDSA_INSECURE marks the affected
mass-production SoCs (ESP32-C5/C61/H2/P4). On these SoCs, when hardware Secure
Boot V2 is enabled, the ECDSA (V2) signing scheme is no longer offered by
default; it must be turned on explicitly via SECURE_BOOT_V2_FORCE_ENABLE_ECDSA
under "Allow potentially insecure options" (CONFIG_SECURE_BOOT_INSECURE). App
signing without hardware Secure Boot is not affected. Note that ESP32-C61 has no
RSA based Secure Boot V2, so it has no Secure Boot scheme enabled by default.

The preview targets ESP32-H4 and ESP32-H21 mark ECDSA Secure Boot V2 as not
supported in their SoC capabilities instead of using the option above. As
ESP32-H4 has no other Secure Boot V2 scheme, Secure Boot is disabled entirely on
it; ESP32-H21 retains RSA based Secure Boot V2.

The security documentation keeps the ECDSA Secure Boot V2 content visible and
adds a warning describing the limitation (including that ECDSA Secure Boot V2 on
ESP32-C61 is not recommended for production). CI apps that exercise ECDSA Secure
Boot V2 on the affected SoCs set CONFIG_SECURE_BOOT_V2_FORCE_ENABLE_ECDSA
accordingly.
2026-06-10 03:10:27 +05:30
Zhou Xiao
6766a9ba67 docs(ble): add ESP-BLE-UART companion guide
Move the OpenCode companion guide into the ble_uart_service example.

Add English and Chinese Markdown guides with image assets.

Keep ESP-BLE-UART naming consistent across the example and bridge tooling.


(cherry picked from commit 926111e721)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2026-06-08 14:14:49 +08:00
Jan Beran
01cb0aef18 feat(menuconfig): optimize menuconfig speed
When esp-idf-kconfig >= 3.9.0 is installed, we can use the optimized
menuconfig target without the need to preprocess the sdkconfig file by
kconfgen (removing deprecated options - menuconfig - readding deprecated
options).

Also removed unused {menuconfig_depends} from the new target.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-01 10:02:08 +02:00
Erhan Kurubas
2d2d200ebd feat(esp_trace): add example to demonstrate external lib integration 2026-06-01 09:25:47 +03:00
Marek Fiala
9f4d7721ca fix(tools): Patch rich-click version < 1.9.5 2026-05-29 10:24:26 +02:00
Marek Fiala
c6a5b4cefc feat(tools): idf.py --help custom CMake targets rich-click style 2026-05-29 10:24:26 +02:00
Marek Fiala
925afdb7ba feat(tools): Visibly grouped custom extension actions in idf.py --help 2026-05-29 10:24:26 +02:00
Marek Fiala
82f804cd1d feat(tools): Replaced click with rich_click 2026-05-29 10:24:21 +02:00
Sudeep Mohanty
6fa141ec36 fix(cmakev2): publish idf_path in __init_idf_path 2026-05-25 12:31:18 +02:00
Sudeep Mohanty
fed8ed784f fix(cmakev2): handle .elf target name in target_add_binary_data
In cmakev1, the executable target is named "${project}.elf". In cmakev2,
the executable is named "${project}" with .elf as the output suffix.
Strip the .elf suffix and look up the bare target name when the original
name doesn't exist.
2026-05-25 12:31:18 +02:00
Sudeep Mohanty
c5e7c137f5 fix(cmakev2/compat): handle quoted REQUIRES and add legacy API shims
Two compatibility fixes:

- idf_component_register: apply separate_arguments to REQUIRES and
  PRIV_REQUIRES after cmake_parse_arguments. Some managed components
  publish CMakeLists.txt with PRIV_REQUIRES "log esp_eth" as a single
  quoted string (e.g. espressif__rtl8201).

- Add register_component() macro and idf_component_add_link_dependency()
  shims for legacy ESP-IDF examples (ULP apps, BLE mesh) and managed
  components (esp_flash_nor).
2026-05-25 12:31:17 +02:00
Sudeep Mohanty
9e20c3ba57 fix(cmakev2/kconfig): suppress transient kconfgen warnings during component manager runs
kconfgen runs while the component manager iterates to convergence.
Those passes operate on partial component sets and emit "unknown
kconfig symbol" warnings for symbols defined in not-yet-downloaded
components — idf-build-apps treats those as build failures.

Suppress kconfgen output on the intermediate passes; only the final
pass against the converged set emits warnings.
2026-05-25 12:31:17 +02:00
Sudeep Mohanty
a25c1f5476 fix(cmakev2/compat): unquote source list in idf_component_register's add_library call
The cmakev2 compat layer's idf_component_register() was passing
${sources} quoted to add_library(), collapsing the semicolon-delimited
list into a single argument. Drop the quotes so each source becomes a
separate argument, matching cmakev1's idf_component_register().
2026-05-25 12:31:17 +02:00
Sudeep Mohanty
98bc5e127c Merge branch 'task/g0_g1_buildv2_test_app_updates' into 'master'
test(g0_g1_components): adjust G0/G1 test apps for buildv2 awareness

See merge request espressif/esp-idf!48741
2026-05-21 21:30:32 +02:00
Ivan Grokhotkov
1efaa9a087 Merge branch 'feature/update-qemu-to-esp_develop_9.2.2_20260417' into 'master'
feat(tools): update qemu version to esp_develop_9.2.2_20260417

See merge request espressif/esp-idf!47766
2026-05-21 20:28:55 +02:00
Sudeep Mohanty
6084733b91 fix(test_apps/g0_components): skip -D injection when Kconfig is processed
The CMakeLists injects CONFIG_ESP_REV_MIN_FULL and CONFIG_XTAL_FREQ on
the command line because those symbols live in esp_common's Kconfig,
which is outside the G0 closure and is not loaded during a restricted
COMPONENTS build. When every discovered component's Kconfig is processed
(IDF_BUILD_V2) the symbols are already defined via their Kconfig
defaults, and the additional -D would conflict with the existing
definition.

Gate the injection so it only runs when the Kconfig is not processed.
2026-05-21 13:58:27 +02:00
Sudeep Mohanty
f6a7775dc8 fix(ci): ignore unknown-symbol warning for forced VFS_SUPPORT_IO=n
g1_components forces VFS_SUPPORT_IO=n in sdkconfig.defaults to keep
vfs and its transitive deps out of the closure. When the restricted
COMPONENTS list does not load components/vfs/Kconfig, the symbol is
unknown at config time and kconfgen emits an "unknown kconfig symbol"
warning that idf-build-apps treats as a build failure.

Add an ignore pattern so the warning does not gate the build.
2026-05-21 13:58:27 +02:00