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

User avatar
By kolban
#26712 Thanks for the response. I dug into the Arduino files that I found at:

C:\Users\<User>\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\1.6.5-947-g39819f0\tools\sdk\ld

See the attached image.

What is the thinking between eagle.flash.1m512.ld and eagle.flash.512k.ld? Are there any docs on how to interpret these files?

2015-08-21_12-18-06.png


Neil
You do not have the required permissions to view the files attached to this post.
User avatar
By martinayotte
#26714 Linker scripts are used by the linker to tell him how to build the final layout of the binary. It is not only in the ESP context, but almost any MCUs, such as STM32s or NXP LPCs. It defines sections for RAM/Flash, etc.
You can found lot of docs on the net, such as http://www.eecs.umich.edu/courses/eecs3 ... Linker.pdf .
But those readings are often producing headaches to the reader ... ;)
I don't have tendencies to touch much those files without knowing what I'm doing, I'm simply used the ones provided by experts. :)
In case of the ArduinoESP, for example eagle.flash.512k.ld, it clear shows that the length of irom0 is limited to 0x69ff0, because addresses 0x6B000 and above are reserved for SPIFFS filesystem and EEPROM emulation.

Code: Select all/* Flash Split for 512K chips */
/* sketch 423KB */
/* spiffs 64KB */
/* eeprom 20KB */

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 = 0x40201010, len = 0x69ff0
}

PROVIDE ( _SPIFFS_start = 0x4026B000 );
PROVIDE ( _SPIFFS_end = 0x4027B000 );
PROVIDE ( _SPIFFS_page = 0x100 );
PROVIDE ( _SPIFFS_block = 0x1000 );

INCLUDE "../ld/eagle.app.v6.common.ld"
User avatar
By kolban
#26756 Thank you!!! The light bulb finally glowed dimly for me and then got brighter and brighter ... I still doubt I'm over 25W ... but at least I can see now.

Neil