/* linker.ld - Linker script for Milk-V Duo Baremetal (SRAM) */ /* Baremetal Risc-V USB <=> Amiga Joystick/Mouse HID converter. * March 2026 - Anders Holck * This software has no license. If you choose to use, please include my name :) */ OUTPUT_ARCH("riscv") ENTRY(_start) MEMORY { /* Internal SRAM is 128KB or more, starting at 0x0E000000 */ ram (rwx) : ORIGIN = 0x0E000000, LENGTH = 128K } SECTIONS { /* Read-only code and constants */ .text : { *(.text.startup) *(.text) *(.text.*) } > ram .rodata : { *(.rodata) *(.rodata.*) } > ram /* Read-write initialized data */ .data : { *(.data) *(.data.*) } > ram /* Read-write zero-initialized data */ .bss : { . = ALIGN(8); _bss_start = .; *(.bss) *(.bss.*) *(COMMON) . = ALIGN(8); _bss_end = .; } > ram _end = .; }