67 lines
1.4 KiB
Plaintext
67 lines
1.4 KiB
Plaintext
|
/* SoC Memory Layout */
|
||
|
MEMORY
|
||
|
{
|
||
|
FLASH : ORIGIN = 0x00000000, LENGTH = 512K
|
||
|
RAM : ORIGIN = 0x20000000, LENGTH = 64K
|
||
|
}
|
||
|
|
||
|
/* Declare the program entrypoint, each sections and variable called from it will not be
|
||
|
discarded by the linker. */
|
||
|
ENTRY(reset_handler);
|
||
|
|
||
|
PROVIDE(reset_handler = default_exception_handler);
|
||
|
PROVIDE(nmi_handler = default_exception_handler);
|
||
|
PROVIDE(hardfault_handler = default_exception_handler);
|
||
|
PROVIDE(memmanager_handler = default_exception_handler);
|
||
|
PROVIDE(busfault_handler = default_exception_handler);
|
||
|
PROVIDE(usagefault_handler = default_exception_handler);
|
||
|
PROVIDE(svcall_handler = default_exception_handler);
|
||
|
PROVIDE(debugmonitor_handler = default_exception_handler);
|
||
|
PROVIDE(pendsv_handler = default_exception_handler);
|
||
|
PROVIDE(systick_handler = default_exception_handler);
|
||
|
|
||
|
SECTIONS
|
||
|
{
|
||
|
_sp_init = ORIGIN(RAM) + LENGTH(RAM);
|
||
|
|
||
|
.vector_table ORIGIN(FLASH) :
|
||
|
{
|
||
|
KEEP(*(.vector_table .vector_table));
|
||
|
} > FLASH
|
||
|
|
||
|
.text :
|
||
|
{
|
||
|
*(.text .text.*);
|
||
|
} > FLASH
|
||
|
|
||
|
.rodata :
|
||
|
{
|
||
|
*(.rodata .rodata.*);
|
||
|
} > FLASH
|
||
|
|
||
|
.bss :
|
||
|
{
|
||
|
. = ALIGN(4);
|
||
|
_bss_section_start = .;
|
||
|
*(.bss .bss.*);
|
||
|
. = ALIGN(4);
|
||
|
_bss_section_end = .;
|
||
|
} > RAM
|
||
|
|
||
|
.data : AT(ADDR(.rodata) + SIZEOF(.rodata))
|
||
|
{
|
||
|
. = ALIGN(4);
|
||
|
_data_section_start = .;
|
||
|
*(.data .data.*);
|
||
|
. = ALIGN(4);
|
||
|
_data_section_end = .;
|
||
|
} > RAM
|
||
|
_data_section_lma = LOADADDR(.data);
|
||
|
|
||
|
/DISCARD/ :
|
||
|
{
|
||
|
*(.ARM.exidx .ARM.exidx.*);
|
||
|
}
|
||
|
|
||
|
}
|