platformio / platform-espressif8266

Espressif 8266: development platform for PlatformIO
https://registry.platformio.org/platforms/platformio/espressif8266
Apache License 2.0
330 stars 219 forks source link

ESP8266 Flash usage increased (notably) in 2.6.3 compared to 2.6.2 #244

Closed gnalbandian closed 3 years ago

gnalbandian commented 3 years ago

Hi. I updated Espressif 8266 platform to 2.6.3, from 2.6.2 and notice a huge increse in flash consumption for the same program.

Compiled with 2.6.2 image

Compiled with 2.6.3 image

Anyone else have notice this behavior?

gnalbandian commented 3 years ago

Just as I submitted this, I realize the issues is not the consumed flash, but the total amount available recognized by the compiler. In my platformio.ini I don't have defined the flash size. I am using an ESP-07 with 32mbit flash (4M). Somehow, 2.6.2 seemed to picked up the flash size correctly form my definition of "board = esp07", but 2.6.3 failed at this.

Any hint on how to fix this?

I have tried compiling with build_flags = -Wall, -esp8266.flash.4m.ld and later with build_flags = -Wall, -esp8266.flash.4m1m.ld, but in both cases failed to achieved the same values as in 2.6.2.

gnalbandian commented 3 years ago

FIXED I fixed the issue by addingboard_build.ldscript = eagle.flash.4m.ld at platformio.ini

It seems to me that something have changed at boards definition form 2.6.2 to 2.6.3 that doesn't recognize flash size as it did previusly.

valeros commented 3 years ago

The reason is the PR https://github.com/platformio/platform-espressif8266/pull/204. According to https://www.esp8266.com/wiki/doku.php?id=esp8266-module-family#summary_table ESP-07 only has 1MB. In you case you need to use ESP-07S.