Commit Graph

37621 Commits

Author SHA1 Message Date
Ashish Sharma
224902efc9 feat(mbedtls): update to version 4.1.1 2026-07-16 14:38:48 +08:00
Meet Patel
bb3406e092 Merge branch 'test/idf-additions-coverage' into 'master'
test(esp_system): relocate FreeRTOS tick hook test

See merge request espressif/esp-idf!50441
2026-07-16 10:00:05 +05:30
Jiang Jiang Jian
eabb439dc0 Merge branch 'fix/esp32s31-static-cpu-retention' into 'master'
esp32s31: fix build failure when CONFIG_PM_CPU_RETENTION_STATIC is enabled

Closes IDFGH-17896

See merge request espressif/esp-idf!50458
2026-07-16 11:38:44 +08:00
morris
f6e69e00fc Merge branch 'bugfix/ana_cmpr_macro' into 'master'
fix(ana_cmpr): Fix swapped POS/NEG cross interrupt masks on ESP32-C5/P4

See merge request espressif/esp-idf!50787
2026-07-16 11:00:40 +08:00
Tiago Medicci
de7ee8f58a test(ana_cmpr): Add edge-specific interrupt direction test case
Add a Unity test case that arms only ANA_CMPR_CROSS_POS (resp. only
ANA_CMPR_CROSS_NEG) on a unit and asserts that a real transition of
the matching direction fires the callback exactly once, while a
transition of the opposite (never-armed) direction does not fire at
all.

This closes a gap in the existing test_apps: none of the current
cases isolate cross direction, so a swapped POS/NEG interrupt mask in
the LL layer (fixed in the previous commit) previously went
undetected.

On the scan-based comparator IP (ESP32-H4/S31), a crossing is only
sampled/latched when a scan is explicitly triggered, so the new test
case also triggers a scan after each level change on that IP, plus
one extra priming scan right after enabling the unit so the internal
compare state starts in sync with the already-set initial GPIO level.

Signed-off-by: Tiago Medicci <tiago.medicci@espressif.com>
2026-07-15 14:46:58 -03:00
Tiago Medicci
cb7b9850c8 fix(ana_cmpr): Fix swapped POS/NEG cross interrupt masks on ESP32-C5/P4/C61
In components/soc/esp32c5/register/soc/gpio_ext_struct.h (ESP32-C5),
components/soc/esp32c61/register/soc/gpio_ext_struct.h (ESP32-C61),
and components/soc/esp32p4/register/hw_ver3/soc/gpio_struct.h
(ESP32-P4), the analog comparator raw/status/enable/clear register
fields are named comp_neg_0_*/comp0_neg_* for bit 0 and
comp_pos_0_*/comp0_pos_* for bit 1, but each field's own comment says
the opposite: bit 0 is documented as "analog comparator pos edge
interrupt raw/status/enable/clear" and bit 1 as the "neg" counterpart.
The LL masks were defined from the field names rather than from this
documented behavior, so ANALOG_CMPR_LL_POS_CROSS_INTR_MASK() ended up
selecting bit 1 and ANALOG_CMPR_LL_NEG_CROSS_INTR_MASK() bit 0.

A new test case, added in the following commit, arms only one cross
direction at a time and checks that a matching transition fires the
callback while the opposite, never-armed direction does not; without
this fix it reproducibly fails on ESP32-C5, ESP32-P4, and ESP32-C61.

Signed-off-by: Tiago Medicci <tiago.medicci@espressif.com>
2026-07-15 14:46:57 -03:00
Mahavir Jain
1b7b298fcf Merge branch 'fix/fix_esp_tee_iv_length_check' into 'master'
fix(esp_tee): extends IV length check and TEE address mapping check

Closes IDF-15940 and IDF-15941

See merge request espressif/esp-idf!50438
2026-07-15 21:58:33 +05:30
Mahavir Jain
23d648df54 Merge branch 'contrib/github_pr_18813' into 'master'
fix(protocomm): free response buffers on 2nd psa_cipher_update failure (GitHub PR)

Closes IDFGH-17940

See merge request espressif/esp-idf!50757
2026-07-15 21:51:40 +05:30
Aditya Patwardhan
e1cc480f8d Merge branch 'fix/keep_use_secure_element_deprecated' into 'master'
fix(esp-tls): Keep deprecated use_secure_element field for compatibility

