Commit Graph

7893 Commits

Author SHA1 Message Date
Aditya Patwardhan
08b567ef3b 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
2026-06-29 19:20:22 +05:30
harshal.patil
64e694541b 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-06-29 13:00:54 +05:30
Frantisek Hrbata
4cc2d22c48 Merge branch 'docs/cmakev2-build-system-v2' into 'master'
docs(cmakev2): Restructure build system v2 documentation into a guide

Closes IDF-15079 and IDF-15475

See merge request espressif/esp-idf!49781
2026-06-29 07:36:01 +02:00
Michael (XIAO Xufeng)
c1b218b640 Merge branch 'fix/mmap_cache_flash_wr' into 'master'
fix(mmap): fixed mmap read data wrong when flash being erased/written and cache not disabled

Closes IDFGH-14084

See merge request espressif/esp-idf!29804
2026-06-29 11:44:10 +08:00
Aditya Patwardhan
36090b7161 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.
2026-06-25 11:31:37 +05:30
Meet Patel
d51e467e7c Merge branch 'feature/add_kasan_support' into 'master'
feat(kasan): add Kernel Address Sanitizer (KASAN) support for ESP-IDF

Closes IDF-13467

See merge request espressif/esp-idf!48106
2026-06-25 11:30:48 +05:30
Dai Zi Yan
811762c9f7 Merge branch 'feat/implement_auto_trans' into 'master'
feat: implement auto translation through MR label

Closes DOC-14299 and DOC-14835

See merge request espressif/esp-idf!48906
2026-06-25 01:57:15 +00:00
Roland Dobai
d022d594fe Merge branch 'fix/cmake-colors' into 'master'
fix: force colors in output of RunTool and ensure_build_directory

See merge request espressif/esp-idf!49966
2026-06-24 19:18:30 +02:00
Jan Beran
f963565341 fix: force colors in output of RunTool and ensure_build_directory 2026-06-24 12:47:16 +02:00
Marek Fiala
12ea480988 feat(tools): Improved verification of ESP-IDF project
Closes https://github.com/espressif/esp-idf/issues/18675
2026-06-24 18:46:39 +08:00
Marek Fiala
1be844551a feat(tools): mcp-server added create-project tool 2026-06-24 18:46:39 +08:00
Marek Fiala
2dd6b604fa 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-24 18:46:39 +08:00
Frantisek Hrbata
3e7f03b9aa ci(cmakev2): Drop now-documented examples from KNOWN_MISSING list
The build system v2 guide now references these examples with :example:
and :example_file: roles, so check_examples_documented.py no longer
expects them in the KNOWN_MISSING list. component_manager and the nested
import_prebuilt/prebuilt project are kept, since the guide does not link
them.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2026-06-24 09:13:25 +02:00
Meet Patel
383e9adb82 feat(kasan): add Kernel Address Sanitizer (KASAN) support for ESP-IDF
Add KASAN support for detecting heap memory safety bugs (buffer
overflows, underflows, use-after-free) at runtime using compiler
instrumentation and shadow memory. Gated behind
CONFIG_IDF_EXPERIMENTAL_FEATURES, with touch points kept to esp_system
and heap so other components stay untouched.

- Core runtime (esp_system/kasan.c, esp_kasan.h): nibble-based shadow
  memory in DRAM, poison/unpoison, per-access validation, and __asan_*
  stubs; hot-path stubs in IRAM so they stay valid with the flash cache
  off. Shadow init runs before heap bring-up.
- Heap integration (heap/heap_kasan*.c): alloc/free hooks add redzones,
  a quarantine FIFO, and shadow updates.
- Panic handling: disable checks once at the panic handler entry so
  backtrace and stack dumps can read redzones without nested reports.
- Build system: -fsanitize=kernel-address for app code, with HAL, SoC,
  esp_rom, SPI flash, esp_hw_support, bootloader_support, FreeRTOS, and
  heap internals excluded from instrumentation.
- Test app (tools/test_apps/system/kasan_test): Unity tests for
  overflow, underflow, use-after-free, and all sized __asan_* stubs,
  with halt and no-halt configurations.
