summaryrefslogtreecommitdiff
path: root/c/inline/rvcontroller.ld
diff options
context:
space:
mode:
authorcheapie <cheapiephp@gmail.com>2026-10-30 09:09:20 -0500
committercheapie <cheapiephp@gmail.com>2026-10-30 09:09:20 -0500
commita16b984f06ca52be0785073ee2c21fcae301fff3 (patch)
tree78dd6761af6088d27e791a533bcb73a974cb3c89 /c/inline/rvcontroller.ld
parent1feb4eefe87b555a64d51e08eca7315b30521345 (diff)
downloadrvcontroller-a16b984f06ca52be0785073ee2c21fcae301fff3.tar
rvcontroller-a16b984f06ca52be0785073ee2c21fcae301fff3.tar.gz
rvcontroller-a16b984f06ca52be0785073ee2c21fcae301fff3.tar.bz2
rvcontroller-a16b984f06ca52be0785073ee2c21fcae301fff3.tar.xz
rvcontroller-a16b984f06ca52be0785073ee2c21fcae301fff3.zip
Add console interrupt support
Diffstat (limited to 'c/inline/rvcontroller.ld')
-rw-r--r--c/inline/rvcontroller.ld45
1 files changed, 45 insertions, 0 deletions
diff --git a/c/inline/rvcontroller.ld b/c/inline/rvcontroller.ld
new file mode 100644
index 0000000..985892b
--- /dev/null
+++ b/c/inline/rvcontroller.ld
@@ -0,0 +1,45 @@
+/* Thanks https://github.com/darklife/darkriscv */
+ __heap_size = 0x200; /* required amount of heap */
+ __stack_size = 0x800; /* required amount of stack */
+ ENTRY(_start);
+ MEMORY
+ {
+ RAM (rwx) : ORIGIN = 0x00000000, LENGTH = 0x10000
+ }
+ SECTIONS
+ {
+ .text :
+ {
+ *(.text.startup)
+ *(.text)
+ *(.text)
+ *(.rodata*)
+ } > RAM
+ .data :
+ {
+ *(.sbss)
+ *(.data)
+ *(.bss)
+ *(.rela*)
+ *(COMMON)
+ } > RAM
+
+ .heap :
+ {
+ . = ALIGN(4);
+ PROVIDE ( end = . );
+ _sheap = .;
+ . = . + __heap_size;
+ . = ALIGN(4);
+ _eheap = .;
+ } >RAM
+
+ .stack :
+ {
+ . = ALIGN(4);
+ _estack = .;
+ . = . + __stack_size;
+ . = ALIGN(4);
+ _sstack = .;
+ } >RAM
+ }