diff options
author | Flavian Kaufmann <flavian@flaviankaufmann.ch> | 2024-05-20 23:44:43 +0200 |
---|---|---|
committer | Flavian Kaufmann <flavian@flaviankaufmann.ch> | 2024-05-20 23:44:43 +0200 |
commit | 69e2696658a3654f575a7a995d859fa821219676 (patch) | |
tree | a2e8d277fe2436cdbd61e3ca4689885db3b09f5c /prog/link.ld | |
parent | e945c80a6ceaef501350de49bf647ae8539d1cbb (diff) | |
download | riscv_cpu-69e2696658a3654f575a7a995d859fa821219676.tar.gz riscv_cpu-69e2696658a3654f575a7a995d859fa821219676.zip |
added some graphics
Diffstat (limited to 'prog/link.ld')
-rw-r--r-- | prog/link.ld | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/prog/link.ld b/prog/link.ld index ae0988f..5c9926c 100644 --- a/prog/link.ld +++ b/prog/link.ld @@ -1,7 +1,7 @@ MEMORY { - ROM (rx) : ORIGIN = 0x00010000, LENGTH = 4K - RAM (rwx) : ORIGIN = 0x00100000, LENGTH = 4K + ROM (rx) : ORIGIN = 0x00010000, LENGTH = 4K /* (1024 words, 0x0001_0000 to 0x0001_FFFF) */ + RAM (rwx) : ORIGIN = 0x00100000, LENGTH = 4K /* (1024 words, 0x0010_0000 to 0x0010_FFFF) */ } ENTRY(_start) @@ -12,61 +12,61 @@ SECTIONS { _stext = .; . = ORIGIN(ROM); - _start = .; /* Entry point address */ - KEEP(*(.text.startup)) /* Ensure startup code is kept */ - *(.text) /* .text sections (code) */ + _start = .; /* entry point address */ + *(.text.startup) + *(.text) /* .text sections (code) */ *(.text.*) . = ALIGN(4); - _etext = .; /* End of code section, needed for copying .data */ + _etext = .; /* end of code section */ } > ROM .rodata : { - *(.rodata) /* Read-only data */ + *(.rodata) /* Read-only data */ *(.rodata.*) } > ROM .data : { - _sidata = LOADADDR(.data); /* Start address of .data section in ROM */ + _sidata = LOADADDR(.data); /* start address of .data section in ROM */ . = ALIGN(4); - _sdata = .; /* Start of .data section in RAM */ - *(.data) /* .data sections (initialized data) */ + _sdata = .; /* start of .data section in RAM */ + *(.data) /* .data sections (initialized data) */ *(.data.*) *(.sdata) /* .sdata sections (small initialized data) */ *(.sdata.*) . = ALIGN(4); - _edata = .; /* End of .data section in RAM */ + _edata = .; /* end of .data section in RAM */ } > RAM AT > ROM .bss : { . = ALIGN(4); - _sbss = .; /* Start of .bss section */ - *(.bss) /* .bss sections (zero-initialized data) */ + _sbss = .; /* start of .bss section */ + *(.bss) /* .bss sections (zero-initialized data) */ *(.bss.*) *(.sbss) /* .sbss sections (small zero-initialized data) */ *(.sbss.*) *(COMMON) . = ALIGN(4); - _ebss = .; /* End of .bss section */ + _ebss = .; /* end of .bss section */ } > RAM .heap (NOLOAD) : { . = ALIGN(4); - _sheap = .; /* Start of heap */ - . = . + 1K; /* Size of heap (adjust as needed) */ - _eheap = .; /* End of heap */ + _sheap = .; /* start of heap */ + . = . + 1K; /* size of heap */ + _eheap = .; /* end of heap */ . = ALIGN(4); } > RAM .stack (NOLOAD) : { . = ALIGN(4); - _sstack = .; /* Start of stack */ - . = . + 1K; /* Size of stack (adjust as needed) */ - _estack = .; /* End of stack */ + _sstack = .; /* start of stack */ + . = . + 1K; /* size of stack */ + _estack = .; /* end of stack */ . = ALIGN(4); } > RAM |