summaryrefslogtreecommitdiff
path: root/c/blankscreen/rvcontroller.ld
diff options
context:
space:
mode:
authorcheapie <cheapiephp@gmail.com>2026-05-29 16:02:49 -0500
committercheapie <cheapiephp@gmail.com>2026-05-29 16:02:49 -0500
commitbaa99d7688127a06e407edcadded63fb6efe2dc1 (patch)
tree0d59c5d639282ed00c386098d1e1277bd1ff8549 /c/blankscreen/rvcontroller.ld
parent6fa24a0ca5271446f6e2be72f110bb8a64a3f035 (diff)
downloadrvcontroller-baa99d7688127a06e407edcadded63fb6efe2dc1.tar
rvcontroller-baa99d7688127a06e407edcadded63fb6efe2dc1.tar.gz
rvcontroller-baa99d7688127a06e407edcadded63fb6efe2dc1.tar.bz2
rvcontroller-baa99d7688127a06e407edcadded63fb6efe2dc1.tar.xz
rvcontroller-baa99d7688127a06e407edcadded63fb6efe2dc1.zip
Add screen-clearing utility
Diffstat (limited to 'c/blankscreen/rvcontroller.ld')
-rw-r--r--c/blankscreen/rvcontroller.ld45
1 files changed, 45 insertions, 0 deletions
diff --git a/c/blankscreen/rvcontroller.ld b/c/blankscreen/rvcontroller.ld
new file mode 100644
index 0000000..985892b
--- /dev/null
+++ b/c/blankscreen/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
+ }