2019-12-26 02:25:24 -05:00
|
|
|
/* Simplified memory map for the bootloader.
|
|
|
|
* Make sure the bootloader can load into main memory without overwriting itself.
|
|
|
|
*/
|
2016-08-17 11:08:22 -04:00
|
|
|
|
|
|
|
|
|
|
|
MEMORY
|
|
|
|
{
|
2020-01-21 13:55:35 -05:00
|
|
|
iram_seg (RWX) : org = 0x40050000, len = 0x4000 /* 16KB, SRAM Block_14 */
|
|
|
|
iram_loader_seg (RWX) : org = 0x40054000, len = 0x4000 /* 16KB, SRAM Block_15 */
|
2020-01-16 01:35:55 -05:00
|
|
|
dram_seg (RW) : org = 0x3FFE8000, len = 0x2800 /* 10KB, Top of SRAM Block_16, and before ROM data and stack */
|
2016-08-17 11:08:22 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Default entry point: */
|
|
|
|
ENTRY(call_start_cpu0);
|
|
|
|
|
|
|
|
|
|
|
|
SECTIONS
|
|
|
|
{
|
2018-04-19 00:42:26 -04:00
|
|
|
|
|
|
|
.iram_loader.text :
|
|
|
|
{
|
|
|
|
. = ALIGN (16);
|
2018-08-24 08:26:38 -04:00
|
|
|
_loader_text_start = ABSOLUTE(.);
|
2018-04-19 00:42:26 -04:00
|
|
|
*(.stub .gnu.warning .gnu.linkonce.literal.* .gnu.linkonce.t.*.literal .gnu.linkonce.t.*)
|
|
|
|
*(.iram1 .iram1.*) /* catch stray IRAM_ATTR */
|
|
|
|
*liblog.a:(.literal .text .literal.* .text.*)
|
|
|
|
*libgcc.a:(.literal .text .literal.* .text.*)
|
2018-09-04 22:35:04 -04:00
|
|
|
*libbootloader_support.a:bootloader_common.*(.literal .text .literal.* .text.*)
|
2018-08-16 01:01:43 -04:00
|
|
|
*libbootloader_support.a:bootloader_flash.*(.literal .text .literal.* .text.*)
|
|
|
|
*libbootloader_support.a:bootloader_random.*(.literal .text .literal.* .text.*)
|
2020-02-07 15:35:16 -05:00
|
|
|
*libbootloader_support.a:bootloader_efuse_esp32s2.*(.literal .text .literal.* .text.*)
|
2018-08-16 01:01:43 -04:00
|
|
|
*libbootloader_support.a:bootloader_utility.*(.literal .text .literal.* .text.*)
|
|
|
|
*libbootloader_support.a:bootloader_sha.*(.literal .text .literal.* .text.*)
|
2020-04-30 09:30:15 -04:00
|
|
|
*libbootloader_support.a:bootloader_console_loader.*(.literal .text .literal.* .text.*)
|
2018-08-16 01:01:43 -04:00
|
|
|
*libbootloader_support.a:esp_image_format.*(.literal .text .literal.* .text.*)
|
|
|
|
*libbootloader_support.a:flash_encrypt.*(.literal .text .literal.* .text.*)
|
|
|
|
*libbootloader_support.a:flash_partitions.*(.literal .text .literal.* .text.*)
|
|
|
|
*libbootloader_support.a:secure_boot.*(.literal .text .literal.* .text.*)
|
|
|
|
*libbootloader_support.a:secure_boot_signatures.*(.literal .text .literal.* .text.*)
|
|
|
|
*libmicro-ecc.a:*.*(.literal .text .literal.* .text.*)
|
|
|
|
*libspi_flash.a:*.*(.literal .text .literal.* .text.*)
|
2019-12-26 03:30:03 -05:00
|
|
|
*libsoc.a:wdt_hal_iram.*(.literal .text .literal.* .text.*)
|
2018-11-18 22:36:19 -05:00
|
|
|
*libefuse.a:*.*(.literal .text .literal.* .text.*)
|
2018-04-19 00:42:26 -04:00
|
|
|
*(.fini.literal)
|
|
|
|
*(.fini)
|
|
|
|
*(.gnu.version)
|
2018-08-24 08:26:38 -04:00
|
|
|
_loader_text_end = ABSOLUTE(.);
|
2018-04-19 00:42:26 -04:00
|
|
|
} > iram_loader_seg
|
2018-07-13 01:21:07 -04:00
|
|
|
|
2018-04-19 00:42:26 -04:00
|
|
|
.iram.text :
|
2016-08-17 11:08:22 -04:00
|
|
|
{
|
|
|
|
. = ALIGN (16);
|
|
|
|
*(.entry.text)
|
|
|
|
*(.init.literal)
|
|
|
|
*(.init)
|
|
|
|
} > iram_seg
|
|
|
|
|
|
|
|
|
|
|
|
/* Shared RAM */
|
|
|
|
.dram0.bss (NOLOAD) :
|
|
|
|
{
|
|
|
|
. = ALIGN (8);
|
2020-02-16 00:51:42 -05:00
|
|
|
_dram_start = ABSOLUTE(.);
|
2016-08-17 11:08:22 -04:00
|
|
|
_bss_start = ABSOLUTE(.);
|
|
|
|
*(.dynsbss)
|
|
|
|
*(.sbss)
|
|
|
|
*(.sbss.*)
|
|
|
|
*(.gnu.linkonce.sb.*)
|
|
|
|
*(.scommon)
|
|
|
|
*(.sbss2)
|
|
|
|
*(.sbss2.*)
|
|
|
|
*(.gnu.linkonce.sb2.*)
|
|
|
|
*(.dynbss)
|
2017-07-17 00:37:06 -04:00
|
|
|
*(.bss)
|
2016-08-17 11:08:22 -04:00
|
|
|
*(.bss.*)
|
|
|
|
*(.gnu.linkonce.b.*)
|
|
|
|
*(COMMON)
|
|
|
|
. = ALIGN (8);
|
|
|
|
_bss_end = ABSOLUTE(.);
|
|
|
|
} >dram_seg
|
|
|
|
|
|
|
|
.dram0.data :
|
|
|
|
{
|
|
|
|
_data_start = ABSOLUTE(.);
|
2017-07-17 00:37:06 -04:00
|
|
|
*(.data)
|
|
|
|
*(.data.*)
|
|
|
|
*(.gnu.linkonce.d.*)
|
|
|
|
*(.data1)
|
|
|
|
*(.sdata)
|
|
|
|
*(.sdata.*)
|
|
|
|
*(.gnu.linkonce.s.*)
|
|
|
|
*(.sdata2)
|
|
|
|
*(.sdata2.*)
|
|
|
|
*(.gnu.linkonce.s2.*)
|
|
|
|
*(.jcr)
|
2016-08-17 11:08:22 -04:00
|
|
|
_data_end = ABSOLUTE(.);
|
|
|
|
} >dram_seg
|
|
|
|
|
|
|
|
.dram0.rodata :
|
|
|
|
{
|
|
|
|
_rodata_start = ABSOLUTE(.);
|
|
|
|
*(.rodata)
|
|
|
|
*(.rodata.*)
|
|
|
|
*(.gnu.linkonce.r.*)
|
|
|
|
*(.rodata1)
|
|
|
|
__XT_EXCEPTION_TABLE_ = ABSOLUTE(.);
|
|
|
|
*(.xt_except_table)
|
|
|
|
*(.gcc_except_table)
|
|
|
|
*(.gnu.linkonce.e.*)
|
|
|
|
*(.gnu.version_r)
|
|
|
|
*(.eh_frame)
|
|
|
|
. = (. + 3) & ~ 3;
|
|
|
|
/* C++ constructor and destructor tables, properly ordered: */
|
|
|
|
__init_array_start = ABSOLUTE(.);
|
2018-08-16 01:01:43 -04:00
|
|
|
KEEP (*crtbegin.*(.ctors))
|
|
|
|
KEEP (*(EXCLUDE_FILE (*crtend.*) .ctors))
|
2016-08-17 11:08:22 -04:00
|
|
|
KEEP (*(SORT(.ctors.*)))
|
|
|
|
KEEP (*(.ctors))
|
|
|
|
__init_array_end = ABSOLUTE(.);
|
2018-08-16 01:01:43 -04:00
|
|
|
KEEP (*crtbegin.*(.dtors))
|
|
|
|
KEEP (*(EXCLUDE_FILE (*crtend.*) .dtors))
|
2016-08-17 11:08:22 -04:00
|
|
|
KEEP (*(SORT(.dtors.*)))
|
|
|
|
KEEP (*(.dtors))
|
|
|
|
/* C++ exception handlers table: */
|
|
|
|
__XT_EXCEPTION_DESCS_ = ABSOLUTE(.);
|
|
|
|
*(.xt_except_desc)
|
|
|
|
*(.gnu.linkonce.h.*)
|
|
|
|
__XT_EXCEPTION_DESCS_END__ = ABSOLUTE(.);
|
|
|
|
*(.xt_except_desc_end)
|
|
|
|
*(.dynamic)
|
|
|
|
*(.gnu.version_d)
|
|
|
|
_rodata_end = ABSOLUTE(.);
|
|
|
|
/* Literals are also RO data. */
|
|
|
|
_lit4_start = ABSOLUTE(.);
|
|
|
|
*(*.lit4)
|
|
|
|
*(.lit4.*)
|
|
|
|
*(.gnu.linkonce.lit4.*)
|
|
|
|
_lit4_end = ABSOLUTE(.);
|
|
|
|
. = ALIGN(4);
|
2020-02-16 00:51:42 -05:00
|
|
|
_dram_end = ABSOLUTE(.);
|
2016-08-17 11:08:22 -04:00
|
|
|
} >dram_seg
|
|
|
|
|
2017-06-16 02:30:21 -04:00
|
|
|
.iram.text :
|
2016-08-17 11:08:22 -04:00
|
|
|
{
|
|
|
|
_stext = .;
|
|
|
|
_text_start = ABSOLUTE(.);
|
|
|
|
*(.literal .text .literal.* .text.* .stub .gnu.warning .gnu.linkonce.literal.* .gnu.linkonce.t.*.literal .gnu.linkonce.t.*)
|
2018-04-19 00:42:26 -04:00
|
|
|
*(.iram .iram.*) /* catch stray IRAM_ATTR */
|
2016-08-17 11:08:22 -04:00
|
|
|
*(.fini.literal)
|
|
|
|
*(.fini)
|
|
|
|
*(.gnu.version)
|
|
|
|
_text_end = ABSOLUTE(.);
|
|
|
|
_etext = .;
|
2017-06-16 02:30:21 -04:00
|
|
|
} > iram_seg
|
2016-08-17 11:08:22 -04:00
|
|
|
|
|
|
|
}
|