Lancaster University's (short term!) clone of mbed-src for micro:bit. This is a copy of the github branch https://github.com/lancaster-university/mbed-classic

Fork of mbed-src by mbed official

Committer:
mbed_official
Date:
Fri Jul 17 09:15:10 2015 +0100
Revision:
592:a274ee790e56
Parent:
579:53297373a894
Synchronized with git revision e7144f83a8d75df80c4877936b6ffe552b0be9e6

Full URL: https://github.com/mbedmicro/mbed/commit/e7144f83a8d75df80c4877936b6ffe552b0be9e6/

More API implementation for SAMR21

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 579:53297373a894 1 OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
mbed_official 579:53297373a894 2 OUTPUT_ARCH(arm)
mbed_official 579:53297373a894 3 SEARCH_DIR(.)
mbed_official 579:53297373a894 4
mbed_official 579:53297373a894 5 /* Memory Spaces Definitions */
mbed_official 579:53297373a894 6 MEMORY
mbed_official 579:53297373a894 7 {
mbed_official 592:a274ee790e56 8 rom (rx) : ORIGIN = 0x00000000, LENGTH = 0x00040000
mbed_official 592:a274ee790e56 9 ram (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00008000
mbed_official 579:53297373a894 10 }
mbed_official 579:53297373a894 11
mbed_official 579:53297373a894 12 /* The stack size used by the application. NOTE: you need to adjust according to your application. */
mbed_official 579:53297373a894 13 STACK_SIZE = DEFINED(STACK_SIZE) ? STACK_SIZE : DEFINED(__stack_size__) ? __stack_size__ : 0x2000;
mbed_official 579:53297373a894 14
mbed_official 579:53297373a894 15 /* Section Definitions */
mbed_official 579:53297373a894 16 SECTIONS
mbed_official 579:53297373a894 17 {
mbed_official 579:53297373a894 18 .text :
mbed_official 579:53297373a894 19 {
mbed_official 579:53297373a894 20 . = ALIGN(4);
mbed_official 579:53297373a894 21 _sfixed = .;
mbed_official 579:53297373a894 22 KEEP(*(.vectors .vectors.*))
mbed_official 579:53297373a894 23 *(.text .text.* .gnu.linkonce.t.*)
mbed_official 579:53297373a894 24 *(.glue_7t) *(.glue_7)
mbed_official 579:53297373a894 25 *(.rodata .rodata* .gnu.linkonce.r.*)
mbed_official 579:53297373a894 26 *(.ARM.extab* .gnu.linkonce.armextab.*)
mbed_official 579:53297373a894 27
mbed_official 579:53297373a894 28 /* Support C constructors, and C destructors in both user code
mbed_official 579:53297373a894 29 and the C library. This also provides support for C++ code. */
mbed_official 579:53297373a894 30 . = ALIGN(4);
mbed_official 579:53297373a894 31 KEEP(*(.init))
mbed_official 579:53297373a894 32 . = ALIGN(4);
mbed_official 579:53297373a894 33 __preinit_array_start = .;
mbed_official 579:53297373a894 34 KEEP (*(.preinit_array))
mbed_official 579:53297373a894 35 __preinit_array_end = .;
mbed_official 579:53297373a894 36
mbed_official 579:53297373a894 37 . = ALIGN(4);
mbed_official 579:53297373a894 38 __init_array_start = .;
mbed_official 579:53297373a894 39 KEEP (*(SORT(.init_array.*)))
mbed_official 579:53297373a894 40 KEEP (*(.init_array))
mbed_official 579:53297373a894 41 __init_array_end = .;
mbed_official 579:53297373a894 42
mbed_official 579:53297373a894 43 . = ALIGN(4);
mbed_official 579:53297373a894 44 KEEP (*crtbegin.o(.ctors))
mbed_official 579:53297373a894 45 KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
mbed_official 579:53297373a894 46 KEEP (*(SORT(.ctors.*)))
mbed_official 579:53297373a894 47 KEEP (*crtend.o(.ctors))
mbed_official 579:53297373a894 48
mbed_official 579:53297373a894 49 . = ALIGN(4);
mbed_official 579:53297373a894 50 KEEP(*(.fini))
mbed_official 579:53297373a894 51
mbed_official 579:53297373a894 52 . = ALIGN(4);
mbed_official 579:53297373a894 53 __fini_array_start = .;
mbed_official 579:53297373a894 54 KEEP (*(.fini_array))
mbed_official 579:53297373a894 55 KEEP (*(SORT(.fini_array.*)))
mbed_official 579:53297373a894 56 __fini_array_end = .;
mbed_official 579:53297373a894 57
mbed_official 579:53297373a894 58 KEEP (*crtbegin.o(.dtors))
mbed_official 579:53297373a894 59 KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
mbed_official 579:53297373a894 60 KEEP (*(SORT(.dtors.*)))
mbed_official 579:53297373a894 61 KEEP (*crtend.o(.dtors))
mbed_official 579:53297373a894 62
mbed_official 579:53297373a894 63 . = ALIGN(4);
mbed_official 579:53297373a894 64 _efixed = .; /* End of text section */
mbed_official 579:53297373a894 65 } > rom
mbed_official 579:53297373a894 66
mbed_official 579:53297373a894 67 /* .ARM.exidx is sorted, so has to go in its own output section. */
mbed_official 579:53297373a894 68 PROVIDE_HIDDEN (__exidx_start = .);
mbed_official 579:53297373a894 69 .ARM.exidx :
mbed_official 579:53297373a894 70 {
mbed_official 579:53297373a894 71 *(.ARM.exidx* .gnu.linkonce.armexidx.*)
mbed_official 579:53297373a894 72 } > rom
mbed_official 579:53297373a894 73 PROVIDE_HIDDEN (__exidx_end = .);
mbed_official 579:53297373a894 74
mbed_official 579:53297373a894 75 . = ALIGN(4);
mbed_official 579:53297373a894 76 _etext = .;
mbed_official 592:a274ee790e56 77
mbed_official 592:a274ee790e56 78 .dvectors (NOLOAD) :
mbed_official 592:a274ee790e56 79 {
mbed_official 592:a274ee790e56 80 _sdvectors = .;
mbed_official 592:a274ee790e56 81 . = . + 0xB0;
mbed_official 592:a274ee790e56 82 _edvectors = .;
mbed_official 592:a274ee790e56 83 } > ram
mbed_official 579:53297373a894 84
mbed_official 579:53297373a894 85 .relocate : AT (_etext)
mbed_official 579:53297373a894 86 {
mbed_official 579:53297373a894 87 . = ALIGN(4);
mbed_official 579:53297373a894 88 _srelocate = .;
mbed_official 579:53297373a894 89 *(.ramfunc .ramfunc.*);
mbed_official 579:53297373a894 90 *(.data .data.*);
mbed_official 579:53297373a894 91 . = ALIGN(4);
mbed_official 579:53297373a894 92 _erelocate = .;
mbed_official 579:53297373a894 93 } > ram
mbed_official 579:53297373a894 94
mbed_official 579:53297373a894 95 /* .bss section which is used for uninitialized data */
mbed_official 579:53297373a894 96 .bss (NOLOAD) :
mbed_official 579:53297373a894 97 {
mbed_official 579:53297373a894 98 . = ALIGN(4);
mbed_official 579:53297373a894 99 _sbss = . ;
mbed_official 579:53297373a894 100 _szero = .;
mbed_official 579:53297373a894 101 *(.bss .bss.*)
mbed_official 579:53297373a894 102 *(COMMON)
mbed_official 579:53297373a894 103 . = ALIGN(4);
mbed_official 579:53297373a894 104 _ebss = . ;
mbed_official 579:53297373a894 105 _ezero = .;
mbed_official 579:53297373a894 106 } > ram
mbed_official 579:53297373a894 107
mbed_official 592:a274ee790e56 108 .heap (NOLOAD) :
mbed_official 592:a274ee790e56 109 {
mbed_official 592:a274ee790e56 110 . = ALIGN(4);
mbed_official 592:a274ee790e56 111 __end__ = . ;
mbed_official 592:a274ee790e56 112 . = ORIGIN(ram) + LENGTH(ram) - STACK_SIZE;
mbed_official 592:a274ee790e56 113 } > ram
mbed_official 592:a274ee790e56 114
mbed_official 579:53297373a894 115 /* stack section */
mbed_official 579:53297373a894 116 .stack (NOLOAD):
mbed_official 579:53297373a894 117 {
mbed_official 579:53297373a894 118 . = ALIGN(8);
mbed_official 579:53297373a894 119 _sstack = .;
mbed_official 579:53297373a894 120 . = . + STACK_SIZE;
mbed_official 579:53297373a894 121 . = ALIGN(8);
mbed_official 579:53297373a894 122 _estack = .;
mbed_official 579:53297373a894 123 } > ram
mbed_official 579:53297373a894 124
mbed_official 579:53297373a894 125 . = ALIGN(4);
mbed_official 579:53297373a894 126 }