From a2cff11cb50dca70fb4869e6ed7188504a398e27 Mon Sep 17 00:00:00 2001 From: Sadeep Madurange Date: Mon, 9 Sep 2024 20:18:14 +0800 Subject: Linker script and a bunch of important fixes. --- script.ld | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 script.ld (limited to 'script.ld') diff --git a/script.ld b/script.ld new file mode 100644 index 0000000..e8b0bb1 --- /dev/null +++ b/script.ld @@ -0,0 +1,35 @@ +MEMORY +{ + rom (rx) : ORIGIN = 0x00080000, LENGTH = 0x00080000 + ram (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00010000 +} + +SECTIONS +{ + . = ALIGN(4); + .text : + { + KEEP(*(.vectors .vectors.*)) + *(.text*) + *(.rodata*) + } > rom + + . = ALIGN(4); + .data : + { + *(.data*); + } > ram AT >rom + + . = ALIGN(4); + .bss (NOLOAD) : + { + __bss_start__ = . ; + *(.bss*) + *(COMMON) + __bss_end__ = . ; + } > ram + + _end = . ; + __end__ = _end ; + end = _end; +} -- cgit v1.2.3