-->
Page 1 of 2

512kb module memory map & LD file question

PostPosted: Mon Jan 11, 2016 2:39 am
by sharkx
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.

Re: 512kb module memory map & LD file question

PostPosted: Mon Jan 11, 2016 2:43 pm
by jeffrey92
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.

Re: 512kb module memory map & LD file question

PostPosted: Tue Jan 12, 2016 2:30 am
by sharkx
But the flash.bin is about 32k, so the rest up to 64k is just wasted.
Is that space just reserved "just in case" the flash.bin gets larger ? That's quite a waste on such a small memory module...

Re: 512kb module memory map & LD file question

PostPosted: Tue Jan 12, 2016 5:30 am
by jeffrey92
My mistake actually.

Check this PDF:
http://bbs.espressif.com/download/file.php?id=483

If you don't completely use the flash.bin max space you can fill with whatever you like.