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