X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fcpu%2Fcortex-m3%2Fscripts%2Fcortex-m3_ram.ld;fp=bertos%2Fcpu%2Fcortex-m3%2Fscripts%2Fcortex-m3_ram.ld;h=df75798849a5d267b55a3305e57533b5cb837cec;hb=e246ec67f269cbe2925e91a6900b8a4d746ded8f;hp=0000000000000000000000000000000000000000;hpb=5fd323fa3c1ac486d973338e575b34e9948bfb69;p=bertos.git diff --git a/bertos/cpu/cortex-m3/scripts/cortex-m3_ram.ld b/bertos/cpu/cortex-m3/scripts/cortex-m3_ram.ld new file mode 100644 index 00000000..df757988 --- /dev/null +++ b/bertos/cpu/cortex-m3/scripts/cortex-m3_ram.ld @@ -0,0 +1,109 @@ +/** + * \file + * + * + * \author Manuele Fanelli + * + * \brief Script for Cortex M3 family processors. + * + */ + +OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm") +OUTPUT_ARCH(arm) + +/* + * Define stack size here + */ +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); + } > ram + + __text_end = .; + PROVIDE (__text_end = .); + + .data : AT (__text_end) + { + . = ALIGN (0x400); + PROVIDE (__data_start = .); + *(vtable) + *(.data .data.*) + . = ALIGN (4); + _edata = .; + PROVIDE (__data_end = .); + } > ram + + .bss : + { + PROVIDE (__bss_start = .); + *(.bss .bss.*) + . = ALIGN(4); + *(COMMON) + . = ALIGN(4); + PROVIDE (__bss_end = .); + } > ram + + /* + * Allocated stack at the end of bss section. + * Data heap is allocate at end of stack. + */ + PROVIDE (__msp_start = .); + . = ALIGN(8); + . += STACK_SIZE; + PROVIDE (__msp_end = .); + + PROVIDE (__psp_start = .); + . = ALIGN(8); + . += STACK_SIZE; + PROVIDE (__psp_end = .); + + PROVIDE (__heap_start = .); + . = ALIGN(8); +} +