See merge request espressif/esp-idf!50765
2026-07-15 15:46:26 +05:30
morris
336f0a804f Merge branch 'contrib/github_pr_18821' into 'master'
fix(spi_flash): add #if check for s_mxic_set_required_regs() (GitHub PR)

Closes IDFGH-17953

See merge request espressif/esp-idf!50771
2026-07-15 17:25:17 +08:00
Song Ruo Jing
a2690f81ed Merge branch 'bugfix/ppa_buffer_oob' into 'master'
fix(ppa): add checks for input to avoid any OOB access

See merge request espressif/esp-idf!50696
2026-07-15 17:09:41 +08:00
Alexey Lapshin
37bdc6a827 Merge branch 'fix/bt__unused-but-set-variable_warnings' into 'master'
fix(bt): fix unused-but-set-variable warnings

See merge request espressif/esp-idf!50657
2026-07-15 13:01:45 +04:00
Ivan Grokhotkov
560fb2ab99 Merge branch 'feature/lto-take-2' into 'master'
feat(build): add options to enable link-time optimization (LTO)

Closes IDF-71 and IDFGH-17838

See merge request espressif/esp-idf!50002
2026-07-15 10:45:06 +02:00
morris
ba8b1bf9a1 Merge branch 'feat/uhci_send_multi_buffer' into 'master'
feat(uhci): support transmit multi buffer

Closes IDF-15871

See merge request espressif/esp-idf!50446
2026-07-15 16:41:11 +08:00
Ashish Sharma
aebc7fa691 fix(protocomm): fix response leaks and stale key IDs on error paths 2026-07-15 15:46:58 +08:00
Aditya Patwardhan
8fe74703bc fix(esp-tls): Keep deprecated use_secure_element field for compatibility
Restore the use_secure_element field in esp_tls_cfg_t, esp_tls_cfg_server_t
and httpd_ssl_config_t, and esp_transport_ssl_use_secure_element(), as
deprecated no-ops so that existing code keeps compiling. Setting them now
fails at runtime with ESP_ERR_NOT_SUPPORTED, as the feature is accessed
via the esp_key_config_t interface. To be removed in the next major release.
2026-07-15 12:40:55 +05:30
Gao Xu
2039ee0b8d Merge branch 'isp_dma_one_frame' into 'master'
feat(isp): support isp dma input and add example

Closes IDF-10496

See merge request espressif/esp-idf!46619
2026-07-15 12:24:04 +08:00
morris
50bce17e15 Merge branch 'refactor/move_etm_retention_to_driver_layer' into 'master'
refactor(etm): move ETM retention info from HAL to driver layer

See merge request espressif/esp-idf!50669
2026-07-15 12:07:17 +08:00
Renz Christian Bagaporo
4e8db0e153 Merge branch 'fix/esptimer_dump' into 'master'
fix(esp_timer): possible heap overflow on info dump

Closes SEC-1134

See merge request espressif/esp-idf!50440
2026-07-15 11:48:11 +08:00
He Binglin
fcf2df659d Merge branch 'feat/esp_idf_h4_cut_m2a_analog_wait' into 'master'
Feat/esp idf h4 cut m2a analog wait

See merge request espressif/esp-idf!49061
2026-07-15 11:44:05 +08:00
He Binglin
a82577b080 Merge branch 'feat/esp_idf_h4_support_bus_lowpower' into 'master'
feat(esp_hw_support): support esp32h4 esp32s31 bus hw low power

Closes PM-812

See merge request espressif/esp-idf!50563
2026-07-15 11:31:26 +08:00
Wan Lei
4097b5e3ca Merge branch 'fix/legacy_twai_rx_non_iso_dlc_oob' into 'master'
fix(driver_twai): fixed legacy twai OOB issue when rx dlc larger than 8

See merge request espressif/esp-idf!50673
2026-07-15 10:40:06 +08:00
Ivan Grokhotkov (bot)
8fde15f837 fix(bootloader_support): disable LTO due to linker script rules
bootloader_support relies on linker-script placement that depends on object
file names, which LTO does not preserve. Set the NO_LTO component property so
it is excluded from compile-time LTO.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-14 19:32:19 +02:00
Ivan Grokhotkov (bot)
351abea682 fix(esp_attr): avoid section type conflicts in DRAM_STR under LTO
DRAM_STR placed its backing string in a variable named __c in a section named
after DRAM_ATTR's __COUNTER__ value. Under LTO, when translation units are
merged, two such variables from different units could collide on the same name
and section, producing a "section type conflict" error.

