Commit Graph

54282 Commits

Author SHA1 Message Date
Andrey Starodubtsev
75e9adb403 fix(sdmmc): Minor changes in sdmmc
- don't do swapping if result is thrown away
- use correct return code if csd_ver is unknown
- use correct release function

    When `heap_caps_malloc`/`heap_caps_calloc` are used for allocation,
    `heap_caps_free` should be used to release allocated block.
2026-07-24 12:25:57 +03:00
Jiang Jiang Jian
102122904a Merge branch 'bugfix/fix_assignment_error_in_esptouch_v2' into 'master'
fix(wifi): fixed the assignment error in esptouch v2

See merge request espressif/esp-idf!51094
2026-07-23 21:06:47 +08:00
morris
ee2cfdb3f3 Merge branch 'feature/isp-flash-dma-input' into 'master'
feat(isp): add aligned flash DMA input example

See merge request espressif/esp-idf!50959
2026-07-23 19:13:55 +08:00
Chen Ji Chang
5abb8ab351 Merge branch 'test/enable_c61_h4_flash_enc_test' into 'master'
test(flash_enc): enable c61 and h4 flash_enc test

Closes IDF-15964

See merge request espressif/esp-idf!50872
2026-07-23 16:51:51 +08:00
Meet Patel
cd876edf5c Merge branch 'test/idf-additions-withcaps' into 'master'
test(freertos): strengthen IDF additions WithCaps coverage

See merge request espressif/esp-idf!50804
2026-07-23 13:48:18 +05:30
Erhan Kurubas
d1609d3cb1 Merge branch 'add_trace_doc_section' into 'master'
docs(esp_trace): restructure tracing docs with esp_trace as master

Closes DOC-13669

See merge request espressif/esp-idf!50215
2026-07-23 09:31:57 +02:00
Zhang Shuxian
35deba1bd7 docs: Update CN translation for tracing 2026-07-23 09:34:16 +03:00
Konstantin Kondrashov
1ad9da3241 Merge branch 'contrib/github_pr_18825' into 'master'
fix(log): fix out-of-bounds reads in binary log mode's output_pointer() (GitHub PR)

Closes IDFGH-17956

See merge request espressif/esp-idf!50869
2026-07-23 09:21:23 +03:00
Erhan Kurubas
6c6490d54c docs(esp_trace): restructure tracing docs with esp_trace as master
Reorganize the tracing documentation so esp_trace is the master
component, with app_trace, SystemView, and Gcov referenced from it.
2026-07-23 08:58:30 +03:00
Chen Chen
65f0b76eb0 Merge branch 'ci/i2s_enable_flash_enc_test' into 'master'
ci(i2s): test I2S driver on encrypted runner

Closes IDF-15062

See merge request espressif/esp-idf!49232
2026-07-23 12:01:18 +08:00
Island
9211373354 Merge branch 'idf/ble_audio_pts' into 'master'
feat(ble_audio): Miscellaneous update for verifying with PTS cases

See merge request espressif/esp-idf!50156
2026-07-23 11:14:35 +08:00
Wang Meng Yang
a151bc553a Merge branch 'bugfix/low_spp_throughput' into 'master'
change(bt/bluedroid): increased port low watermark of RFCOMM

Closes BTQABR2023-815

See merge request espressif/esp-idf!51031
2026-07-23 10:50:57 +08:00
Wang Meng Yang
e61ef3e4a4 Merge branch 'change/refactor_hidh_datapath' into 'master'
Change/refactor hidh datapath

Closes IDFGH-17363

See merge request espressif/esp-idf!49615
2026-07-23 10:47:19 +08:00
zhangyanjiao
6a4fb7e546 fix(wifi): fixed the assignment error in esptouch v2 2026-07-23 10:45:24 +08:00
morris
d9a0829c27 Merge branch 'fix/riscv_trace_rcc_atomic' into 'master'
fix(riscv_trace): protect shared RCC register access with PERIPH_RCC_ATOMIC

