X-Git-Url: https://robinkrens.nl/gitweb/?a=blobdiff_plain;f=link.ld;h=8301b2c53c6b27c9ac0d95320d04317a218b8f30;hb=e9d02925e4e4cd03ef878ad9b4af6c94f1cac9cc;hp=903f1f51a4c166e1d3437fd546e8f63959319865;hpb=2dcce7050a791e5b3ff81e9c785d05aa79f57ba0;p=cortex-from-scratch diff --git a/link.ld b/link.ld index 903f1f5..8301b2c 100644 --- a/link.ld +++ b/link.ld @@ -1,21 +1,28 @@ +/* */ MEMORY { - FLASH (xr) : 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 */ *(.text) - } > FLASH - .data : + } + . = 0x20000000; + .data : { *(.data) - } > SRAM + } + .bss : ALIGN(256) + { + *(.bss) + } }