-->
Page 1 of 2

what is inside eagle.flash.bin?

PostPosted: Mon Dec 21, 2015 5:16 am
by esp03madness
Friends, I was wondering if anyone could give me a hint on how to look at what is inside the .bin files produced by the SDK? (eagle.flash.bin and eagle.irom0text.bin)

Naively, I've tried to use objdump on them, but of course that did not work.

Re: what is inside eagle.flash.bin?

PostPosted: Wed Dec 23, 2015 11:57 am
by dkinzer
esp03madness wrote:Friends, I was wondering if anyone could give me a hint on how to look at what is inside the [...] eagle.flash.bin and eagle.irom0text.bin.
The file sometimes named eagle.flash.bin (the name is unimportant, of course) is the one that is loaded into the Flash chip at address 0x000000. The content of that file is a composite image with code destined for the Instruction RAM (0x40100000) and initialization data destined for User Data RAM (0x3ffe8000). You can find a description of the format of that image in various places including at the page below - scroll down the page until you find "Firmware image format".

https://github.com/themadinventor/esptool

The content of the file sometimes named eagle.irom0text.bin (again, the name is unimportant) is just a raw binary image of all of the functions (and read-only data) that reside in the irom0 section. The Flash address of this image depends on how the linker script is written but it is often loaded at 0x40000 of the Flash chip for a non-OTA configuration. As the functions are needed, they are copied to the Instruction RAM Cache.

In both cases, you should be able to examine the file content using the Linux command od or a hexadecimal file editor/viewer.

Re: what is inside eagle.flash.bin?

PostPosted: Thu Dec 24, 2015 1:08 am
by esp03madness
Don, thank you for an excellent answer!

Re: what is inside eagle.flash.bin?

PostPosted: Fri Dec 25, 2015 1:47 am
by esp03madness
One more question ;)

Since the bulk of the code is stored in the flash, how does the caching work? Does it mean that the first access to a non-cached function results in a CPU stall?