- Docs: document KASAN in the heap memory debugging guide (EN and CN).
2026-06-24 11:27:00 +05:30
Adam Múdry
fa8039b5ca Merge branch 'test/vfs_fix_register_check' into 'master'
test(vfs): Test changes regarding VFS register incorrect check fix and fix VFS host test not being run at all

See merge request espressif/esp-idf!49674
2026-06-23 14:02:16 +02:00
Adam Múdry
670fb68bc7 test(vfs): Test changes regarding VFS register incorrect check fix 2026-06-22 14:48:13 +02:00
daiziyan
8272fa5d87 feat: implement auto translation through MR label 2026-06-22 15:24:27 +08:00
Astha Verma
5f58bb5e5e fix(nimble): Added l2cap_coc throughput examples 2026-06-19 11:48:18 +05:30
Martin Vychodil
2573bf3988 Merge branch 'feat/bdl_ioctl_checker' into 'master'
feat(esp_blockdev): add build-time ioctl command reservation overlap checker

Closes IDF-15799

See merge request espressif/esp-idf!49670
2026-06-19 12:40:28 +08:00
Martin Vychodil
ddc9c5fc40 fix(test_build_system): require components in ioctl overlap checker tests
Wire esp_blockdev, comp_a, and comp_b into the test app dependency graph
so ioctl def files are registered and the POST_BUILD overlap checker runs.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-18 15:57:04 +02:00
Frantisek Hrbata
f2c3fd3966 feat(cmakev2): Export public API in the generated build system v2 reference
Promote the build system v2 functions and macros used by the
examples/build_system/cmakev2 examples to the generated API reference,
document the component-scope and version variables, the public build
properties, and the public component properties, and add cmakev2
build_property and component_property directives with dedicated Build
Properties and Component Properties sections to the esp-docs extension.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2026-06-18 14:48:26 +02:00
Island
982ba320db Merge branch 'fix/esp-ble-uart-bridge-opencode-demo-fix' into 'master'
feat(ble): add vibe_indicator support and fix OpenCode bridge for v1.17+

See merge request espressif/esp-idf!49779
2026-06-18 17:33:14 +08:00
jiminxiang
114fd4a9bc feat(ble): add vibe_indicator device support to OpenCode bridge
Detect and drive the display-only ble_uart_vibe_indicator sample alongside
the interactive MiaoBan companion device, and let multiple OpenCode instances
each bind their own indicator channel.

- plugin: after connect, probe the device over the daemon's generic /request
  path and classify it as vibe_indicator / generic / unknown — a vibe_indicator
  answers the indicator_count capability query, a 502 marks a generic device,
  and a transport failure stays unknown for retry on a later refresh. The daemon
  stays a generic transport and is unchanged; detection is a demo concern.
- plugin: route by device_type. The vibe_indicator mirrors OpenCode activity
  as four lamp states on its bound channel — executing (green blink),
  success (green solid), waiting-for-user (yellow solid, on permission
  prompts, decision left to the TUI), and error (red solid, on session.error
  and the following idle). Other devices keep the existing session.status /
  permission round-trip.
- plugin: add indicator_bind_channel / indicator_unbind_channel /
  indicator_show_binding tools. Each channel has at most one live owner:
  binding a channel owned by another running instance fails (force to take
  over), and stale claims are reclaimed via process-liveness checks. The
  per-directory binding is persisted and re-claimed across restarts
  (OPENCODE_BLE_BINDING_FILE).
- docs: document device detection, lamp effects, and channel binding.
2026-06-18 17:12:36 +08:00
Zhou Xiao
de87877f39 fix(ble): fix OpenCode BLE UART bridge plugin for v1.17+ compatibility
- Add type assertion for event.type to bypass strict TS compilation errors
- Accept both 'permission.asked' and 'permission.updated' event types
- Add normalizePermissionEvent() to handle internal vs SDK event property
  format differences (pattern vs patterns, type vs permission fields)
