Commit Graph

54060 Commits

Author SHA1 Message Date
Jiang Jiang Jian
0cd01c19bb Merge branch 'feat/configure_related_154_regs_when_enable_coex' into 'master'
fix(coex): move 15.4 register configuration to 15.4 init

Closes WIFI-7364

See merge request espressif/esp-idf!48956
2026-07-16 17:18:59 +08:00
Laukik Hase
ec08423276 Merge branch 'feat/esp_tee_misc_optim' into 'master'
feat(esp_tee): Restrict REE access to TEE-owned secure storage keys

Closes IDF-15938 and IDFGH-17659

See merge request espressif/esp-idf!50307
2026-07-16 14:00:51 +05:30
Alexey Lapshin
77d9f85b49 Merge branch 'feature/upgrade-esp-rom-elfs' into 'master'
feat(tools): tools: update esp-rom-elf to version 20260528

Closes IDFGH-17393

See merge request espressif/esp-idf!50772
2026-07-16 10:58:04 +04:00
Ji Minxiang
157200447c Merge branch 'feat/ble_ams_dev' into 'master'
feat(examples): add Bluedroid and NimBLE BLE AMS client examples

See merge request espressif/esp-idf!50369
2026-07-16 14:24:56 +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
Xu Si Yu
99ccf7b84c fix(coex): move 15.4 register configuration to 15.4 init 2026-07-16 11:27:08 +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
morris
e6c8e2941d Merge branch 'fix/i2c_u8g2_build_werror' into 'master'
fix(i2c): update u8g2 for GCC 16 build

See merge request espressif/esp-idf!50795
2026-07-16 10:26:18 +08:00
Chen Chen
3c59fcd2cb fix(i2c): update u8g2 for GCC 16 build
Update to an upstream revision that removes variables triggering
-Werror=unused-but-set-variable.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-16 09:57:09 +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
Konstantin Kondrashov
686f522200 Merge branch 'doc/bootloader-anti-rollback-fix' into 'master'
fix(docs): Update bootloader anti-rollback documentation

See merge request espressif/esp-idf!50514
2026-07-15 18:05:00 +03:00
Konstantin Kondrashov
05b65a5b0e fix(docs): Update bootloader anti-rollback documentation 2026-07-15 17:43:55 +03:00
morris
055ba9d3f9 Merge branch 'feat/tusb_msc_example_sdmmc_esp32s31' into 'master'
feat(usb_device): Add SDMMC support for MSC USB Device example for esp32s31 target

See merge request espressif/esp-idf!50304
2026-07-15 18:56:28 +08:00
Samuel Obuch
6c548c4bfd Merge branch 'enable_esp32h4_jtag_tests' into 'master'
change(ci): enable esp32h4 jtag tests

Closes IDFCI-10703

See merge request espressif/esp-idf!50728
2026-07-15 12:34:33 +02:00
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
peter.marcisovsky
1e03246965 feat(usb_device_example): Create per-target sdkconfig.defaults 2026-07-15 11:31:55 +02:00
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
Alexey Lapshin
c4463d7c04 feat(tools): tools: update esp-rom-elf to version 20260528
Closes https://github.com/espressif/esp-idf/issues/18755
2026-07-15 15:58:30 +07: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
Laukik Hase
710d964505 feat(esp_tee): Restrict REE access to TEE-owned secure storage keys 2026-07-15 09:56:26 +05:30
Laukik Hase
5c7d20d80c fix(esp_tee): Miscellaneous optimizations and fixes
Closes https://github.com/espressif/esp-idf/issues/18591
2026-07-15 09:56:25 +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
gaoxu
427fe38df0 feat(isp): Add example and script to check raw picture by ISP dma input 2026-07-15 11:30:49 +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
Island
e4bcbf97f8 Merge branch 'feat/bluedroid_host_example_pytest' into 'master'
test(bluedroid): Add Pytest for BLE Bluedroid Host Example

See merge request espressif/esp-idf!49867
2026-07-15 10:26:27 +08:00
Shen Meng Jing
46d9f9c065 Merge branch 'docs/sync_cn_and_en' into 'master'
docs: Sync CN and EN docs without the translation label

Closes DOC-15056

