From f529a3b0f8ee24229997e995021a2ee8cb25f065 Mon Sep 17 00:00:00 2001
From: Clyne Sullivan <clyne@bitgloo.com>
Date: Sat, 5 Oct 2024 12:13:49 -0400
Subject: initial commit

---
 link.ld | 44 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)
 create mode 100644 link.ld

(limited to 'link.ld')

diff --git a/link.ld b/link.ld
new file mode 100644
index 0000000..403ba71
--- /dev/null
+++ b/link.ld
@@ -0,0 +1,44 @@
+ENTRY(_start)
+
+/* description of memory regions */
+MEMORY {
+	FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 1024K
+	RAM (rwx)  : ORIGIN = 0x20000000,  LENGTH = 96K
+}
+
+/* description of ELF sections */
+SECTIONS {
+	.text : {
+		. = ALIGN(8);
+		*(.isr_vector)
+		*(.text)
+		*(.text*)
+	} > FLASH
+
+	/* read-only data sections */
+	.rodata : {
+		. = ALIGN(8);
+		*(.rodata)
+		*(.rodata*)
+	} > FLASH
+
+	/* initialized data */
+	_sidata = LOADADDR(.data);
+	.data : {
+		. = ALIGN(8);
+		_sdata = .;
+		*(.data)
+		. = ALIGN(8);
+		_edata = .;
+	} > RAM AT > FLASH
+
+	/* uninitialized data */
+	.bss : {
+		. = ALIGN(8);
+		_sbss = .;
+		*(.bss)
+		. = ALIGN(8);
+		_ebss = .;
+	} > RAM
+}
+
-- 
cgit v1.2.3