ESPHome version 2026.7 - ESP32 RAM size problem?

Since upgrading ESPHome from version 2026.6.5 to 2026.7.1 and later 2026.7.2 I am seeing strange changes in the RAM sizes shown in the installer logs for some ESP32 modules.

Some examples while upgrading ESP32 devices when nothing was changed to the config (so only a new version of ESPHome):

One example is a WEMOS Lolin S2 Mini ESP32-S2 board:
This board has 320 KiB or 327680 bytes of RAM.

With ESPHome version 2026.6.5

Total image size: 997322 bytes (.bin may be padded larger)
RAM: [== ] 15.4% (used 50584 bytes from 327680 bytes)
Flash: [===== ] 54.3% (used 997066 bytes from 1835008 bytes)

With ESPHome version 2026.7.2

Total image size: 1005522 bytes (.bin may be padded larger)
RAM: [======= ] 72.4% (used 124548 bytes from 172032 bytes)
Flash: [===== ] 54.8% (used 1005522 bytes from 1835008 bytes)

So the total amount of available RAM changed from 327680 bytes (which was the correct size) into 172032 bytes (47.5 % less).
And, although nothing was changed in the config, the used RAM size changed from 50584 bytes into 124548 bytes (146 % more).

Another example is a LilyGO TTGO T7 Mini32 V1.3 ESP32 board:
This board has 520 KiB or 532480 bytes of RAM.

With ESPHome version 2026.6.5

Total image size: 1299771 bytes (.bin may be padded larger)
RAM: [= ] 5.3% (used 69968 bytes from 1310720 bytes)
Flash: [======= ] 70.8% (used 1299515 bytes from 1835008 bytes)

With ESPHome version 2026.7.2

Total image size: 1327423 bytes (.bin may be padded larger)
RAM: [====== ] 56.4% (used 70212 bytes from 124580 bytes)
Flash: [======= ] 72.3% (used 1327423 bytes from 1835008 bytes)

So the total amount of available RAM changed from 1310720 bytes into 124580 bytes (90.5 % less).
In this case the true RAM size (532480 bytes) is in between of these two values.
In this case the used RAM size changed from 69968 bytes into 70212 bytes, so that looks normal.

A third example is a Seeed Studio XIAO ESP32-S3 board:
This board has 512 KiB or 524288 bytes of RAM.

With ESPHome version 2026.6.5

Total image size: 1454563 bytes (.bin may be padded larger)
RAM: [== ] 20.6% (used 67516 bytes from 327680 bytes)
Flash: [==== ] 37.0% (used 1454307 bytes from 3932160 bytes)

With ESPHome version 2026.7.2

Total image size: 1484375 bytes (.bin may be padded larger)
RAM: [==== ] 42.9% (used 146519 bytes from 341760 bytes)
Flash: [==== ] 37.7% (used 1484375 bytes from 3932160 bytes)

So the total amount of available RAM changed from 327680 bytes into 341760 bytes (4.3 % more).
But in this case the true RAM size (524288 bytes) is much larger than both these values.
And, although nothing was changed in the config, the used RAM size changed from 67516 bytes into 146519 bytes (117 % more).

Up to now I never saw such large changes to the RAM sizes while upgrading ESPHome to newer versions.

In all these examples I originally did set the exact board types in the esp32 config:

esp32:
  board: lolin_s2_mini
  framework:
    type: esp-idf

esp32:
  board: ttgo-t7-v13-mini32
  framework:
    type: esp-idf
    advanced:
      minimum_chip_revision: '3.0'
      sram1_as_iram: true

esp32:
  board: seeed_xiao_esp32s3
  flash_size: 8MB
  variant: esp32s3
  framework:
    type: esp-idf

I did change this into setting the variant type only (because that appears to be the recommended practice now), but that does not make any difference:

esp32:
#  board: lolin_s2_mini
  variant: esp32s2
  framework:
    type: esp-idf

esp32:
#  board: ttgo-t7-v13-mini32
  variant: esp32
  framework:
    type: esp-idf
    advanced:
      minimum_chip_revision: '3.0'
      sram1_as_iram: true

esp32:
#  board: seeed_xiao_esp32s3
  flash_size: 8MB
  variant: esp32s3
  framework:
    type: esp-idf

It looks like this only happens with ESP32 devices, and not with ESP8266 devices.
I cannot find anything in the version 2026.7.x release notes about any ESP32 RAM usage changes.