- Add RawPermissionEvent type for loose event property parsing
- Add troubleshooting section and subdirectory auto-loading note to README
2026-06-18 11:03:18 +08:00
morris
3b5f3bb672 refactor(peripherals): avoid using esp private feature in examples 2026-06-18 10:34:25 +08:00
Alexey Lapshin
e389f3e4df Merge branch 'feature/upgrade_toolchain_to_16.1.0_20260609' into 'master'
Upgrade GNU toolchain to 16.1.0_20260609

See merge request espressif/esp-idf!49523
2026-06-18 00:55:07 +04:00
Jan Beran
fa61d8c902 Merge branch 'fix/remove-menuconfig-curses' into 'master'
Cleanup after dropping curses from menuconfig

See merge request espressif/esp-idf!48246
2026-06-17 18:24:53 +08:00
Alexey Lapshin
00ec8187b4 feat(build): add COMPILER_CXX_TRIVIAL_AUTO_VAR_INIT to keep C++26 behavior after toolchain upgrade 2026-06-17 17:24:25 +07:00
Alexey Lapshin
71618c88e3 fix(build): set -Wunused-but-set-variable=1 for GNU compiler to maintain backward compatibility 2026-06-17 17:24:25 +07:00
Alexey Lapshin
b6930d1e38 Revert "fix(picolibc): add psram fix for libc functions"
This reverts commit 1684eeb60f.
2026-06-17 17:24:25 +07:00
Jan Beran
dd742179ee fix: cleanup after dropping curses from menuconfig
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-16 16:56:46 +02:00
Sudeep Mohanty
0956aedb19 Merge branch 'task/buildv2_shim_and_ci' into 'master'
feat(cmakev2): IDF_BUILD_V2 shim + v1-compat layer + buildv2 CI

See merge request espressif/esp-idf!48745
2026-06-16 11:53:46 +02:00
Tomáš Rohlínek
a9f545bcea feat(esp_blockdev): add build-time ioctl command reservation overlap checker 2026-06-16 11:38:22 +02:00
zhanghaipeng
3a7896f2c5 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.
2026-06-16 14:43:06 +08:00
Xiao Xufeng
789ce684c9 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-06-16 01:00:43 +08:00
Sudeep Mohanty
c7cba04aa7 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-15 14:58:47 +02:00
Sudeep Mohanty
0edf32d247 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-15 14:58:46 +02:00
Sudeep Mohanty
0424ef01c5 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-15 14:58:46 +02:00
Sudeep Mohanty
61ac863963 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-15 14:58:46 +02:00
Sudeep Mohanty
1618d2c59e feat(cmakev2/compat): add idf_component_mock() for CMock-based test components 2026-06-15 14:58:46 +02:00
Sudeep Mohanty
db91c7d847 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-15 14:58:46 +02:00
Sudeep Mohanty
49efbb1191 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-15 14:58:46 +02:00
Sudeep Mohanty
3f40e1c83a 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-15 14:58:46 +02:00
Sudeep Mohanty
4d03b859ca 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-15 14:58:46 +02:00
Sudeep Mohanty
a91cac9495 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-15 14:58:45 +02:00
Roland Dobai
a5fd4e1e07 Merge branch 'fix/update-configdep' into 'master'
fix: update version of esp-idf-configdep in tools.json

See merge request espressif/esp-idf!49582
2026-06-12 12:12:23 +02:00
Konstantin Kondrashov
54b649a0c9 Merge branch 'feature/linux_esp_time_new' into 'master'
feat(esp_timer): Adds support Linux target

Closes IDF-5723

See merge request espressif/esp-idf!49358
2026-06-12 09:05:22 +03:00
Jan Beran
4b12e9a132 fix: update version of esp-idf-configdep in tools.json 2026-06-11 11:05:10 +02:00
Konstantin Kondrashov
f6f24af00a feat(esp_timer): Adds support Linux target 2026-06-11 11:59:25 +03:00
Frantisek Hrbata
dd9e0a4da5 Merge branch 'feat/idf_component_include_optional' into 'master'
feat(cmakev2/component): add OPTIONAL flag to idf_component_include

See merge request espressif/esp-idf!48502
2026-06-11 08:02:58 +02:00