wtest.ld

Linker script source for Emulating a round-screen ESP32 board, 17 lines. Raw file

/* Link the whole self-test into one SRAM1 block. The ESP32-S3 sees this block
 * on both the instruction bus (0x4037_8000) and the data bus (0x3FC8_8000); the
 * emulator resolves data loads from the instruction-bus window too, so code,
 * read-only data, data and bss can all live here at one address. _start is
 * placed first so the entry point is ORIGIN. */
ENTRY(_start)
MEMORY { ram (rwx) : ORIGIN = 0x40380000, LENGTH = 0x8000 }
SECTIONS {
  .text : {
    *(.text._start)
    *(.text .text.*)
    *(.literal .literal.*)
  } > ram
  .rodata : { *(.rodata .rodata.*) } > ram
  .data   : { *(.data .data.*) }     > ram
  .bss    : { *(.bss .bss.*) *(COMMON) } > ram
}