- Fri Aug 21, 2015 1:04 pm
#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"