X-Git-Url: https://robinkrens.nl/gitweb/?a=blobdiff_plain;f=link.ld;h=1f6b5f663afdb58dc975c8a13913e4bede98cdc3;hb=7036ca076ae2da712914c04409872eab2aadfbdb;hp=5791784d635216098604019e6459add23a819417;hpb=0c7ff283cb17c203da9a98fbd82ed87aa75abe52;p=cortex-from-scratch diff --git a/link.ld b/link.ld index 5791784..1f6b5f6 100644 --- a/link.ld +++ b/link.ld @@ -1,21 +1,29 @@ +/* */ MEMORY { - FLASH (xr) : ORIGIN = 0x00000000, LENGTH = 512K + FLASH (xr) : ORIGIN = 0x08000000, LENGTH = 512K SRAM (xrw) : ORIGIN = 0x20000000, LENGTH = 64K -} +} ENTRY(_start) SECTIONS { + . = 0x0; .text : ALIGN(4) { - /* (.vector_table */ + /* (.vector_table */ *(.text) - - } > FLASH - .data : + *(.rodata) + } + . = 0x20000000; + .data : { *(.data) - } > SRAM + } + .bss : ALIGN(4) + { + *(.bss) + } + _endofbss = .; }