Discuss here different C compiler set ups, and compiling executables for the ESP8266

User avatar
By helpme
#41342 This post talks about flashing the AT command firmware.

http://flower-platform.com/2015/12/16/e ... p-by-step/

Image

There are various firmwares to be flashed. How does one know what address to flash for the various firmwares? What are the factors that influence the addresses chosen?
User avatar
By dkinzer
#41385 I posted some information about what goes where in reply to a post on another forum:

http://bbs.espressif.com/viewtopic.php?t=1108

To summarize, there are three main areas of the Flash in most applications (but there may be additional areas for special purposes like using Flash for additional data storage, e.g. SPIFFS). The block that is stored at address 0x0000 in Flash will always be at that address. It contains initialization data for RAM and the code that resides in RAM.

The second major block, typically stored at address 0x40000 in Flash, contains code that will be copied to cache RAM for execution as needed and, optionally, 32-bit aligned constant data used by the app. It can be placed at any convenient address, which address is controlled by the linker script. Except for very special circumstances, it will never be positioned at a Flash address lower than 0x10000. The Flash address for this block is set by the value given for the origin of irom0_0_seg in the linker script. The origin address is calculated by adding 0x40200000 to the desired Flash address. That's why you'll find the following line in the MEMORY section of a typical linker script for a 512KB Flash chip:
Code: Select all  irom0_0_seg :      org = 0x40240000, len = 0x3C000
The length value specified in the line above is (Flash size - 16K - start address) or, in the case of a 512KB flash chip 0x80000 - 16384 - 0x40000. The 16K value represents the size of the System Parameter Area, described below.

The third major block is called the System Parameter Area. It is always located 16K bytes from the end of the Flash chip. If you have a 512KB flash chip it will be at address 0x7c000. Unless you know exactly what you are doing you should always write the esp_init_data_default.bin provided by Espressif to the System Parameter Area.
User avatar
By LayEng
#53037 Hi

I am a new member because I just started to program the esp8266. I was looking at 2 wifi sniffer code. One code will result in the following bin files: 0x00000.bin and 0x40000.bin

Another code will result in these bin files: 0x00000.bin and 0x10000.bin

Which file determines the bin address, meaning why is the second sniffer code bin files not similar to the first?