As far as I know it is not possible to define the real RAM size in the ESPHome config, or is it?

All these modules appear to be still functioning normally, so it might only be a problem in the install logs. Or can this influence the usage performance of the ESP modules: is all physically available RAM used in reality or not?

Who knows more about this?
Is something changed for the ESP32 RAM usage giving real drastic changes into RAM sizes?

Another observation: although English is not my native language, I think there might be a language mistake in the ESPHome installer logs:

RAM: [==== ] 42.9% (used 146519 bytes from 341760 bytes)

ShouldnΒ΄t this be of instead of from?

RAM: [==== ] 42.9% (used 146519 bytes of 341760 bytes)

English is a funny language. of and from do have different meanings, but there is a large overlap.

This exchange covers it well:

That message is most likely printed by Platform IO, which is what is doing the compiling under the covers.

It used the board configuration file value maximum_ram_size

I think that ESP-IDF is the default compiler now. Maybe the OP should try the toolchain: option and see if that makes a difference.

  • If you have an ESP32 config without an explicit toolchain: setting, it now compiles with native ESP-IDF; add toolchain: platformio to keep the previous behavior

Thanks!
I wasnΒ΄t aware of this toolchain option yet.
After adding the option toolchain: platformio indeed I am back again to the old install logs results.

With my third example in my first post this is are the new results:

esp32:
#  board: seeed_xiao_esp32s3
  flash_size: 8MB
  variant: esp32s3
  toolchain: platformio
  framework:
    type: esp-idf
    version: recommended

Total image size: 1482539 bytes (.bin may be padded larger)
RAM: [== ] 20.7% (used 67800 bytes from 327680 bytes)
Flash: [==== ] 37.7% (used 1482283 bytes from 3932160 bytes)

So both the used and total RAM sizes are back to what these used to be (see my first post).

Looking back with this new information I now think that I know what happened.
Normally I always save all ESPHome installer logs, so I can look back to what I did in the last week or so.
After updating ESPHome from version 2026.6.5 to 2026.7.0 I tried to update one of my ESP8266 boards but got an error message:

INFO ESPHome 2026.7.0
INFO Reading configuration /config/esphome/d1v40-02.yaml…
INFO Generating C++ source…
INFO Compiling app… Build path: /data/build/d1v40-02
Processing d1v40-02 (board: d1_mini; framework: arduino; platform: platformio/[email protected])
Removing unused dependencies…
Library Manager: Removing ArduinoJson @ 7.4.2
Library Manager: [email protected] has been removed!
ERROR: Python version must be between 3.10 and 3.13.
Current Python version: 3.14.6
Supported versions: 3.10, 3.11, 3.12, 3.13

If I remember correctly I also got a message stating that I could solve this by doing a clean of the ESPHome installer data, which I did:

INFO ESPHome 2026.7.0
INFO Reading configuration /config/esphome/d1v40-02.yaml…
WARNING The β€˜web_server’ β€˜auth’ scheme currently defaults to β€˜basic’, which sends the password over the network in an easily reversible form. The default will change to β€˜digest’ in ESPHome 2027.1.0. To keep using basic authentication, set β€˜type: basic’ under β€˜auth:’ explicitly; otherwise set β€˜type: digest’ now to adopt the more secure scheme.
INFO Deleting /data/build/d1v40-02
INFO Deleting /data/idedata/d1v40-02.json
INFO Deleting PlatformIO cache /data/cache/platformio/cache
INFO Done!

But after that I still got the same error about the pyton versions:

Library Manager: [email protected] has been installed!
Library Manager: Resolving dependencies…
ERROR: Python version must be between 3.10 and 3.13.
Current Python version: 3.14.6
Supported versions: 3.10, 3.11, 3.12, 3.13

I think to remember that I then was shown another option: to reset the ESPHome data, which I did:

INFO Cleaning /data
INFO Deleting PlatformIO core_dir /root/.platformio
INFO Done!

This solved the ESP8266 install by then, but after that it appears that now the toolchain was changed by default from platformio to esp-idf for all my ESP32 boards (this is not the case for the ESP8266 boards?).
Also since then it appears that the ESP32 log output is completely different, and the compilation seems to be slower as well.
But after adding the toolchain: platformio option to the ESPHome config this all seems to be back to what it used to be.

