You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

65 lines
1.2 KiB

/*
* GNU linker script for Espressif ESP32
*/
/* Default entry point */
ENTRY( call_start_cpu0 );
/* Specify main memory areas */
MEMORY
{
/* Use values from the ESP-IDF 'bootloader' component.
/* TODO: Use human-readable lengths */
/* TODO: Use the full memory map - this is just a test */
iram_seg ( RX ) : ORIGIN = 0x40080400, len = 0xFC00
dram_seg ( RW ) : ORIGIN = 0x3FFF0000, len = 0x1000
}
/* Define output sections */
SECTIONS {
/* The program code and other data goes into Instruction RAM */
.iram.text :
{
. = ALIGN(16);
KEEP(*(.entry.text))
*(.text)
*(.text*)
KEEP (*(.init))
KEEP (*(.fini))
*(.rodata)
*(.rodata*)
. = ALIGN(4);
_etext = .;
} >iram_seg
/* Initialized data goes into Data RAM */
_sidata = .;
.data : AT(_sidata)
{
. = ALIGN(4);
_sdata = .;
*(.data)
*(.data*)
. = ALIGN(4);
_edata = .;
} >dram_seg
/* Uninitialized data also goes into Data RAM */
.bss :
{
. = ALIGN(4);
_sbss = .;
*(.bss)
*(.bss*)
*(COMMON)
. = ALIGN(4);
_ebss = .;
} >dram_seg
. = ALIGN(4);
PROVIDE ( end = . );
PROVIDE ( _end = . );
}