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.
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.
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.
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.
- Save errno into local before check_socket_write_err_ and HELPER_LOG
to avoid potential clobbering between reads
- Update try_drain() doc: 0 means all-drained or no-progress (callers
only act on -1)
- Include socket/headers.h explicitly for struct iovec
- Move HELPER_LOG after errno check so transient WOULD_BLOCK doesn't
spam very-verbose logs during normal backpressure
- Fix try_drain() docstring: -1 can be EWOULDBLOCK or hard error
(caller distinguishes via errno), 0 means no progress (not would-block)
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
Keep the cheap overflow_buf_.empty() check inline at all call sites.
Move try_drain + HELPER_LOG + error handling into a single out-of-line
drain_overflow_and_handle_errors_() used by both write_raw_ and the
subclass loop() methods. Eliminates the duplicated drain logic.
The base class loop() only drained the overflow buffer. Rename to
make intent clear and inline it so the compiler can optimize across
the call boundary. Make loop() pure virtual since subclasses always
override it.