Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)

User avatar
By esp03madness
#8399 Hi, I was wondering if anyone would be kind enough to explain why the firmware image is in two parts (eg, 0x00000.bin and 0x40000.bin). I know one contains user program code and the other contains the sdk, but there are a couple of questions:

1. why separate the two into different binaries?
2. why the choice of addresses?
3. will 0x00000.bin really written to the 0 address? Where is the bootloader?
4. and just any other info w/ relation to the memory layout on the 8266
5. where is the code for all the .a's? (eg upgrade.a)

Thank you!
User avatar
By jcmvbkbc
#8593
esp03madness wrote:Hi, I was wondering if anyone would be kind enough to explain why the firmware image is in two parts (eg, 0x00000.bin and 0x40000.bin). I know one contains user program code and the other contains the sdk

AFAIK one contains code/data that the bootloader copies to IRAM and runs there, the other is for code/data that always resides in FLASH. The issue is that the bootloader doesn't map FLASH into the CPU address space, the downloaded code must map it.

esp03madness wrote:1. why separate the two into different binaries?
2. why the choice of addresses?
3. will 0x00000.bin really written to the 0 address? Where is the bootloader?
4. and just any other info w/ relation to the memory layout on the 8266
5. where is the code for all the .a's? (eg upgrade.a)

1. not necessary, one file may be used. Done so probably to avoid flashing bits w/o meaningful data.
2. no idea
3. it's written at the offset 0 inside the FLASH. The bootloader is in the ROM at 0x40000000.
4. see https://github.com/esp8266/esp8266-wiki/wiki/Memory-Map
5. that's the problem. Espressif doesn't share the source for it.