mirror of
git://projects.qi-hardware.com/ben-blinkenlights.git
synced 2024-11-24 05:44:03 +02:00
46 lines
722 B
Plaintext
46 lines
722 B
Plaintext
/* http://www.embedds.com/programming-stm32-discovery-using-gnu-tools-linker-script/ */
|
|
|
|
ENTRY(__init)
|
|
|
|
MEMORY {
|
|
RAM(rwx): ORIGIN = 0x10000000, LENGTH = 4K
|
|
FLASH(rx): ORIGIN = 0x0, LENGTH = 16K
|
|
}
|
|
|
|
SECTIONS {
|
|
.text : {
|
|
. = ALIGN(4);
|
|
KEEP(*(.vectors))
|
|
*(.init)
|
|
*(.text)
|
|
*(.text*)
|
|
*(.rodata)
|
|
*(.rodata*)
|
|
. = ALIGN(4);
|
|
} >FLASH
|
|
|
|
_data_flash = .;
|
|
.data : AT(_data_flash) {
|
|
. = ALIGN(4);
|
|
_data_begin = .;
|
|
*(.data)
|
|
*(.data*)
|
|
. = ALIGN(4);
|
|
_data_end = .;
|
|
} >RAM
|
|
|
|
.bss : {
|
|
_bss_begin = .;
|
|
__bss_start__ = _bss_begin;
|
|
*(.bss)
|
|
*(.bss.*)
|
|
*(COMMON)
|
|
. = ALIGN(4);
|
|
_bss_end = .;
|
|
__bss_end__ = _bss_end;
|
|
} >RAM
|
|
|
|
_stack_end = ORIGIN(RAM)+LENGTH(RAM);
|
|
_neg_stack_end = -_stack_end;
|
|
}
|