[esp32] Add sram1_as_iram option for +40KB IRAM on original ESP32

Add a new `sram1_as_iram` option under `esp32 > framework > advanced`
that enables CONFIG_ESP_SYSTEM_ESP32_SRAM1_REGION_AS_IRAM, reclaiming
40KB of SRAM1 memory as additional IRAM on the original ESP32.

This requires a bootloader from ESP-IDF v5.1 or later. USB flashing
updates the bootloader automatically, but OTA does not. At boot,
ESPHome now detects the bootloader version and suggests enabling
this option when the bootloader is compatible.
This commit is contained in:
J. Nick Koston
2026-03-16 15:43:51 -10:00
parent 2142bc1b76
commit 2fcf38c53d
4 changed files with 57 additions and 6 deletions
@@ -19,6 +19,7 @@ esp32:
disable_mbedtls_pkcs7: true
disable_regi2c_in_iram: true
disable_fatfs: true
sram1_as_iram: true
wifi:
ssid: MySSID