Root/
| 1 | /* http://www.embedds.com/programming-stm32-discovery-using-gnu-tools-linker-script/ */ |
| 2 | |
| 3 | ENTRY(__init) |
| 4 | |
| 5 | MEMORY { |
| 6 | RAM(rwx): ORIGIN = 0x10000000, LENGTH = 4K |
| 7 | FLASH(rx): ORIGIN = 0x0, LENGTH = 16K |
| 8 | } |
| 9 | |
| 10 | SECTIONS { |
| 11 | .text : { |
| 12 | . = ALIGN(4); |
| 13 | KEEP(*(.vectors)) |
| 14 | *(.init) |
| 15 | *(.text) |
| 16 | *(.text*) |
| 17 | *(.rodata) |
| 18 | *(.rodata*) |
| 19 | . = ALIGN(4); |
| 20 | } >FLASH |
| 21 | |
| 22 | _data_flash = .; |
| 23 | .data : AT(_data_flash) { |
| 24 | . = ALIGN(4); |
| 25 | _data_begin = .; |
| 26 | *(.data) |
| 27 | *(.data*) |
| 28 | . = ALIGN(4); |
| 29 | _data_end = .; |
| 30 | } >RAM |
| 31 | |
| 32 | .bss : { |
| 33 | _bss_begin = .; |
| 34 | __bss_start__ = _bss_begin; |
| 35 | *(.bss) |
| 36 | *(.bss.*) |
| 37 | *(COMMON) |
| 38 | . = ALIGN(4); |
| 39 | _bss_end = .; |
| 40 | __bss_end__ = _bss_end; |
| 41 | } >RAM |
| 42 | |
| 43 | _stack_end = ORIGIN(RAM)+LENGTH(RAM); |
| 44 | _neg_stack_end = -_stack_end; |
| 45 | } |
| 46 |
Branches:
master