Derive both the variable name and a dedicated .dram1.str subsection from a
single __COUNTER__ value so each DRAM_STR expansion is unique after merging.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-14 19:32:19 +02:00
Ivan Grokhotkov (bot)
493a770d40 feat(build): support LTO in the build system v2 (cmakev2)
Mirror the link-time optimization support into the cmakev2 build system so
that both build systems behave identically.

- project.cmake (__init_project_configuration): emit -flto=auto as a link
  option when CONFIG_COMPILER_LTO_LINKTIME is set, except for bootloader and
  ESP-TEE builds, otherwise keep -fno-lto.

- build.cmake (idf_build_library): when CONFIG_COMPILER_LTO_COMPILETIME is set,
  compile each linked component with -flto=auto unless it has linker fragments,
  is placed by another component's fragment (see tools/cmake/lto.cmake), has
  opted out via NO_LTO, or is not a static library.

- project.cmake: when CONFIG_APP_REPRODUCIBLE_BUILD is also enabled, apply
  the same three flags as the legacy build system to keep LTO output
  reproducible: pass the prefix-map options to the linker (so link-time code
  generation remaps DW_AT_comp_dir), add -save-temps (stable LTRANS object
  names instead of random $TMPDIR paths in the .map), and pin -frandom-seed
  (byte-identical LTO GIMPLE bytecode). See the commit message of
  "feat(build): add options to enable link-time optimization (LTO)" for the
  full analysis.

The gcc-ar / gcc-ranlib selection and the NO_LTO component property are shared
with the legacy build system through tools/cmake/toolchain.cmake and the common
component registration code, so no cmakev2-specific changes are needed there.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-14 19:32:19 +02:00
Radek Tandler
c8da362351 Merge branch 'fix/cleanup_after_failed_nvs_set_blob' into 'master'
Fixed cleanup after nvs_set_blob failed on ESP_ERR_NVS_NOT_ENOUGH_SPACE

See merge request espressif/esp-idf!50702
2026-07-14 12:47:23 +02:00
gaoxu
ea417f202e feat(isp): support isp dma input and add example 2026-07-14 18:15:44 +08:00
hebinglin
7d6c54996a feat(esp_hw_support): support esp32h4 esp32s31 bus hw low power 2026-07-14 18:14:07 +08:00
Erhan Kurubas
4eb0163fb9 Merge branch 'enable_esp32s31_jtag_tests' into 'master'
change(ci): enable esp32s31 jtag tests

Closes IDF-14691, IDF-14692, IDF-14942, and IDFCI-11113

See merge request espressif/esp-idf!50149
2026-07-14 11:39:22 +02:00
hebinglin
e71b30c279 feat(esp_hw_support): add analog_wait calibration in sleep flow for h4 2026-07-14 17:13:32 +08:00
morris
c77798375e Merge branch 'fix/fix_image_header_check' into 'master'
image header: fixed image header segment count check

Closes SEC-1145

See merge request espressif/esp-idf!50654
2026-07-14 17:08:42 +08:00
yi chen
1fa38c2f25 Avoid re-destroying a released Security1 key
The second cipher-update failure destroys the volatile symmetric key but left its identifier cached in session state. Clear it immediately so sec1_close_session() cannot try to destroy the same key again.

Constraint: Follow-up to maintainer review on espressif/esp-idf#18813

Confidence: high

Scope-risk: narrow

Tested: security1.c cross-compiled for ESP32 with Xtensa GCC 14.2.0; test_security1.c compiled with the test app flags; git diff --check

Not-tested: Full master test-app link or on-target execution; local IDF 5.4.3 differs from the PR's master baseline in PSA ABI and Mbed TLS headers
2026-07-14 16:08:42 +08:00
radek.tandler
60561b6d08 fix(nvs_flash): fixed cleanup after nvs_set_blob failed on ESP_ERR_NVS_NOT_ENOUGH_SPACE
- fixed identification of blob parts to be cleaned by using right starting chunk index
  - improved localisation of blobs for cases where some of pages get reclaimed
  - created host test cases covering the edge cases above
2026-07-14 10:01:23 +02:00
Rahul Tank
4ec87dabad Merge branch 'bugfix/fix_bond_store_overflow' into 'master'
fix(nimble): Fix bond-store overflow when IRK is enabled

See merge request espressif/esp-idf!50584
2026-07-14 11:17:27 +05:30
Jiang Jiang Jian
bf4218a71f Merge branch 'bugfix/nan_null_tx' into 'master'
fix(nan): Transmit NULL packet correctly to avoid NDP termination