So this is all clear now I think, but I still have one question remaining: does the toolchain usage (either platformio or esp-idf) really make such a difference to the used and available amount of RAM? If so, does this influence the performance?
Or is this only a β€œcosmetic” issue in the installer logs?
Who knows more about this?

No, IDF is for esp32.

Can’t say for sure, but likely just numbers calculated/printed different way. Hard to believe IDF performs worst. Some hiccups from switch are possible though..

You can always head off to the ESPHome Github and do a search in issues to see if anyone else has noticed and logged an issue. If not - log one of your own - the worst that can happen is that they close it telling you it’s just the log.

No, there is no real difference - the ESPHome one-line summary is inaccurate when compiling for S3 and S2 with platformio and omits IRAM usage for .text sections (there is different code in ESPHome for PIO and ESP-IDF tool chains to extract that.) If you look at the detailed memory usage table for each compile (both generated by ESP-IDF) you will see minimal difference.

Correct. ESP8266 still uses Arduino via PIO. ESP32 uses ESP-IDF directly by default, or via PIO if that toolchain is selected.

Thank you Clyde!
This is good to know.

So, in fact the RAM usage numbers on this one-line summary are more accurate when using esp-idf then when using platformio.
But these summary numbers are largely different between those two options, so if the shown numbers when using platformio are that inaccurate, and this cannot be improved (or can it?), then wouldn’t it be better to not shown them at all?
Anyway, there is no impact on performance.

Looking back in the compiler logs it indeed appears that the detailed Memory Type Usage Summary table was always almost identical, so only the summary line was different between the ESPHome versions and used toolchains.
For example, again with the Seeed Studio XIAO ESP32-S3 board:

ESPHome 2026.6.5 (apparently with toolchain: platformio):

┏━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Memory Type/Section ┃ Used [bytes] ┃ Used [%] ┃ Remain [bytes] ┃ Total [bytes] ┃
┑━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
β”‚ Flash Code          β”‚      1025792 β”‚          β”‚                β”‚               β”‚
β”‚    .text            β”‚      1025792 β”‚          β”‚                β”‚               β”‚
β”‚ Flash Data          β”‚       317612 β”‚          β”‚                β”‚               β”‚
β”‚    .rodata          β”‚       317356 β”‚          β”‚                β”‚               β”‚
β”‚    .appdesc         β”‚          256 β”‚          β”‚                β”‚               β”‚
β”‚ DIRAM               β”‚       142191 β”‚    41.61 β”‚         199569 β”‚        341760 β”‚
β”‚    .text            β”‚        74675 β”‚    21.85 β”‚                β”‚               β”‚
β”‚    .bss             β”‚        47264 β”‚    13.83 β”‚                β”‚               β”‚
β”‚    .data            β”‚        20100 β”‚     5.88 β”‚                β”‚               β”‚
β”‚    .noinit          β”‚          152 β”‚     0.04 β”‚                β”‚               β”‚
β”‚ IRAM                β”‚        16384 β”‚    100.0 β”‚              0 β”‚         16384 β”‚
β”‚    .text            β”‚        15356 β”‚    93.73 β”‚                β”‚               β”‚
β”‚    .vectors         β”‚         1028 β”‚     6.27 β”‚                β”‚               β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
Total image size: 1454563 bytes (.bin may be padded larger)
RAM:   [==        ]  20.6% (used 67516 bytes from 327680 bytes)
Flash: [====      ]  37.0% (used 1454307 bytes from 3932160 bytes)

ESPHome 2026.7.2 (by default with toolchain: esp-idf):

