summaryrefslogtreecommitdiff
path: root/linker.ld
diff options
context:
space:
mode:
authorLoïc Guégan <manzerbredes@mailbox.org>2025-03-24 09:33:49 +0100
committerLoïc Guégan <manzerbredes@mailbox.org>2025-03-24 09:33:49 +0100
commit7741f014456df395b655b72d9ebb848af72cc37e (patch)
tree5ddae273929780ac7c0af2a26b64ba1a382e4b05 /linker.ld
parentd3ecfe3498d73d3ba924063bc1001cca3f333170 (diff)
Init repository
Diffstat (limited to 'linker.ld')
-rw-r--r--linker.ld37
1 files changed, 37 insertions, 0 deletions
diff --git a/linker.ld b/linker.ld
new file mode 100644
index 0000000..5b106fe
--- /dev/null
+++ b/linker.ld
@@ -0,0 +1,37 @@
+MEMORY {
+ FLASH(rx) : ORIGIN = 0x10000000, LENGTH = 2048k
+ SRAM(rwx) : ORIGIN = 0x20000100, LENGTH = 256k - 256
+}
+
+SECTIONS {
+
+ .boot2 : {
+ *(.boot2);
+ } > FLASH
+
+ .crt0 : {
+ *(.crt0);
+ } > FLASH
+
+ __vector_table_start__ = .;
+ .vector_table : {
+ *(.vector_table);
+ } > FLASH
+
+ .text ALIGN(2) : {
+ *(.text)
+ } > FLASH
+
+ .data : {
+ *(.text)
+ } > SRAM AT> FLASH
+ __data_src__ = LOADADDR(.data);
+ __data_dst__ = ORIGIN(SRAM);
+ __data_size__ = SIZEOF(.data);
+
+ .bss : {
+ __bss_start__ = .;
+ *(.bss)
+ } > SRAM
+ __bss_size__ = SIZEOF(.bss);
+}