From 8983fcb5f2687b22b2cba68573f839ff2800e3c9 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 30 Mar 2009 12:20:47 +0000 Subject: Initial commit for the "Lyre prototype 1" port by Jorge Pinto from FS#10045. Bootloader builds, normal does not. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20574 a1c6a512-1295-4272-9138-f99709370657 --- firmware/target/arm/at91sam/boot.lds | 81 ++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 firmware/target/arm/at91sam/boot.lds (limited to 'firmware/target/arm/at91sam/boot.lds') diff --git a/firmware/target/arm/at91sam/boot.lds b/firmware/target/arm/at91sam/boot.lds new file mode 100644 index 0000000000..c638511e47 --- /dev/null +++ b/firmware/target/arm/at91sam/boot.lds @@ -0,0 +1,81 @@ +OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") +OUTPUT_ARCH(arm) +ENTRY(reset_handler) +STARTUP(target/arm/at91sam/lyre_proto1/crt0.o) + +#define DRAMSIZE (MEMORYSIZE * 0x100000) +#define DRAMORIG 0x20000000 +#define IRAM0ORIG 0x200000 +#define IRAM0SIZE 4K +#define IRAM1ORIG 0x300000 +#define IRAM1SIZE 4K +#define STACKSIZE 2k + +MEMORY +{ + DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE + IRAM0 : ORIGIN = IRAM0ORIG, LENGTH = IRAM0SIZE +} + +SECTIONS +{ + /* We will put Rockbox bootloader at the last 1MByte of the SDRAM. */ + + /* Example of a section: + * .section VMA(Virtual Memory Address) : LMA(Load Memory Address). + * VMA and LMA addresses can be verified by doing: + * "arm-elf-objdump -h bootloader.elf". */ + + .vectors 0 : AT (DRAMORIG + DRAMSIZE - 1M) + { + _start_vectors_section = .; + *(.vectors) + *(.glue_7) + *(.glue_7t) + . = ALIGN(4); + _end_vectors_section = .; + } + + .text (DRAMORIG + DRAMSIZE -1M + SIZEOF(.vectors)) : \ + AT (DRAMORIG + DRAMSIZE -1M + SIZEOF(.vectors)) + { + *(.text) + *(.text*) + *(.icode) + *(.icode*) + *(.rodata) + *(.rodata*) + . = ALIGN(4); + } + + /* Initialized variables are placed on SDRAM, right after .vectors section. */ + /* Data section: VMA is the same as the LMA, right after the end of .vector */ + .data . : + { + *(.data) + *(.data*) + . = ALIGN(4); + _end_data_section = .; + } + + /* Uninitialized variables are placed at SDRAM, right after .text section. */ + .bss (NOLOAD) : + + { + _start_bss_section = .; + *(.bss) /* Bss section contains all uninitialized data generated by the compiler. */ + *(.bss*) + *(COMMON) + . = ALIGN(4); + _end_bss_section = .; + } + + /* Stack is placed at SDRAM, right after .bss section. */ + .stack . : + { + *(.stack) + stackbegin = .; + . += STACKSIZE; + stackend = .; + } +} -- cgit v1.2.3