From b966fccf75a5d4879e7e3a7ac6eb13fdf88d0a04 Mon Sep 17 00:00:00 2001 From: jake Date: Sun, 10 Nov 2024 06:35:01 -0800 Subject: [PATCH] Added linker.ld file Added a half-finished linker file with lots of comments. --- linker.ld | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 linker.ld diff --git a/linker.ld b/linker.ld new file mode 100644 index 0000000..d87e152 --- /dev/null +++ b/linker.ld @@ -0,0 +1,47 @@ +/* + * Filename: linker.ld + * Micro-Controller: stm32f103c8t6 + */ + + +/* + * Program Entry Point: + * This part is put into the elf file header. + */ +ENTRY(Reset_Handler) + + +/* + * FORMAT: + * R: Read only section. + * W: Read/Write section. + * X: Executable section. + * A: Allocation section. + * I: Initialized section. + * !: Invert following attribute. + */ + + +/* + * MEMORY Format: + * name [(attr)] : ORIGIN = origin, LENGTH = len + */ + +/* You will want to change these values to match your uC.*/ +MEMORY +{ + FLASH(rx):ORIGIN =0x08000000,LENGTH =64K + SRAM(rwx):ORIGIN =0x20000000,LENGTH =20K +} + +floating_point = 0; +SECTIONS +{ + . = 0x10000; + .text : { *(.text) } + . = 0x8000000; + .data : { *(.data) } + .bss : { *(.bss) } +} + +