X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fcpu%2Farm%2Fscripts%2Farm7tdmi_rom.ld;fp=bertos%2Fcpu%2Farm%2Fscripts%2Farm7tdmi_rom.ld;h=54d470e027b5c74b4c86fe339c7d2250b0aa7089;hb=129544829eee6d8d67e019617f28f17c60881131;hp=0000000000000000000000000000000000000000;hpb=aa41bf89026b98ade9a4f26d2db531ad5747f684;p=bertos.git diff --git a/bertos/cpu/arm/scripts/arm7tdmi_rom.ld b/bertos/cpu/arm/scripts/arm7tdmi_rom.ld new file mode 100644 index 00000000..54d470e0 --- /dev/null +++ b/bertos/cpu/arm/scripts/arm7tdmi_rom.ld @@ -0,0 +1,134 @@ +/** + * \file + * + * + * \author Daniele Basile + * + * \brief Linker Script for Atmel AT91SAM7 family processors, ROM execution. + * + */ + +ENTRY(_init) +OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm") +OUTPUT_ARCH(arm) + +/* + * Define stack size here + */ +FIQ_STACK_SIZE = 0x0100; +IRQ_STACK_SIZE = 0x0400; +ABT_STACK_SIZE = 0x0100; +UND_STACK_SIZE = 0x0100; +SVC_STACK_SIZE = 0x1000; + +/* + * Allocate section memory + */ +SECTIONS +{ + .text : + { + KEEP(*(.vectors)); + . = ALIGN (4); + KEEP(*(.init)); + . = ALIGN (4); + *(.rodata .rodata.*); + . = ALIGN (4); + *(.text .text.*); + . = ALIGN (4); + *(.glue_7t); + . = ALIGN(4); + *(.glue_7); + . = ALIGN(4); + *(.gcc*); + . = ALIGN(4); + *(.ctors); + . = ALIGN(4); + *(.dtors); + _etext = .; + PROVIDE (__etext = .); + } > rom + + + .data : AT (_etext) + { + PROVIDE (__data_start = .); + *(.data .data.*) + . = ALIGN (4); + _edata = .; + PROVIDE (__data_end = .); + } > ram + + .bss : + { + PROVIDE (__bss_start = .); + *(.bss .bss.*) + . = ALIGN(4); + *(COMMON) + . = ALIGN(4); + PROVIDE (__bss_end = .); + } > ram + + /* + * Allocate stack at the end of bss section. + * Data heap is allocated at end of stack. + */ + PROVIDE (__stack_start = .); + + PROVIDE (__stack_fiq_start = .); + . += FIQ_STACK_SIZE; + . = ALIGN(8); + PROVIDE (__stack_fiq_end = .); + + PROVIDE (__stack_irq_start = .); + . += IRQ_STACK_SIZE; + . = ALIGN(8); + PROVIDE (__stack_irq_end = .); + + PROVIDE (__stack_abt_start = .); + . += ABT_STACK_SIZE; + . = ALIGN(8); + PROVIDE (__stack_abt_end = .); + + PROVIDE (__stack_und_start = .); + . += UND_STACK_SIZE; + . = ALIGN(8); + PROVIDE (__stack_und_end = .); + + PROVIDE (__stack_svc_start = .); + . += SVC_STACK_SIZE; + . = ALIGN(8); + PROVIDE (__stack_svc_end = .); + + PROVIDE (__stack_end = .); + + PROVIDE (__heap_start = .); +}