Created
January 11, 2015 09:41
-
-
Save utzig/4d6f5b9c6b131d65ee28 to your computer and use it in GitHub Desktop.
Linker file for MCHCK with DFU bootloader
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ENTRY(Reset_Handler) | |
MEMORY | |
{ | |
flash : org = 0x00000c00, len = 128k - 0xc00 | |
ram : org = 0x1FFFE000, len = 16k | |
} | |
__ram_start__ = ORIGIN(ram); | |
__ram_size__ = LENGTH(ram); | |
__ram_end__ = __ram_start__ + __ram_size__; | |
SECTIONS | |
{ | |
. = 0; | |
.isr : ALIGN(4) SUBALIGN(4) | |
{ | |
KEEP(*(vectors)) | |
} > flash | |
_text = .; | |
constructors : ALIGN(4) SUBALIGN(4) | |
{ | |
PROVIDE(__init_array_start = .); | |
KEEP(*(SORT(.init_array.*))) | |
KEEP(*(.init_array)) | |
PROVIDE(__init_array_end = .); | |
} > flash | |
destructors : ALIGN(4) SUBALIGN(4) | |
{ | |
PROVIDE(__fini_array_start = .); | |
KEEP(*(.fini_array)) | |
KEEP(*(SORT(.fini_array.*))) | |
PROVIDE(__fini_array_end = .); | |
} > flash | |
.text : ALIGN(4) SUBALIGN(4) | |
{ | |
*(.text) | |
*(.text.*) | |
*(.rodata) | |
*(.rodata.*) | |
*(.glue_7t) | |
*(.glue_7) | |
*(.gcc*) | |
} > flash | |
.ARM.extab : | |
{ | |
*(.ARM.extab* .gnu.linkonce.armextab.*) | |
} > flash | |
.ARM.exidx : { | |
PROVIDE(__exidx_start = .); | |
*(.ARM.exidx* .gnu.linkonce.armexidx.*) | |
PROVIDE(__exidx_end = .); | |
} > flash | |
.eh_frame_hdr : | |
{ | |
*(.eh_frame_hdr) | |
} > flash | |
.eh_frame : ONLY_IF_RO | |
{ | |
*(.eh_frame) | |
} > flash | |
.textalign : ONLY_IF_RO | |
{ | |
. = ALIGN(8); | |
} > flash | |
_etext = .; | |
_textdata = _etext; | |
.stacks : | |
{ | |
. = ALIGN(8); | |
__main_stack_base__ = .; | |
. += __main_stack_size__; | |
. = ALIGN(8); | |
__main_stack_end__ = .; | |
__process_stack_base__ = .; | |
__main_thread_stack_base__ = .; | |
. += __process_stack_size__; | |
. = ALIGN(8); | |
__process_stack_end__ = .; | |
__main_thread_stack_end__ = .; | |
} > ram | |
.data : | |
{ | |
. = ALIGN(4); | |
PROVIDE(_data = .); | |
*(.data) | |
. = ALIGN(4); | |
*(.data.*) | |
. = ALIGN(4); | |
*(.ramtext) | |
. = ALIGN(4); | |
PROVIDE(_edata = .); | |
} > ram AT > flash | |
.bss : | |
{ | |
. = ALIGN(4); | |
PROVIDE(_bss_start = .); | |
*(.bss) | |
. = ALIGN(4); | |
*(.bss.*) | |
. = ALIGN(4); | |
*(COMMON) | |
. = ALIGN(4); | |
PROVIDE(_bss_end = .); | |
} > ram | |
} | |
PROVIDE(end = .); | |
_end = .; | |
__heap_base__ = _end; | |
__heap_end__ = __ram_end__; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment