feat: add lab-rv32i-c-uart card

This commit is contained in:
user
2026-07-21 19:14:20 +02:00
commit 4777108a0e
24 changed files with 4538 additions and 0 deletions
+64
View File
@@ -0,0 +1,64 @@
OUTPUT_FORMAT("elf32-littleriscv")
OUTPUT_ARCH(riscv)
ENTRY(_start)
MEMORY
{
RAM (rwx) : ORIGIN = 0x80000000, LENGTH = 16M
}
PHDRS
{
text PT_LOAD FLAGS(5); /* read + execute */
data PT_LOAD FLAGS(6); /* read + write */
}
SECTIONS
{
. = ORIGIN(RAM);
.text : ALIGN(4)
{
KEEP(*(.vectors))
*(.text.startup .text.startup.*)
*(.text .text.*)
} > RAM :text
.rodata : ALIGN(4)
{
*(.rodata .rodata.*)
} > RAM :text
.data : ALIGN(16)
{
__data_start = .;
*(.data .data.*)
*(.sdata .sdata.*)
__data_end = .;
} > RAM :data
.bss (NOLOAD) : ALIGN(16)
{
__bss_start = .;
*(.bss .bss.* COMMON)
*(.sbss .sbss.*)
__bss_end = .;
} > RAM :data
. = ALIGN(16);
_end = .;
PROVIDE(end = .);
__stack_top = ORIGIN(RAM) + LENGTH(RAM);
__stack_reserve = 64K;
__stack_bottom = __stack_top - __stack_reserve;
__global_pointer$ = __data_start + 0x800;
/DISCARD/ :
{
*(.comment)
*(.note .note.*)
}
}
ASSERT(_end <= __stack_bottom,
"C12: program overlaps the reserved 64 KiB stack")