1350 Commits
Author SHA1 Message Date
Song Ruo Jing 0d714855d1 Merge branch 'feature/esp32s31_flash_timing_tuning' into 'master'
feat(mspi): add 120M flash timing tuning support for esp32s31

Closes IDF-14653

See merge request espressif/esp-idf!50500
2026-10-14 15:57:46 +08:00
Mahavir Jain a05f39efbc Merge branch 'bugfix/image_verify_segment_bounds' into 'master'
fix(esp_image_verify): reject segments extending past the partition before hashing

Closes FCS-1930

See merge request espressif/esp-idf!53547
2026-10-14 11:27:39 +05:30
C.S.M 87c66ad589 feat(vddbat): Add vddbat support for esp32h21, (deepsleep when vol under 3.0V) 2026-10-13 19:05:42 +08:00
Song Ruo Jing 00b57d019c feat(mspi): add 120M flash timing tuning support for esp32s31 2026-10-13 11:30:27 +08:00
C.S.M a33e3f63e4 Merge branch 'feat/vbat_h4_p1' into 'master'
feat(vddbat): Add vddbat protection support on esp32h4 (protection level1)

See merge request espressif/esp-idf!52699
2026-10-13 10:48:57 +08:00
Erhan Kurubas ca07287a71 Merge branch 'fix/riscv_trace_stop_on_reset' into 'master'
fix(esp_system): stop RISC-V trace encoders across resets

See merge request espressif/esp-idf!53391
2026-10-12 09:39:51 +02:00
C.S.M a7717feb1a feat(vddbat): Add vddbat support for esp32h4, (deepsleep when vol under 3.0V) 2026-10-12 14:35:43 +08:00
Mahavir Jain 8829e6b864 fix(esp_image_verify): reject segments extending past the partition before hashing
A corrupted segment data_len was only caught by the image length check
after all segments had been checksummed/hashed. On chips with 32-bit cache
mapping (e.g. ESP32-P4 with CONFIG_BOOTLOADER_CACHE_32BIT_ADDR_QUAD_FLASH)
nothing bounds that walk, so a ~1.8 GB data_len trips the task WDT in the
app and the RTC WDT in the bootloader, which then reset-loops on the
corrupted partition.

Check that each segment header and its data lie inside the partition
before processing the segment data.
2026-10-11 14:30:19 +05:30
Erhan Kurubas 0dfcb881b2 fix(esp_system): stop RISC-V trace encoders across resets
A reset does not stop a running trace encoder, which then writes into the next boot's RAM. Stop and
reset the encoders before a software reset and early in the bootloader.
2026-10-08 18:24:07 +02:00
Laukik Hase 35950be70c feat(esp_tee): Add support for TEE image anti-rollback protection 2026-10-01 11:16:39 +05:30
Mahavir Jain 709ca01603 Merge branch 'feat/add_hints_for_security_related_erros' into 'master'
feat(bootloader_support, esp_image_verify): add monitor hints for security errors

See merge request espressif/esp-idf!45402
2026-09-28 11:16:36 +05:30
Harshal Patil c69af134b5 fix(bootloader_support): accept unburnable SPI_DOWNLOAD_MSPI_DIS in release-mode checks
SOC_EFUSE_DIS_DOWNLOAD_MSPI adds SPI_DOWNLOAD_MSPI_DIS to the release-mode criteria.
On ESP32-H2 its write-protection bit is shared with DIS_ICACHE, which first boot already
burns, so devices provisioned by earlier IDF versions can never set it and would report
DEVELOPMENT forever. Treat the field as satisfied when it is write-protected and warn
that MSPI access in download mode stays enabled; an unburned, unprotected field still fails.
2026-09-23 15:56:58 +05:30
nilesh.kale 065a426f7f refactor(bootloader_support): unify secure-boot & flash-encryption secure features
Collapse the 12 non-ESP32 per-target secure_boot/flash_encryption secure-features files
into two shared SOC_EFUSE_*-gated files. ESP32 keeps its own (SBV1 + distinct eFuse family).

