[code]MEMORY
{
dport0_0_seg : org = 0x3FF00000, len = 0x10
dram0_0_seg : org = 0x3FFE8000, len = 0x14000
iram1_0_seg : org = 0x40100000, len = 0x8000
irom0_0_seg : org = 0x40240000, len = 0x3C000
}[/code]
iram1_0_seg is at 0x40100000, irom0_0_seg is at 0x40240000, which means the iram1_0_seg size = 0x140000. I am trying to figure out where the 0x40000 comes from...
esptool.py calculates it as the start address of the irom segment (= 0x40240000) minus 0x40200000 which indeed yields 0x40000. But the logic behind it??? 0x40200000 would be the start of the flash mapping within the esp8266, according to the memory layout map from the wiki.
The only rationale I can think of is that the irom_text is actually always programmed into the second half (> 256k) of the flash. Which would contradict everything I read about it (using the "eagle.app.v6.ld" script).