See merge request espressif/esp-idf!50501
2026-07-15 09:57:02 +08:00
Ivan Grokhotkov (bot)
4c25d4e9ab docs(performance): mention LTO in the optimizing-for-size guide
Document CONFIG_COMPILER_LTO_LINKTIME / CONFIG_COMPILER_LTO_COMPILETIME in the
binary size reduction guide, including the caveats: less accurate per-component
size breakdown, longer build times, incompatibility with custom linker
fragments, and harder debugging.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-14 19:32:19 +02:00
Ivan Grokhotkov (bot)
5e192672a2 ci(system): add startup test config with LTO enabled
Add an opt_os_lto configuration to the startup test app that enables size
optimization together with link-time and compile-time LTO, and run it across
the supported targets so the LTO build is exercised on real hardware in CI.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-14 19:32:19 +02: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
Ivan Grokhotkov (bot)
d20a986999 feat(build): add options to enable link-time optimization (LTO)
Link-time optimization (LTO) lets the compiler inline and optimize across
translation units. ESP-IDF relies heavily on linker-script placement rules
that match object files by name, which LTO does not preserve, so LTO cannot
be enabled for the whole framework. This change adds two opt-in options that
side-step that conflict:

- CONFIG_COMPILER_LTO_LINKTIME tells the linker to perform LTO on any object
  files that carry LTO information (compiled with -flto). On its own this is
  safe: users can add -flto to specific components (e.g. their own libraries)
  to shrink them, without affecting components that use linker fragments.

- CONFIG_COMPILER_LTO_COMPILETIME automatically compiles most
  components with -flto. A component is excluded when it has its own linker
  fragments, when it opts out via the NO_LTO component property, or when its
  object code is placed by *another* component's linker fragment (matched by
  archive name). The last case is handled by tools/cmake/lto.cmake, which
  scans linker fragments for explicit "archive: libNAME.a" placement and
  excludes those components. Without it, functions that must run from IRAM
  while the flash cache is disabled (e.g. the spi_flash / GDMA HAL routines,
  placed in IRAM by spi_flash/esp_driver_dma fragments) would be moved to
  flash by LTO and the device would panic with a cache error at run time.

Both options are disabled for the bootloader and ESP-TEE builds, which depend
on object-file-name based placement. LTO is also gated off for Clang
(needs LLD, IDF-8286) and host builds.

LTO works together with CONFIG_APP_REPRODUCIBLE_BUILD, but needs extra
flags: LTO defers code generation and most debug-info emission from compile
time to link time, where the reproducible-build path remapping (applied to
compile_options only) does not take effect. When both options are enabled,
three extra flags keep the .elf, .bin and .map byte-identical across build
directories (verified on esp32 / GCC 16.1):

- the -f*-prefix-map options are passed to the linker as well, so the LTO
  code generator remaps DW_AT_comp_dir (otherwise the build dir leaks into
  .debug_str, and cascades into esp_app_desc_t.app_elf_sha256 in the .bin);
- -save-temps makes lto-wrapper use stable LTRANS object names in the build
  dir instead of random $TMPDIR paths that leak into the .map;
- -frandom-seed=1 makes LTO GIMPLE bytecode objects byte-identical (a
  shared seed was verified not to collide, including for C++ file-local
  static variables and anonymous namespaces promoted by LTO).

The gcc-ar / gcc-ranlib wrappers are selected in the GCC toolchain file so
that the LTO plugin is loaded when creating and indexing static archives;
plain ar/ranlib do not record LTO symbols in the archive index.

Note: LTO, like other inlining, can also increase binary size. Enable it
together with CONFIG_COMPILER_OPTIMIZATION_SIZE to get a code-size benefit.

Related: IDF-71, IDF-8286

Closes https://github.com/espressif/esp-idf/issues/18741

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-14 18:59:46 +02:00
Erhan Kurubas
8bf9c476cf Merge branch 'fix/coredump_psram_xip' into 'master'
test(coredump): fix psram memory range for esp32s31 and esp32p4

Closes IDF-15623

See merge request espressif/esp-idf!50533
2026-07-14 13:58:45 +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
cdb91d03d5 test(coredump): re-enable extram stack test for esp32p4-rev3 2026-07-14 11:47:14 +02:00