See merge request espressif/esp-idf!51072
2026-07-23 10:29:54 +08:00
Wang Meng Yang
1860ef6b7f Merge branch 'bugfix/bredr_acl_uflow_deadlock' into 'master'
fix(bt): Fixed blocking during LMP packet_type negotiation on ESP32-S31

Closes IDFGH-17903

See merge request espressif/esp-idf!51067
2026-07-23 10:08:03 +08:00
Mahavir Jain
14b8e87188 Merge branch 'fix/disable-key-mgr' into 'master'
Disable Key Manager support

See merge request espressif/esp-idf!50311
2026-07-22 20:48:35 +05:30
harshal.patil
a7b29bfda9 change(security): disable Key Manager support on ESP32-C5/P4/S31
The Key Manager hardware peripheral in its current form needs further
design changes before it can be offered as a production feature.
Until a revised peripheral design is available, withdraw ESP-IDF
support for it on all Key Manager capable targets.
2026-07-22 19:58:23 +05:30
Liu Linyan
4362a3116f feat(ble_audio): Miscellaneous update for verifying with PTS cases 2026-07-22 20:38:57 +08:00
Peter Marcisovsky
811289c6ba Merge branch 'fix/usb_device_light_sleep_example' into 'master'
fix(usb_device_example): Remove non-existing tinyusb reset weak callback

See merge request espressif/esp-idf!49896
2026-07-22 13:48:38 +02:00
peter.marcisovsky
8a9a79468e fix(usb_device_example): Remove non-existing tinyusb reset weak callback 2026-07-22 19:41:02 +08:00
morris
49fba58f08 fix(riscv_trace): protect shared RCC register access with PERIPH_RCC_ATOMIC
riscv_trace_ll_enable_bus_clock and riscv_trace_ll_reset_register operate
on shared HP_SYS_CLKRST registers and were called concurrently from both
cores during SECONDARY init, creating RMW race conditions.

Move the clock/reset logic out of the HAL layer into
esp_riscv_trace_early_init, protected by PERIPH_RCC_ATOMIC() spinlock.
Wrap the LL functions with macros that enforce the caller must be inside
a PERIPH_RCC_ATOMIC() critical section at compile time.
2026-07-22 19:02:58 +08:00
Chen Ji Chang
1421a250a2 Merge branch 'doces/add_pcnt_pull_migreation_guide' into 'master'
docs(pcnt): add gpio pull mode migration guide

Closes IDFGH-18004

See merge request espressif/esp-idf!51009
2026-07-22 19:01:23 +08:00
Konstantin Kondrashov
217fc2b7e5 Merge branch 'fix/esp_timer_task_dispatch_wedge' into 'master'
fix(esp_timer): Fix esp_timer task dispatch stall

Closes IDFGH-17935

See merge request espressif/esp-idf!50788
2026-07-22 13:47:58 +03:00
Wang Mengyang
53b357790b fix(bt): Fixed blocking during LMP packet type negotiation on ESP32-S31
In the Bluetooth connections with some smartphones, communication can possibly be blocked
during packet type negotation, when ESP32-S31 attempts to finalize the ACL-U transmission
and waits for the last Tx ACL-U packet to be transmitted, but peer device rejects the
packet with FLOW=STOP in its packet, thus causing a deadlock.

Closes https://github.com/espressif/esp-idf/issues/18797
2026-07-22 16:41:08 +08:00
Roland Dobai
480d5f2559 Merge branch 'chore/remove_old_root_managed_components_tests' into 'master'
chore: Remove old root managed components tests

See merge request espressif/esp-idf!51047
2026-07-22 10:36:58 +02:00
Ivan Grokhotkov
d3766ffdea Merge branch 'feature/build-file-command' into 'master'
feat: add idf.py build-file command for standalone C files

