Discuss here different C compiler set ups, and compiling executables for the ESP8266

User avatar
By sharkx
#38482 Context : trying to build user1/user2 files for updating an 512 Kb module.

The LD file states that the irom0_0_seg size is 0x2B000 which is 172k. The flash.bin file size is just a bit under 32k. This adds up to 204k, which is considerably less than the 236k described in the documentation.

Seems like this is quite a waste of memory space given the 176k space barely leaves any space for your code.

Can anyone share some info about why this is configured like this or how and what impact would have increasing the irom0_0_seg size to get closer to the 236k limit ?

Thanks in advance.
User avatar
By jeffrey92
#38522 AFAIK that is if you are using Espressif's memory mapping for user1/user2 and their bootloader. And it totally depends on which way you choose to map it. But that's why many choose to use a custom bootloader like rboot or just forego a fancy bootoader so you have less constraints. However, I believe depending on the SPI Flash chip size you select during build/flash you still have to account for a couple sections where Espressif has chosen to store WiFi configuration details.

If you're asking what the additional ~30KB is used for. Well, according to their docs, for 512KB, flash.bin can be a max of 64KB and then their is a user param section of 16KB that you can write stuff to if you like. So if you don't wanna waste space, use a custom bootloader.

Better yet, spend $2 and get an ESP-12-E and have 4MB of flash.