universalisos/microkernel/ports/ambiq_apollo/linker.ld
Fábio Coutada 62e8454f91 build: add UEFI ISO builder, test boot scripts, EIM config
- make-uefi-iso.sh: UEFI ISO image builder
- test_boot.S, test_boot.ld: test boot assembly and linker script
- eim_config.toml: EIM (External Interface Module) configuration
- edk2-ovmf RPM for UEFI firmware
- GAP_ANALYSIS_PIKEOS_PARITY.md: PikeOS parity gap analysis
2026-07-15 15:33:07 +01:00

55 lines
1.1 KiB
Text

/*
* UniversalisOS Microkernel — Ambiq Micro Apollo2 Linker Script
*
* Default: Apollo2 Blue — 512KB Flash, 256KB RAM
*
* RAM base is 0x10000000 (non-standard for Cortex-M, unique to Apollo2).
*
* Apollo2 also has additional SRAM banks; for extended RAM beyond 256KB
* the linker script can be overridden at link time:
* ld -defsym FLASH_LENGTH=1M -defsym RAM_LENGTH=384K
*/
MEMORY
{
FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 512K
RAM (rwx) : ORIGIN = 0x10000000, LENGTH = 256K
}
/* Stack at top of RAM */
_estack = ORIGIN(RAM) + LENGTH(RAM);
SECTIONS
{
.text :
{
. = ALIGN(4);
KEEP(*(.vectors))
*(.text)
*(.text*)
*(.rodata)
*(.rodata*)
. = ALIGN(4);
_etext = .;
} > FLASH
.data :
{
. = ALIGN(4);
_sdata = .;
*(.data)
*(.data*)
. = ALIGN(4);
_edata = .;
} > RAM AT > FLASH
.bss :
{
. = ALIGN(4);
_sbss = .;
*(.bss)
*(.bss*)
*(COMMON)
. = ALIGN(4);
_ebss = .;
} > RAM
}