forked from espressif/arduino-esp32
initial import
This commit is contained in:
committed by
Ivan Grokhotkov
parent
668acc2c08
commit
5f3a205955
168
tools/sdk/ld/esp32.common.ld
Normal file
168
tools/sdk/ld/esp32.common.ld
Normal file
@ -0,0 +1,168 @@
|
||||
/* Default entry point: */
|
||||
ENTRY(call_start_cpu0);
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
/* Send .iram0 code to iram */
|
||||
.iram0.vectors :
|
||||
{
|
||||
/* Vectors go to IRAM */
|
||||
_init_start = ABSOLUTE(.);
|
||||
/* Vectors according to builds/RF-2015.2-win32/esp108_v1_2_s5_512int_2/config.html */
|
||||
. = 0x0;
|
||||
KEEP(*(.WindowVectors.text));
|
||||
. = 0x180;
|
||||
KEEP(*(.Level2InterruptVector.text));
|
||||
. = 0x1c0;
|
||||
KEEP(*(.Level3InterruptVector.text));
|
||||
. = 0x200;
|
||||
KEEP(*(.Level4InterruptVector.text));
|
||||
. = 0x240;
|
||||
KEEP(*(.Level5InterruptVector.text));
|
||||
. = 0x280;
|
||||
KEEP(*(.DebugExceptionVector.text));
|
||||
. = 0x2c0;
|
||||
KEEP(*(.NMIExceptionVector.text));
|
||||
. = 0x300;
|
||||
KEEP(*(.KernelExceptionVector.text));
|
||||
. = 0x340;
|
||||
KEEP(*(.UserExceptionVector.text));
|
||||
. = 0x3C0;
|
||||
KEEP(*(.DoubleExceptionVector.text));
|
||||
. = 0x400;
|
||||
*(.*Vector.literal)
|
||||
|
||||
*(.UserEnter.literal);
|
||||
*(.UserEnter.text);
|
||||
. = ALIGN (16);
|
||||
*(.entry.text)
|
||||
*(.init.literal)
|
||||
*(.init)
|
||||
_init_end = ABSOLUTE(.);
|
||||
} > iram0_0_seg
|
||||
|
||||
.iram0.text :
|
||||
{
|
||||
/* Code marked as runnning out of IRAM */
|
||||
_iram_text_start = ABSOLUTE(.);
|
||||
*(.iram1 .iram1.*)
|
||||
*libfreertos.a:(.literal .text .literal.* .text.*)
|
||||
*libphy.a:(.literal .text .literal.* .text.*)
|
||||
*librtc.a:(.literal .text .literal.* .text.*)
|
||||
*libpp.a:(.literal .text .literal.* .text.*)
|
||||
*libhal.a:(.literal .text .literal.* .text.*)
|
||||
_iram_text_end = ABSOLUTE(.);
|
||||
} > iram0_0_seg
|
||||
|
||||
/* Shared RAM */
|
||||
.dram0.bss (NOLOAD) :
|
||||
{
|
||||
. = ALIGN (8);
|
||||
_bss_start = ABSOLUTE(.);
|
||||
*(.dynsbss)
|
||||
*(.sbss)
|
||||
*(.sbss.*)
|
||||
*(.gnu.linkonce.sb.*)
|
||||
*(.scommon)
|
||||
*(.sbss2)
|
||||
*(.sbss2.*)
|
||||
*(.gnu.linkonce.sb2.*)
|
||||
*(.dynbss)
|
||||
KEEP(*(.bss))
|
||||
*(.bss.*)
|
||||
*(.share.mem)
|
||||
*(.gnu.linkonce.b.*)
|
||||
*(COMMON)
|
||||
. = ALIGN (8);
|
||||
_bss_end = ABSOLUTE(.);
|
||||
} >dram0_0_seg
|
||||
|
||||
.dram0.data :
|
||||
{
|
||||
_data_start = ABSOLUTE(.);
|
||||
KEEP(*(.data))
|
||||
KEEP(*(.data.*))
|
||||
KEEP(*(.gnu.linkonce.d.*))
|
||||
KEEP(*(.data1))
|
||||
KEEP(*(.sdata))
|
||||
KEEP(*(.sdata.*))
|
||||
KEEP(*(.gnu.linkonce.s.*))
|
||||
KEEP(*(.sdata2))
|
||||
KEEP(*(.sdata2.*))
|
||||
KEEP(*(.gnu.linkonce.s2.*))
|
||||
KEEP(*(.jcr))
|
||||
*(.dram1 .dram1.*)
|
||||
_data_end = ABSOLUTE(.);
|
||||
. = ALIGN(4);
|
||||
_heap_start = ABSOLUTE(.);
|
||||
} >dram0_0_seg
|
||||
|
||||
.flash.rodata :
|
||||
{
|
||||
_rodata_start = ABSOLUTE(.);
|
||||
*(.rodata)
|
||||
*(.rodata.*)
|
||||
*(.irom1.text) /* catch stray ICACHE_RODATA_ATTR */
|
||||
*(.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(.);
|
||||
KEEP (*crtbegin.o(.ctors))
|
||||
KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
|
||||
KEEP (*(SORT(.ctors.*)))
|
||||
KEEP (*(.ctors))
|
||||
__init_array_end = ABSOLUTE(.);
|
||||
KEEP (*crtbegin.o(.dtors))
|
||||
KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
|
||||
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);
|
||||
} >drom0_0_seg
|
||||
|
||||
.flash.text :
|
||||
{
|
||||
_stext = .;
|
||||
_text_start = ABSOLUTE(.);
|
||||
*(.literal .text .literal.* .text.* .stub .gnu.warning .gnu.linkonce.literal.* .gnu.linkonce.t.*.literal .gnu.linkonce.t.*)
|
||||
*(.irom0.text) /* catch stray ICACHE_RODATA_ATTR */
|
||||
*(.fini.literal)
|
||||
*(.fini)
|
||||
*(.gnu.version)
|
||||
_text_end = ABSOLUTE(.);
|
||||
_etext = .;
|
||||
} >iram0_2_seg
|
||||
|
||||
.rtc.text :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
*(.rtc.literal .rtc.text)
|
||||
} >rtc_iram_seg
|
||||
|
||||
.rtc.data :
|
||||
{
|
||||
*(.rtc.data)
|
||||
*(.rtc.rodata)
|
||||
} > rtc_slow_seg
|
||||
}
|
55
tools/sdk/ld/esp32.ld
Normal file
55
tools/sdk/ld/esp32.ld
Normal file
@ -0,0 +1,55 @@
|
||||
/* ESP32 Linker Script Memory Layout
|
||||
|
||||
This file describes the memory layout (memory blocks) as virtual
|
||||
memory addresses.
|
||||
|
||||
esp32.common.ld contains output sections to link compiler output
|
||||
into these memory blocks.
|
||||
|
||||
***
|
||||
|
||||
This linker script is passed through the C preprocessor to include
|
||||
configuration options.
|
||||
|
||||
Please use preprocessor features sparingly! Restrict
|
||||
to simple macros with numeric values, and/or #if/#endif blocks.
|
||||
*/
|
||||
#include "sdkconfig.h"
|
||||
|
||||
MEMORY
|
||||
{
|
||||
/* All these values assume the flash cache is on, and have the blocks this uses subtracted from the length
|
||||
of the various regions. The 'data access port' dram/drom regions map to the same iram/irom regions but
|
||||
are connected to the data port of the CPU and eg allow bytewise access. */
|
||||
|
||||
/* IRAM for PRO cpu. Not sure if happy with this, this is MMU area... */
|
||||
iram0_0_seg (RX) : org = 0x40080000, len = 0x20000
|
||||
|
||||
/* Even though the segment name is iram, it is actually mapped to flash */
|
||||
iram0_2_seg (RX) : org = 0x400D0018, len = 0x330000
|
||||
|
||||
/* Shared data RAM, excluding memory reserved for ROM bss/data/stack.
|
||||
|
||||
Enabling Bluetooth & Trace Memory features in menuconfig will decrease
|
||||
the amount of RAM available.
|
||||
*/
|
||||
dram0_0_seg (RW) : org = 0x3FFB0000 + CONFIG_BT_RESERVE_DRAM,
|
||||
len = 0x50000 - CONFIG_TRACEMEM_RESERVE_DRAM - CONFIG_BT_RESERVE_DRAM
|
||||
|
||||
/* Flash mapped constant data */
|
||||
drom0_0_seg (R) : org = 0x3F400010, len = 0x800000
|
||||
|
||||
/* RTC fast memory (executable). Persists over deep sleep.
|
||||
*/
|
||||
rtc_iram_seg(RWX) : org = 0x400C0000, len = 0x2000
|
||||
|
||||
/* RTC slow memory (data accessible). Persists over deep sleep.
|
||||
|
||||
Start of RTC slow memory is reserved for ULP co-processor code + data, if enabled.
|
||||
*/
|
||||
rtc_slow_seg(RW) : org = 0x50000000 + CONFIG_ULP_COPROC_RESERVE_MEM,
|
||||
len = 0x1000 - CONFIG_ULP_COPROC_RESERVE_MEM
|
||||
}
|
||||
|
||||
/* Heap ends at top of dram0_0_seg */
|
||||
_heap_end = 0x40000000 - CONFIG_TRACEMEM_RESERVE_DRAM;
|
20
tools/sdk/ld/esp32.peripherals.ld
Normal file
20
tools/sdk/ld/esp32.peripherals.ld
Normal file
@ -0,0 +1,20 @@
|
||||
PROVIDE ( UART0 = 0x3ff40000 );
|
||||
PROVIDE ( SPI1 = 0x3ff42000 );
|
||||
PROVIDE ( SPI0 = 0x3ff43000 );
|
||||
PROVIDE ( GPIO = 0x3ff44000 );
|
||||
PROVIDE ( SIGMADELTA = 0x3ff44f00 );
|
||||
PROVIDE ( UHCI1 = 0x3ff4C000 );
|
||||
PROVIDE ( I2S0 = 0x3ff4F000 );
|
||||
PROVIDE ( UART1 = 0x3ff50000 );
|
||||
PROVIDE ( I2C0 = 0x3ff53000 );
|
||||
PROVIDE ( UHCI0 = 0x3ff54000 );
|
||||
PROVIDE ( RMT = 0x3ff56000 );
|
||||
PROVIDE ( PCNT = 0x3ff57000 );
|
||||
PROVIDE ( LEDC = 0x3ff59000 );
|
||||
PROVIDE ( TIMERG0 = 0x3ff5F000 );
|
||||
PROVIDE ( TIMERG1 = 0x3ff60000 );
|
||||
PROVIDE ( SPI2 = 0x3ff64000 );
|
||||
PROVIDE ( SPI3 = 0x3ff65000 );
|
||||
PROVIDE ( I2C1 = 0x3ff67000 );
|
||||
PROVIDE ( I2S1 = 0x3ff6D000 );
|
||||
PROVIDE ( UART2 = 0x3ff6E000 );
|
1841
tools/sdk/ld/esp32.rom.ld
Normal file
1841
tools/sdk/ld/esp32.rom.ld
Normal file
File diff suppressed because it is too large
Load Diff
52
tools/sdk/ld/esp32_out.ld
Normal file
52
tools/sdk/ld/esp32_out.ld
Normal file
@ -0,0 +1,52 @@
|
||||
/* ESP32 Linker Script Memory Layout
|
||||
|
||||
This file describes the memory layout (memory blocks) as virtual
|
||||
memory addresses.
|
||||
|
||||
esp32.common.ld contains output sections to link compiler output
|
||||
into these memory blocks.
|
||||
|
||||
***
|
||||
|
||||
This linker script is passed through the C preprocessor to include
|
||||
configuration options.
|
||||
|
||||
Please use preprocessor features sparingly! Restrict
|
||||
to simple macros with numeric values, and/or #if/#endif blocks.
|
||||
*/
|
||||
/*
|
||||
*
|
||||
* Automatically generated file; DO NOT EDIT.
|
||||
* Espressif IoT Development Framework Configuration
|
||||
*
|
||||
*/
|
||||
MEMORY
|
||||
{
|
||||
/* All these values assume the flash cache is on, and have the blocks this uses subtracted from the length
|
||||
of the various regions. The 'data access port' dram/drom regions map to the same iram/irom regions but
|
||||
are connected to the data port of the CPU and eg allow bytewise access. */
|
||||
/* IRAM for PRO cpu. Not sure if happy with this, this is MMU area... */
|
||||
iram0_0_seg (RX) : org = 0x40080000, len = 0x20000
|
||||
/* Even though the segment name is iram, it is actually mapped to flash */
|
||||
iram0_2_seg (RX) : org = 0x400D0018, len = 0x330000
|
||||
/* Shared data RAM, excluding memory reserved for ROM bss/data/stack.
|
||||
|
||||
Enabling Bluetooth & Trace Memory features in menuconfig will decrease
|
||||
the amount of RAM available.
|
||||
*/
|
||||
dram0_0_seg (RW) : org = 0x3FFB0000 + 0x0,
|
||||
len = 0x50000 - 0x0 - 0x0
|
||||
/* Flash mapped constant data */
|
||||
drom0_0_seg (R) : org = 0x3F400010, len = 0x800000
|
||||
/* RTC fast memory (executable). Persists over deep sleep.
|
||||
*/
|
||||
rtc_iram_seg(RWX) : org = 0x400C0000, len = 0x2000
|
||||
/* RTC slow memory (data accessible). Persists over deep sleep.
|
||||
|
||||
Start of RTC slow memory is reserved for ULP co-processor code + data, if enabled.
|
||||
*/
|
||||
rtc_slow_seg(RW) : org = 0x50000000 + 0,
|
||||
len = 0x1000 - 0
|
||||
}
|
||||
/* Heap ends at top of dram0_0_seg */
|
||||
_heap_end = 0x40000000 - 0x0;
|
Reference in New Issue
Block a user