Re: binary esptool?
Posted: Wed Nov 09, 2016 1:44 am
cmarrin wrote:Thanks. I've seen those and they do pretty much what all the others do, which is they write two binaries, one at 0x00000 and the other at 0x40000. Sometimes the second file is written to 0x10000. I don't see how those addresses relate to the address in my .ld file. And I don't see why it's writing 2 files. I assume the first is a boot loader. But where is it coming from?
From what I understand, the first file (always flashed at 0x0) contains the bootloader (for OTA builds) and the code that remains in RAM permanently. The other file (0x10000) contains the code loaded on demand from flash (irom0_0_seg in the ld script).
Note that the linker script specifies memory locations, not flash sectors. 1MB of the flash chip is memory mapped starting at 0x40200000, so the irom location is 0x40210000 in the ld script instead of 0x10000.