┏━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Memory Type/Section ┃ Used [bytes] ┃ Used [%] ┃ Remain [bytes] ┃ Total [bytes] ┃
┑━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
β”‚ Flash Code          β”‚      1044820 β”‚          β”‚                β”‚               β”‚
β”‚    .text            β”‚      1044820 β”‚          β”‚                β”‚               β”‚
β”‚ Flash Data          β”‚       324300 β”‚          β”‚                β”‚               β”‚
β”‚    .rodata          β”‚       324044 β”‚          β”‚                β”‚               β”‚
β”‚    .appdesc         β”‚          256 β”‚          β”‚                β”‚               β”‚
β”‚ DIRAM               β”‚       146519 β”‚    42.87 β”‚         195241 β”‚        341760 β”‚
β”‚    .text            β”‚        78703 β”‚    23.03 β”‚                β”‚               β”‚
β”‚    .bss             β”‚        47544 β”‚    13.91 β”‚                β”‚               β”‚
β”‚    .data            β”‚        20120 β”‚     5.89 β”‚                β”‚               β”‚
β”‚    .noinit          β”‚          152 β”‚     0.04 β”‚                β”‚               β”‚
β”‚ IRAM                β”‚        16384 β”‚    100.0 β”‚              0 β”‚         16384 β”‚
β”‚    .text            β”‚        15356 β”‚    93.73 β”‚                β”‚               β”‚
β”‚    .vectors         β”‚         1028 β”‚     6.27 β”‚                β”‚               β”‚
β”‚ RTC SLOW            β”‚           32 β”‚     0.39 β”‚           8160 β”‚          8192 β”‚
β”‚    .force_slow      β”‚           32 β”‚     0.39 β”‚                β”‚               β”‚
β”‚ RTC FAST            β”‚           24 β”‚     0.29 β”‚           8168 β”‚          8192 β”‚
β”‚    .rtc_reserved    β”‚           24 β”‚     0.29 β”‚                β”‚               β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
Total image size: 1484359 bytes (.bin may be padded larger)
RAM:   [====      ]  42.9% (used 146519 bytes from 341760 bytes)
Flash: [====      ]  37.7% (used 1484359 bytes from 3932160 bytes)

ESPHome 2026.7.2 (specifically done with toolchain: platformio):

┏━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Memory Type/Section ┃ Used [bytes] ┃ Used [%] ┃ Remain [bytes] ┃ Total [bytes] ┃
┑━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
β”‚ Flash Code          β”‚      1044064 β”‚          β”‚                β”‚               β”‚
β”‚    .text            β”‚      1044064 β”‚          β”‚                β”‚               β”‚
β”‚ Flash Data          β”‚       323284 β”‚          β”‚                β”‚               β”‚
β”‚    .rodata          β”‚       323028 β”‚          β”‚                β”‚               β”‚
β”‚    .appdesc         β”‚          256 β”‚          β”‚                β”‚               β”‚
β”‚ DIRAM               β”‚       146503 β”‚    42.87 β”‚         195257 β”‚        341760 β”‚
β”‚    .text            β”‚        78703 β”‚    23.03 β”‚                β”‚               β”‚
β”‚    .bss             β”‚        47544 β”‚    13.91 β”‚                β”‚               β”‚
β”‚    .data            β”‚        20104 β”‚     5.88 β”‚                β”‚               β”‚
β”‚    .noinit          β”‚          152 β”‚     0.04 β”‚                β”‚               β”‚
β”‚ IRAM                β”‚        16384 β”‚    100.0 β”‚              0 β”‚         16384 β”‚
β”‚    .text            β”‚        15356 β”‚    93.73 β”‚                β”‚               β”‚
β”‚    .vectors         β”‚         1028 β”‚     6.27 β”‚                β”‚               β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
Total image size: 1482539 bytes (.bin may be padded larger)
RAM:   [==        ]  20.7% (used 67800 bytes from 327680 bytes)
Flash: [====      ]  37.7% (used 1482283 bytes from 3932160 bytes)

I am not clear about the different types of RAM.
In the Espressif ESP32 documentation there is information about the amount of available SRAM, which consists of DRAM and IRAM.
However, I cannot find any info about DIRAM. Could it be that SRAM is meant here?

From the docs: IDF Size - ESP32-S3 - β€” ESP-IDF Programming Guide v6.0.2 documentation

Certain memory types might map to the same hardware memory. On some targets, IRAM and DRAM could be mapped to the same hardware memory but at different virtual addresses, accessible through data and instruction buses. These memory types are referred to as DIRAM in the Memory Type column.

Thanks!
So indeed one could say that DIRAM = DRAM + IRAM = SRAM?
It is funny that in all the memory summary tables on that Espressif site it is never shown as DIRAM, but alweays as IRAM and/or DRAM.

Yes. It seems there is a block of Static RAM that can be accessed as Data and another part that can be accessed as Instructions. The listings you provided don’t really make sense and don’t match what the IDF tool shows.

It doesn’t make sense to have both DIRAM and IRAM sections. That DIRAM sounds like plain DRAM.

It could and really should be fixed, but since ESP-IDF is the default now it’s not a big deal.

The internal RAM is all Static RAM (SRAM) - some is accessible only for data (DRAM) and some for instructions (IRAM) and sometimes it can be accessed both via the data and instructions buses. The distinction varies between different ESP32 variants.