Closes IDF-15453

See merge request espressif/esp-idf!47618
2026-07-22 10:34:38 +02:00
Jiang Jiang Jian
ade59336b6 Merge branch 'bugfix/fix_crash_issue_on_esptouch_v2' into 'master'
fix(wifi): added validation for password and reserved data length in ESPTouch v2

Closes WIFI-7448, WIFI-7484, WIFI-7482, and WIFI-7444

See merge request espressif/esp-idf!50110
2026-07-22 16:27:15 +08:00
morris
44247cf304 Merge branch 'refactor/extract-esp_hal_debug_assist' into 'master'
refactor(hal): extract assist_debug, debug_probe and trace into esp_hal_debug_assist

See merge request espressif/esp-idf!50968
2026-07-22 16:15:13 +08:00
Wang Meng Yang
cfb35e1a4a Merge branch 'bugfix/idf_ci_example_avrcp' into 'master'
fix(bt/example): Add log in the failure path for avrcp_ct_metadata example

Closes IDFCI-10118

See merge request espressif/esp-idf!50651
2026-07-22 15:16:25 +08:00
Chen Jichang
f0fd8fb0d0 docs(pcnt): add gpio pull mode migration guide
Closes https://github.com/espressif/esp-idf/issues/18862
2026-07-22 14:47:22 +08:00
liqigan
0564b09e86 fix(bt/bluedroid): Fixed use after free issue on osi_event_delete 2026-07-22 14:41:20 +08:00
liqigan
39b4b3f329 fix(bt/bluedroid): Fixed HID host reconnection bug and enabled load HID devices
Closes https://github.com/espressif/esp-idf/issues/18335
2026-07-22 14:41:20 +08:00
liqigan
540a4216df change(bt/bluedroid): Refactored HCI ACL datapath 2026-07-22 14:41:20 +08:00
liqigan
db12b3c279 change(bt/bluedroid): Refactored HID host datapath 2026-07-22 14:41:18 +08:00
Wang Meng Yang
bc428c91d5 Merge branch 'bugfix/bredr_critical_bugs' into 'master'
bugfix: fix issues raised from AI review

See merge request espressif/esp-idf!49755
2026-07-22 14:31:28 +08:00
Island
904d960cd6 Merge branch 'fix/ble-log-store-access-fault' into 'master'
fix: Ensure BLE Log Global Variables in Internal RAM

See merge request espressif/esp-idf!51024
2026-07-22 14:02:23 +08:00
Konstantin Kondrashov
35e5def13c Merge branch 'fix/bootloader_log_format_drom_vaddr' into 'master'
fix(bootloader): use correct format specifier for MMU_LL_END_DROM_ENTRY_VADDR

Closes IDFGH-17999

See merge request espressif/esp-idf!50927
2026-07-22 08:59:12 +03:00
Konstantin Kondrashov
66b5056f23 fix(bootloader): use correct format specifier for MMU_LL_END_DROM_ENTRY_VADDR 2026-07-22 08:59:11 +03:00
Ivan Grokhotkov (bot)
b3a0e166fe feat: add compile_options support to idf.py build-file
Allow specifying extra compiler flags (warning flags, preprocessor
definitions, etc.) via a new 'compile_options' entry in the
idf-build-file frontmatter. The options are applied to the source
file via target_compile_options in the generated main component
CMakeLists, with CMake quoting so that flags like -DMSG="hello world"
reach the compiler exactly as written.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-21 22:04:41 +02:00
Ivan Grokhotkov
16275df0a1 feat: add idf.py build-file command for standalone C files
Add a new idf.py extension that allows building standalone C files
without requiring full project boilerplate. Source files can include
optional YAML frontmatter in block comments to specify sdkconfig
options, component dependencies, and target configuration.

