From 45a6fdb04f3bf605eb4280473dd22db041ece6a7 Mon Sep 17 00:00:00 2001 From: xengineering Date: Sun, 26 Sep 2021 16:09:46 +0200 Subject: Remove startup.c and switch to libopencm3's Linker Script --- ld/stm32f103c8t6.ld | 35 ++++++----------------------------- 1 file changed, 6 insertions(+), 29 deletions(-) (limited to 'ld/stm32f103c8t6.ld') diff --git a/ld/stm32f103c8t6.ld b/ld/stm32f103c8t6.ld index 9f74206..db01550 100644 --- a/ld/stm32f103c8t6.ld +++ b/ld/stm32f103c8t6.ld @@ -1,32 +1,9 @@ -SECTIONS -{ - . = 0x0; /* From 0x00000000 */ - - .text : - { - *(vectors) /* Vector table */ - *(.text) /* Program code */ - } - .rodata : - { - *(.rodata) /* Read only data */ - } - _DATA_ROM_START = .; - - . = 0x20000000; /* From 0x20000000 */ - _DATA_RAM_START = .; - .data : AT(_DATA_ROM_START) - { - *(.data) /* Data memory */ - } - _DATA_RAM_END = .; - - _BSS_START = .; /* Indicates where BSS section starts in RAM */ - .bss : - { - *(.bss) /* Zero-filled run time allocate data memory */ - } - _BSS_END = .; /* Indicates where BSS section ends in RAM */ +MEMORY +{ + rom (rx) : ORIGIN = 0x08000000, LENGTH = 64K + ram (rwx) : ORIGIN = 0x20000000, LENGTH = 20K } +INCLUDE cortex-m-generic.ld + -- cgit v1.2.3-70-g09d2