Commit Graph

7746 Commits

Author SHA1 Message Date
Jiang Jiang Jian
f8e6e94dca Merge branch 'feat/usb_dfu_console_soc_caps_backport_v6.1' into 'release/v6.1'
feat(soc): add USB DFU and OTG console caps (backport v6.1)

See merge request espressif/esp-idf!49580
2026-07-17 10:30:26 +08:00
Jiang Jiang Jian
947e534927 Merge branch 'fix/mmap_cache_flash_wr_v6.1' into 'release/v6.1'
fix(mmap): fixed mmap read data wrong when flash being erased/written and cache not disabled (v6.1)

See merge request espressif/esp-idf!50117
2026-07-17 10:30:14 +08:00
Aditya Patwardhan
9dc17f98b0 Merge branch 'backport/44987_v6.1' into 'release/v6.1'
feat(esp-tls): Added a PSA driver for Secure Element (backport v6.1)

See merge request espressif/esp-idf!50334
2026-07-16 15:37:49 +05:30
Tomas Rezucha
32e1303c3e feat(tools): Add 'check' field to idf.py actions 2026-07-16 12:16:11 +08:00
igor.masar
f7e24571ea feat(soc): add USB DFU and OTG console caps
Add USB DFU and OTG console SOC capability flags for esp32s2, esp32s3, and esp32p4.

Use these caps in Kconfig, documentation conditionals, and idf.py DFU actions so USB support
is derived from SOC capabilities instead of hardcoded target names.
2026-07-16 12:16:11 +08:00
Jiang Jiang Jian
8f45ea4dcb Merge branch 'cleanup/remove-idf_test-component_v6.1' into 'release/v6.1'
chore: remove unused idf_test component (v6.1)

See merge request espressif/esp-idf!50650
2026-07-16 11:39:15 +08:00
Xiao Xufeng
3e8389cc31 fix(mmap): fixed some API read wrong data via mmap when flash being erased/written while XIP on PSRAM
Before:

The cache won't be disabled when XIP on psram. But during flash
erasing/programming, read data will be courrupt.

When XIP in psram is enabled, the image is not mapped to the cache so
usually there will be no flash access. The only way to read from flash
is via the driver or use mmap. The driver has protection during erasing,
while th mmap region not.

Now:

Mmap APIs provide a flag to make mmap->unmap region mutually exclusive
to flash erase/programming when XIP from psram. SPI Flash write APIs
will benefit from this. When the flag is used, no concurrent access to
mapped region will happen while writing; otherwise the cache will be
disable to avoid data corruption.

Most ESP-IDF APIs calls mmap with this flag. As for users calling
mmap-like APIs directly, they can choose whether to enable this by a
flag.

Closes https://github.com/espressif/esp-idf/issues/14897
2026-07-15 18:57:08 +08:00
Samuel Obuch
88f7f94bc9 feat(tools): update openocd version to v0.12.0-esp32-20260703 2026-07-13 09:53:58 +02:00
morris
1fb5dafdad chore: remove unused idf_test component
The idf_test component was previously cleaned up but accidentally
reintroduced when adding esp32s31 support. It only contained an empty
header file (idf_performance_target.h) with no references anywhere
in the codebase.

Also removes the corresponding entry from astyle-rules.yml.
2026-07-13 10:12:13 +08:00
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
Aditya Patwardhan
0688fe6f23 fix(esp-tls): update secure element build hint for PSA integration
(cherry picked from commit 5f1074045f)
2026-07-02 11:41:49 +05:30
Aditya Patwardhan
72b2e4f4fd fix(esp-tls): address MR review comments for SE PSA driver
- esp_tls_mbedtls: require cert when PSA-backed server/client key is set
- esp_tls_mbedtls: drop redundant pk_init/x509_crt_init (calloc handles it)
- psa SE driver: copy callbacks/opaque_key by value (no lifetime coupling)
- psa SE driver: replace atomic CAS with simple null check on register
- psa SE driver: use sig_len from sign callback with bounds validation
- psa SE driver: validate pubkey_len returned by export_pubkey callback
- psa SE driver: check hash sub-alg in RSA PKCS1V15 branch of validate_request
- psa SE driver: align secure_element_register_callbacks doc with value-copy impl
- esp_https_server: initialize server_key in HTTPD_SSL_CONFIG_DEFAULT
- mbedtls: move SECURE_ELEMENT_DRIVER_ENABLED to esp_config.h for parity
  with ESP_ECDSA_DRIVER_ENABLED; drop target_compile_definitions
- docs: fix esp_tls_cfg_t -> esp_http_client_config_t cross-reference
- docs: check psa_import_key() status in ESP-TLS PSA example
- hints/error_output: point at CONFIG_MBEDTLS_SECURE_ELEMENT_DRIVER_ENABLED

(cherry picked from commit 08b567ef3b)
2026-07-02 11:41:49 +05:30
Aditya Patwardhan
2325a727d8 feat(esp-tls): Add unified private key interface via esp_key_config_t
Add ESP_KEY_SOURCE_BUFFER and ESP_KEY_SOURCE_PSA key sources so all
hardware backends (DS, ECDSA, secure element) are accessed via PSA
key IDs through a single esp_tls_cfg_t.client_key field.

(cherry picked from commit 36090b7161)
2026-07-02 11:41:48 +05:30
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