When the frontmatter configuration changes, the stale sdkconfig is
removed so the new defaults are applied, and a target change also
clears the build directory since IDF_TARGET is pinned in the CMake
cache.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-21 22:04:41 +02:00
Konstantin Kondrashov
10f8b195b0 Merge branch 'fix/log-unsigned-msec-format' into 'master'
fix(log): use unsigned format specifier for esp_log_system_timestamp msec

See merge request espressif/esp-idf!50989
2026-07-21 18:32:49 +03:00
Konstantin Kondrashov
95bba8e982 Merge branch 'fix/heap-trace-calloc' into 'master'
fix(heap): trace heap_caps_calloc allocations in standalone heap tracing

Closes IDF-15995

See merge request espressif/esp-idf!50990
2026-07-21 17:55:53 +03:00
Daniel Paul
ee93f899c2 chore: Remove old root managed components tests 2026-07-21 16:01:27 +02:00
yi chen
62e507ab8e fix(log): fix out-of-bounds reads in binary log for buffer log apis
- Fix MAX(len,2) reading beyond buffer when len=1
- Fix buffer_len=0 ambiguity with strlen fallback
- Add BUFFER_LEN_NOT_SET sentinel (-1)
- Read exactly len bytes, not forced minimum

Merges https://github.com/espressif/esp-idf/pull/18825
2026-07-21 16:47:50 +03:00
Konstantin Kondrashov
268a9b071f Merge branch 'fix/esp-event-security-fixes' into 'master'
fix(esp_event): multiple security and stability fixes

Closes SEC-064, SEC-219, SEC-220, SEC-221, SEC-222, and IDFGH-17955

See merge request espressif/esp-idf!50442
2026-07-21 16:27:51 +03:00
Adam Múdry
b1755caa63 Merge branch 'fix/sdmmc_bdl_casting' into 'master'
fix(sdmmc): BDL calculate sectors cast fix

Closes IDFGH-18017

See merge request espressif/esp-idf!51039
2026-07-21 15:15:33 +02:00
Konstantin Kondrashov
82e6c831e7 fix(esp_event): free queued legacy cleanup ctx on loop delete
When a loop is deleted while an internal legacy "cleanup" event is still
queued (posted by a deferred self-unregistration from within a handler),
esp_event_loop_delete() drained the queue but only freed the post payload,
leaking the heap copy of the handler context allocated for the legacy path.

Free ctx->handler_ctx for queued legacy cleanup events while draining the
queue, mirroring the cleanup done in esp_event_loop_run().

Add a regression test that leaves a legacy cleanup event queued and asserts
no memory is leaked on loop deletion.
2026-07-21 15:33:47 +03:00
Konstantin Kondrashov
e8ffb477a0 fix(esp_event): clear running_task before releasing mutex on tick timeout
When esp_event_loop_run() exited via the ticks-expired break path,
loop->running_task was left pointing to the current task handle.
Any subsequent trylock in esp_event_handler_unregister_with_internal()
would see a stale non-NULL running_task and take the wrong code path.
2026-07-21 15:25:58 +03:00
Konstantin Kondrashov
9d2d32524b fix(esp_event): prevent UAF race between post and loop delete (SEC-222)
esp_event_post_to() could access loop->queue / loop->mutex after
esp_event_loop_delete() freed them when both ran concurrently.

Introduce esp_event_loop_state_t with:
- posts_in_flight: reference-count incremented atomically (under
  state.lock spinlock) before touching any loop resources, decremented
  on every exit path via goto on_err.
- deleting: atomic_bool set by esp_event_loop_delete() to block new
  posts from entering the critical section.

esp_event_loop_delete() sets deleting=true, then busy-waits (releasing
and re-acquiring loop->mutex each tick) until posts_in_flight reaches
zero before proceeding with teardown.

esp_event_isr_post_to() performs a lock-free atomic_load of deleting as
a best-effort guard; ISR context cannot participate in the spinlock
protocol but the window is documented and accepted.
2026-07-21 15:25:58 +03:00