IRAM0 segment data does not fit

Hi all,

since ESPHome 2025.11 i can no longer build ESPHome for a az-delivery-devkit-v4.

Erros says:

 Successfully created ESP32 image.
 Linking .pioenvs/bpvesp3201/firmware.elf
 /data/cache/platformio/packages/toolchain-xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld: .pioenvs/bpvesp3201/firmware.elf section `.iram0.text' will not fit in region `iram0_0_seg'
 /data/cache/platformio/packages/toolchain-xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld: IRAM0 segment data does not fit.
 /data/cache/platformio/packages/toolchain-xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld: region `iram0_0_seg' overflowed by 348 bytes
 collect2: error: ld returned 1 exit status
 *** [.pioenvs/bpvesp3201/firmware.elf] Error 1

Last working version was ESPHome 2025.10.5, that I could successfully build and install.

Any clues on that? Tried taking out lots of functionality (shrink the image) but no efect at all - always states the same overflow byte amount.
Also ofc cleaned up the build files multiple times :wink:

Thanks and regards

Jakob

Not all reductions affect iram.
Try to reduce your logger level to warn.
Do you use BLE and Camera?

Feel free to post your yaml…

Thanks @Karosm!

Changing the loglevel to warn did not change a thing:

Still exceeding 348 bytes:

/data/cache/platformio/packages/toolchain-xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld: .pioenvs/bpvesp3201/firmware.elf section `.iram0.text' will not fit in region `iram0_0_seg'
/data/cache/platformio/packages/toolchain-xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld: IRAM0 segment data does not fit.
/data/cache/platformio/packages/toolchain-xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld: region `iram0_0_seg' overflowed by 348 bytes
collect2: error: ld returned 1 exit status
*** [.pioenvs/bpvesp3201/firmware.elf] Error 1

Using BLE and third party esphome-jk-bms.

Any further advice on how to shrink iram?

Thanks and regards

Jakob

Took out fallback_ap to potentially save space. Also no change…