Adds SOC_EFUSE_DIS_DOWNLOAD_MSPI for C5/C61/H4 (they already burned the eFuse; the cap just
drives the unified cache-disable gating). eFuse-write behavior verified identical.
2026-09-23 15:56:58 +05:30
nilesh.kale 5e65b17cbb fix(bootloader_support): disable UART download cache on ESP32-H21
ESP32-H21 never disabled the UART download MMU cache during flash-encryption enable; the
SPI_DOWNLOAD_MSPI_DIS eFuse field exists but was never burned. Add the burn and the
SOC_EFUSE_DIS_DOWNLOAD_MSPI cap, matching peers (C5/C61/H4/P4/S31).
2026-09-23 15:56:58 +05:30
nilesh.kale e2c710714a fix(bootloader_support): enable XTS-AES pseudo rounds for ESP32-H21
Burn XTS_DPA_PSEUDO_LEVEL efuse on H21 as done for other targets.
2026-09-23 15:56:58 +05:30
nilesh.kale c9f7ed1a1a fix(bootloader_support): disable UART download cache on ESP32-H2
ESP32-H2 never disabled the UART download MMU cache during flash-encryption enable; the
SPI_DOWNLOAD_MSPI_DIS eFuse field exists but was never burned. Add the burn and the
SOC_EFUSE_DIS_DOWNLOAD_MSPI cap, matching peers (C5/C61/H4/P4/S31).
2026-09-23 15:56:58 +05:30
Aditya Patwardhan b0f4c604ee feat(bootloader_support, esp_image_verify): add monitor hints for security errors
Secure Boot, flash encryption and image-integrity failures print an error and
stop, with no indication of the cause or the next step. Add hints.yml to the two
components that emit those messages so idf.py monitor annotates them inline.

The hints live with the components that own the messages rather than in the
global tools/idf_py_actions/hints.yml, matching the existing per-component
hints.yml convention.
2026-09-23 13:44:40 +05:30
morris 193fca5b95 refactor(hal): extract cache && mmu HAL into esp_hal_cache 2026-09-16 21:40:16 +08:00
armando 90dd358dcb feat(mspi): added mspi flash error (aligned with rom) 2026-09-09 14:17:00 +08:00
armando 2cacb0bd56 change(flash): deprecate bootloader_flash_priv.h 2026-09-09 14:17:00 +08:00
armando 6e3abd12a1 refactor(spi_flash): move os layer to esp_mspi and chip configs to spi_flash
Also fixes the implicit dependency on esp_partition.
2026-09-09 14:17:00 +08:00
Konstantin Kondrashov de1e5035b5 feat(app_update): Add auto-confirmation of OTA updates
Enable rollback auto-confirmation by default
2026-09-01 12:53:21 +03:00
Armando (Dou Yiwen) 9726078b55 fix(mpll): improved mpll calibration flow on esp32s31
Signed-off-by: Armando (Dou Yiwen) <douyiwen@espressif.com>
2026-08-24 09:34:36 +08:00
Jiang Jiang Jian 9ad859a1e4 Merge branch 'fix/esp32s31_cpu_clk_src_dependency' into 'master'
fix(esp_hw_support): fix esp32s31 cpu clk src dependency

Closes BT-4455

See merge request espressif/esp-idf!51572
2026-08-20 20:53:03 +08:00
wuzhenghui 4b34a6b250 feat(bootloader): use CPLL/4 as flash default 80M clock source 2026-08-19 16:16:05 +08:00
Mahavir Jain dae3955279 fix(bootloader_support): do not gate application region protection on bootloader config
CONFIG_BOOTLOADER_REGION_PROTECTION_ENABLE is bootloader-scoped;
disabling it must not strip the application's PMP/PMA configuration.
The application now always applies region protection.
2026-08-17 19:23:58 +05:30
Mahavir Jain 8c007f0e03 Merge branch 'feat/bootloader-mbedtls-split-final' into 'master'
feat(esp_image_verify): split image verification out of bootloader_support

Closes IDF-8577 and IDFGH-17033

See merge request espressif/esp-idf!48383
2026-08-13 08:45:58 +05:30
C.S.MandCursor e0c85886b5 fix(bootloader): skip XMC startup for vendor ID 0x46
Chips with RDID vendor 0x46 are not XMC and should not enter the XMC
startup flow via the RDID fast path.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-12 11:45:25 +08:00
Ashish Sharma e7af5c69d9 feat(esp_image_verify): split image verification out of bootloader_support 2026-08-12 08:39:18 +05:30
Marius Vikhammer 81f6360e4d Merge branch 'feat/optimize_bootloader_size' into 'master'
change(bootloader): optimize bootloader size

See merge request espressif/esp-idf!51573
2026-08-06 22:06:38 +08:00
Marius Vikhammer 47262f8e6b change(bootloader): optimize bootloader size
Trim bootloader size by moving some logs to DEBUG. Allows
compiling bootloader on P4 with CONFIG_ESPTOOLPY_FLASHMODE_QIO
without changing partition table offset
2026-08-06 10:01:36 +02:00
Gao Xu db9e5b4d31 Merge branch 'feat/rng_support_h21' into 'master'
H21 RNG support

