Commit Graph

37652 Commits

Author SHA1 Message Date
Wan Lei
b6d7b42642 Merge branch 'fix/spi_buslock_unregister_issue' into 'master'
fix(hw_support): spi buslock fix unregister dev api issue

Closes SEC-1147

See merge request espressif/esp-idf!50583
2026-07-17 11:16:41 +08:00
Jiang Jiang Jian
f84166fcdb Merge branch 'bugfix/fix_coex_status_get_issue' into 'master'
fix(coex): fix coex status get issue

Closes WIFIBUG-2018

See merge request espressif/esp-idf!50739
2026-07-17 10:43:57 +08:00
Wang Meng Yang
4b82a06d73 Merge branch 'bugfix/fix_bredr_inq_crash' into 'master'
fix(bt/bluedroid): fix crash during bredr inquiry when zero-addr device is found

Closes WIFI-7491

See merge request espressif/esp-idf!50672
2026-07-17 10:34:54 +08:00
Erhan Kurubas
7a07c33565 Merge branch 'feat/enable_function_tracing' into 'master'
Enable function tracing (-finstrument-functions)

See merge request espressif/esp-idf!49951
2026-07-16 15:57:42 +02:00
Renz Christian Bagaporo
faca8f56a3 Merge branch 'feat/cmakev2_ulp_full_subproject' into 'master'
feat(ulp): initial support for building ULP projects as full subprojects under CMake v2

See merge request espressif/esp-idf!50134
2026-07-16 21:00:32 +08:00
muhaidong
7e5d9825da fix(coex): fix coex status get issue 2026-07-16 20:58:09 +08:00
Jiang Jiang Jian
0112096d1b Merge branch 'fix/fix_coex_iso_cache_error' into 'master'
fix(coex): Fixed BLE iso coex cache error

See merge request espressif/esp-idf!50652
2026-07-16 20:47:31 +08:00
Alexey Lapshin
6fc83f0285 Merge branch 'feat/enable_zb_extensions_for_s31' into 'master'
feat(soc): enable zb* extensions for esp32s31

See merge request espressif/esp-idf!49915
2026-07-16 15:45:47 +04:00
Alexey Lapshin
8a17c206c6 Merge branch 'feature/enable_unused-but-set-variable_errors' into 'master'
change: re-enable -Werror=unused-but-set-variable

See merge request espressif/esp-idf!50725
2026-07-16 15:31:20 +04:00
zhiweijian
27ce1bf703 fix(coex): Fixed BLE iso coex cache error 2026-07-16 17:56:50 +08:00
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
Erhan Kurubas
39d6aaaecb feat(esp_trace): add compiler-instrumented function tracing support 2026-07-16 10:18:25 +02:00
Erhan Kurubas
ed5aeeb4dd change(app_trace): remove GPIO range from UART trace pin config 2026-07-16 10:18:25 +02:00
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
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
Alexey Lapshin
1791325998 change(ci): enable -Werror=unused-but-set-variable 2026-07-16 10:54:36 +07:00
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
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
Alexey Lapshin
2eb2caa8ad feat(soc): enable zb* extensions for esp32s31 2026-07-15 17:39:15 +08: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
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
Renz Bagaporo
5b67ff37cd ci(ulp): temporarily disable legacy ULP apps for buildv2
Keep legacy ULP apps on the CMake v1 build path while buildv2 coverage
is limited to full_subproject ULP apps.

Also add the missing esp_driver_gpio dependency to the esp_pm test app
so buildv2 dependency checks see driver/rtc_io.h explicitly.
2026-07-15 10:17:52 +09:00
Frantisek Hrbata
a9ea4f1105 refactor(ulp): provide a ulp_project.cmake subproject wrapper API
Build ULP full subprojects through a dedicated entry file,
components/ulp/cmake/ulp_project.cmake, that wraps tools/cmakev2/idf.cmake
and layers a small ULP API on top, mirroring the cmakev2 layering:

  ulp_project_init      like idf_project_init (init, detect the ULP type,
                        reset the compile/link options inherited from the app)
  ulp_build_executable  like idf_build_executable, plus the embeddable
                        .bin/.h/.ld artifacts
  ulp_project_default   like idf_project_default (single-executable case)

A child project now includes this one file instead of idf.cmake and calls
these helpers directly, so idf_build_executable is used as-is for the
multi-binary case and the module-path indirection (include(IDFULPProject)
resolved via -DCMAKE_MODULE_PATH) is gone.

As a result:
- IDFULPProjectv2.cmake is removed; its setup moves into the wrapper.
- IDFULPProject.cmake becomes the CMake v1-only entry point.
- The ULP component no longer registers a POST_ELF callback; the binary
  artifacts are produced by ulp_build_executable.
- The v2 full-subproject examples (lp_core, riscv, fsm, multi_binary,
  combined) are updated to the new API.
- The ULP subproject API is documented in build-system-v2.rst.

Also fix a latent bug this exercises: idf_build_library emitted linker
scripts as "-T <name>" relying on a following "-L" search directory. GNU
ld only searches -L directories that precede -T, so the direct
esp32ulp-elf-ld link used for ULP FSM failed to open the script. Emit the
absolute path instead, matching what the CMake v1 ULP build already does.

Finally, replace the parent-argument bypass loop that used to live in
IDFULPProjectv2.cmake with --no-warn-unused-cli on the child configure,
and stop passing the unused IDF_PARENT_BUILD_DIR.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2026-07-15 09:34:05 +09:00
Frantisek Hrbata
ceaa0b7a3d refactor(ulp): use target_linker_script for memory-layout scripts
Rename the ULP memory-layout linker scripts to .ld.in and let the
standard build system preprocess them, instead of the ULP build doing
its own C-preprocessor pass.

CMake v2 (full subproject): register each memory-layout template with
target_linker_script using the new FLAGS (the include dirs its #include
lines need) and MEMORY (emit before section-placement scripts) options.
soc/soc.h and the esp_common headers now resolve from the linked
component graph automatically, so the POST_ELF callback no longer
harvests include directories or preprocesses the template; it only
produces the .bin and the symbol header/linker exports from the ELF.

CMake v1 (legacy): the templates are now .ld.in, so strip the suffix
with NAME_WLE when deriving the generated script name. The v1-only
preprocessing helpers (__ulp_add_preprocessed_linker_script and
__ulp_create_arg_file) move from the shared IDFULPProjectCommon.cmake
to IDFULPProject.cmake next to their only caller, since CMake v2 no
longer references them.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2026-07-15 09:14:35 +09:00
Renz Bagaporo
010ab4ca1f feat(ulp): use cmakev2 linker script preprocessing
Register ULP memory linker scripts with target_linker_script so CMake v2 handles preprocessing and attachment through the component graph.

Keep the generated legacy outputs named .ld by stripping only the .in suffix, and pass full linker script paths to support direct ld invocation.
2026-07-15 09:14:35 +09:00
Renz Bagaporo
7d75f85221 feat(ulp): build ULP full subprojects as CMake v2 children 2026-07-15 09:14:35 +09: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