Wrap MWDT-related code under SOC_WDT_SUPPORTED so targets without a main
watchdog can compile.
Add SOC_RTC_WDT_SUPPORTED for RTC watchdog usage (bootloader, slow-clock
paths) and regenerate Kconfig.soc_caps.in. Bootloader RWDT setup stays
under SOC_RTC_WDT_SUPPORTED; MWDT flashboot teardown stays under
SOC_WDT_SUPPORTED.
ESP_INT_WDT, ESP_TASK_WDT_EN, and BOOTLOADER_WDT_ENABLE depend on
SOC_WDT_SUPPORTED where applicable. Build xt_wdt.c only when
SOC_XT_WDT_SUPPORTED. Provide no-op panic WDT helpers when
SOC_WDT_SUPPORTED is disabled.
The super WDT was firing during bootloader init because auto-feed was
not enabled, causing continuous resets with rst:0x12 (SUPER_WDT_RESET).
Made-with: Cursor
When CONFIG_APP_BUILD_TYPE_RAM is set (loadable ELF app build),
bootloader_support was adding micro-ecc to priv_requires. The micro-ecc
component lives in the bootloader subproject and is not available in
normal app builds with cmakev2, causing component resolution to fail
when built for a build system v2 project.
micro-ecc is only needed for secure boot sources built under
BOOTLOADER_BUILD (secure_boot_signatures_bootloader.c). For app builds
with CONFIG_APP_BUILD_TYPE_RAM we do not build those sources, so
only add micro-ecc to priv_requires when BOOTLOADER_BUILD is set.
The bounds check `pos->offset + pos->size > chip_size` can silently
wrap around when both offset and size are large uint32_t values,
bypassing the validation entirely.
Use `pos->size > chip_size - pos->offset` instead, which is safe
because pos->offset <= chip_size is already verified by the first
condition in the same expression.
Found via https://github.com/Eun0us/esp-fuzzer
This commit reorganizes SPI flash header files to better reflect their
visibility and intended usage:
1. Rename `esp_flash_port/` to `esp_flash_chips/`:
- Better reflects that these headers are for chip driver implementations
- All chip driver headers moved to `esp_flash_chips/` directory
- Added README.md explaining semi-public nature of these headers
2. Move internal headers to `esp_private/`:
- `esp_flash_internal.h` -> `esp_private/esp_flash_internal.h`
- `memspi_host_driver.h` -> `esp_private/memspi_host_driver.h`
3. Move chip driver related headers to `esp_flash_chips/`:
- `esp_private/esp_flash_types.h` -> `esp_flash_chips/esp_flash_types.h`
- `spi_flash/spi_flash_defs.h` -> `esp_flash_chips/spi_flash_defs.h`
- `spi_flash_override.h` -> `esp_flash_chips/spi_flash_override.h`
- All `spi_flash_chip_*.h` headers moved to `esp_flash_chips/`
4. Code improvements:
- Remove unused includes (e.g., `spi_flash_override.h` from `cache_utils.c`)
- Use public API `esp_flash_get_size()` instead of direct member access
- Add `esp_flash_is_quad_mode` to linker.lf for IRAM placement
5. Documentation updates:
- Add README.md in `esp_flash_chips/` explaining semi-public headers
- Update programming guide with warnings about internal headers
- Update both English and Chinese documentation
6. Update all references across the codebase:
- Update includes in `spi_flash` component
- Update `bootloader_support`, `app_update`, `esp_tee`, `espcoredump`
- Update example projects
Breaking changes:
- Headers moved to new locations require include path updates
- `custom_flash_driver` example temporarily disabled until external
components are updated
feat(hal): graduate rtc_cntl_timer/lp_timer hal/ll into a new component: esp_hal_rtc_timer and unify naming
Closes IDF-15045
See merge request espressif/esp-idf!44573
Mostly helpful in testing scenarios. The newly added config
SECURE_BOOT_REQUIRE_ALREADY_ENABLED will ensure the SB feature must
already be enabled, otherwise the bootloader simply fails to boot.