Closes WIFIBUG-1973 and WIFIBUG-2025

See merge request espressif/esp-idf!50302
2026-07-14 12:27:35 +08:00
Hu Rui
041c59a2a7 feat(uhci): support transmit multi buffer 2026-07-14 11:38:33 +08:00
Island
36d4af40ad Merge branch 'bugfix/fix_bluedroid_read_multi' into 'master'
fix(ble/bluedroid): fix GATT Read Multiple response handling

Closes BLERP-2900

See merge request espressif/esp-idf!49690
2026-07-14 10:28:41 +08:00
Island
fb195f7b50 Merge branch 'bugfix/fix_bluedroid_ext_adv_param_fail_state' into 'master'
fix(ble/bluedroid): preserve ext adv state when set params fails

Closes BLERP-2962 and IDFGH-17144

See merge request espressif/esp-idf!50470
2026-07-14 10:28:30 +08:00
morris
27f14bf666 Merge branch 'refactor/move_lp_spi_ll_and_sar_ctrl_ll_to_components' into 'master'
refactor(hal): move lp_spi_ll.h to esp_hal_gpspi and sar_ctrl_ll.h to esp_hal_ana_conv

See merge request espressif/esp-idf!50677
2026-07-14 10:26:55 +08:00
Wang Meng Yang
4387c693bb Merge branch 'feat/add_lmp_dbg_vendor' into 'master'
feat(bt/controller): Added LMP debug vendor HCI and fixed some bugs ts on ESP32-S31

See merge request espressif/esp-idf!50633
2026-07-14 07:50:25 +08:00
Nilesh Kale
12103321e5 Merge branch 'fix/esp_http_client_parser_errno_dos' into 'master'
fix(esp_http_client): check http_parser errno after execute to avoid DoS loop

See merge request espressif/esp-idf!46181
2026-07-13 18:56:25 +08:00
Guillaume Souchere
7f3f57be96 Merge branch 'fix/console-security-findings' into 'master'
fix(console): Fix security code review findings

Closes SEC-214, SEC-213, SEC-215, SEC-1155, and SEC-1180

See merge request espressif/esp-idf!50474
2026-07-13 12:09:49 +02:00
Gao Xu
31d519d52d Merge branch 'feat/csi_error_event' into 'master'
Add MIPI-CSI error event

Closes IDF-12075

See merge request espressif/esp-idf!49258
2026-07-13 17:59:29 +08:00
morris
4c2395f67b refactor(hal): move lp_spi_ll.h to esp_hal_gpspi and sar_ctrl_ll.h to esp_hal_ana_conv
Move chip-specific LL headers from the hal component to their respective
component directories:
- lp_spi_ll.h (esp32p4, esp32s31) -> esp_hal_gpspi
- sar_ctrl_ll.h (all chips) -> esp_hal_ana_conv
2026-07-13 17:38:55 +08:00
Song Ruo Jing
58cb111de1 fix(ppa): add checks for input to avoid any OOB access 2026-07-13 17:36:22 +08:00
gaoxu
129f11f6d8 ci(csi): added test for MIPI-CSI host error event 2026-07-13 17:25:47 +08:00
Akshat Agrawal
b08e848f46 fix(nan): Transmit NULL packet correctly to avoid NDP termination 2026-07-13 14:51:43 +05:30
morris
ea07001c2c Merge branch 'test/peripheral_drivers_on_real_encryption_runner' into 'master'
test(drivers): run flash encryption apps on real hardware

Closes IDFCI-10377

See merge request espressif/esp-idf!50510
2026-07-13 17:08:43 +08:00
wanckl
6ad4c8fe0e fix(driver_twai): fixed legacy twai OOB issue when rx dlc larger than 8 2026-07-13 16:44:51 +08:00
morris
bedeedafec refactor(etm): move ETM retention info from HAL to driver layer
Move soc_etm_retention_desc_t type definition and soc_etm_retention_info
data from hal component to esp_hw_support component, following the
pattern of other peripheral retention data (e.g. MWDT).

- Create esp_private/etm_retention.h with type and extern declaration
- Create port/<target>/etm_retention.c for each target with retention data
- Remove hal/<target>/etm_periph.c and hal/include/hal/etm_periph.h
- Update esp_etm.c to include the new header
- Update CMakeLists.txt in both components
2026-07-13 15:37:52 +08:00