Closes IDF-11503

See merge request espressif/esp-idf!50061
2026-08-05 14:15:43 +08:00
harshal.patil e1d60fb89f refactor(esp_system): deduplicate ROM fast wake RTC digest reservation
The digest length and the condition that reserves it at the end of RTC RAM were
duplicated in seven places. Hold the reservation in a hidden Kconfig value that
is zero when the feature does not apply, so every consumer subtracts it
unconditionally, and derive ESP_SECURE_BOOT_DIGEST_LEN from it.
2026-07-30 12:20:22 +05:30
wuzhenghui f2b2bac778 fix(esp_system): support rom secure boot fast wake feature for esp32s31 2026-07-28 21:32:45 +08:00
wuzhenghui 90cb8a760d feat(esp_hw_support): disable all unused pll source in rtc_clk_init to save power 2026-07-22 16:32:12 +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
Konstantin Kondrashov 66b5056f23 fix(bootloader): use correct format specifier for MMU_LL_END_DROM_ENTRY_VADDR 2026-07-22 08:59:11 +03:00
morris 26a22512eb refactor(hal): extract assist_debug, debug_probe and trace into esp_hal_debug_assist
Move the following modules from the hal component into a new dedicated
esp_hal_debug_assist component, following the esp_hal_timg pattern:

- assist_debug (hal + target-specific LL headers)
- debug_probe (types + target-specific LL headers)
- riscv_trace (hal + types + source + target-specific LL headers)
- trace_ll (esp32/esp32s2/esp32s3 target-specific LL headers)

Update the following components to depend on esp_hal_debug_assist:
esp_system, riscv, bootloader_support, esp_hw_support, esp_riscv_trace

Remove riscv_trace_hal.c from the hal component.
2026-07-21 11:28:11 +08:00
gaoxu d31a63d246 feat(rng): refactor rng bootloader to rng ll API 2026-07-20 17:15:26 +08:00
Nilesh Kale c3fafbb527 Merge branch 'fix/esp32p4_secure_boot_sig_block' into 'master'
fix(esp32p4): secure boot (ECDSA-P384) and flash encryption eFuse fixes

See merge request espressif/esp-idf!49827
2026-07-17 13:26:34 +08:00
nilesh.kale 15d7329be0 fix(bootloader_support): enable XTS-AES pseudo rounds for ESP32-P4
Burn XTS_DPA_PSEUDO_LEVEL efuse on P4 (rev >= 3.0) as done for other targets.
2026-07-16 15:05:49 +05:30
nilesh.kale 0d29ce3db0 fix(bootloader_support): set SECURE_BOOT_SHA384_EN eFuse on ESP32-P4
Set SECURE_BOOT_SHA384_EN when enabling ECDSA-P384 Secure Boot V2 on
ESP32-P4, as done on C5/H4/S31, so that ROM verifies the bootloader
using the SHA-384 scheme. The eFuse exists only on the rev >= v3.0
eFuse table, so the Kconfig option is gated on rev >= v3.0.
2026-07-16 15:05:04 +05:30
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
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
Ivan Grokhotkov (bot)andClaude Opus 4.8 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
Konstantin Kondrashov 7cac7e0b86 Merge branch 'fix/remove-bootloader-desc-from-app-build' into 'master'
fix(esp_bootloader_format): Remove bootloader description from app build

See merge request espressif/esp-idf!50576
2026-07-10 14:05:55 +03:00
Konstantin Kondrashov 8913d4cf61 fix(esp_bootloader_format): Remove bootloader description from app build
The removed function `esp_bootloader_get_description` never worked in the app build.
It can be used only in the bootloader build.

To read the bootloader description from app, there is another function
`esp_ota_get_bootloader_description`.
2026-07-10 12:17:59 +03:00
Song Ruo Jing 4a94a5a396 fix(stdio): add console input ability when selects ESP_CONSOLE_UART_CUSTOM_NUM_1 2026-07-08 12:08:46 +08:00
morris 651d6a283f refactor(esp_common): centralize ALIGN_UP/ALIGN_DOWN into esp_macros.h
Remove ~50 duplicate local definitions of ALIGN_UP/ALIGN_DOWN/ALIGN_UP_BY/
ALIGN_DOWN_BY across the codebase and replace them with canonical
ESP_ALIGN_UP/ESP_ALIGN_DOWN from esp_macros.h.
2026-07-06 13:36:06 +08:00
Ashish Sharma e09ab205f1 fix(bootloader_support): guard NULL efuse digest slot in secure-boot verify 2026-07-03 17:19:05 +08:00