meh

Fork of mbed by mbed official

Committer:
ricardobtez
Date:
Tue Apr 05 23:51:21 2016 +0000
Revision:
118:16969dd821af
Parent:
81:7d30d6019079
Child:
107:4f6c30876dfa
dgdgr

Who changed what in which revision?

UserRevisionLine numberNew contents of line
bogdanm 81:7d30d6019079 1 /* mbed - LPC11U35 linker script
bogdanm 81:7d30d6019079 2 * Based linker script generated by Code Red Technologies Red Suite 4.1
bogdanm 81:7d30d6019079 3 */
bogdanm 81:7d30d6019079 4 GROUP(libgcc.a libc_s.a libstdc++_s.a libm.a libcr_newlib_nohost.a crti.o crtn.o crtbegin.o crtend.o)
bogdanm 81:7d30d6019079 5
bogdanm 81:7d30d6019079 6 MEMORY
bogdanm 81:7d30d6019079 7 {
bogdanm 81:7d30d6019079 8 /* Define each memory region */
bogdanm 81:7d30d6019079 9 MFlash32 (rx) : ORIGIN = 0x0, LENGTH = 0x10000 /* 64k */
bogdanm 81:7d30d6019079 10 RamLoc8 (rwx) : ORIGIN = 0x100000C0, LENGTH = 0x1F40 /* 8k */
bogdanm 81:7d30d6019079 11 RamUsb2 (rwx) : ORIGIN = 0x20004000, LENGTH = 0x800 /* 2k */
bogdanm 81:7d30d6019079 12 }
bogdanm 81:7d30d6019079 13 /* Define a symbol for the top of each memory region */
bogdanm 81:7d30d6019079 14 __top_MFlash32 = 0x0 + 0x10000;
bogdanm 81:7d30d6019079 15 __top_RamLoc8 = 0x10000000 + 0x1F40;
bogdanm 81:7d30d6019079 16 __top_RamUsb2 = 0x20004000 + 0x800;
bogdanm 81:7d30d6019079 17
bogdanm 81:7d30d6019079 18 ENTRY(ResetISR)
bogdanm 81:7d30d6019079 19
bogdanm 81:7d30d6019079 20 SECTIONS
bogdanm 81:7d30d6019079 21 {
bogdanm 81:7d30d6019079 22
bogdanm 81:7d30d6019079 23 /* MAIN TEXT SECTION */
bogdanm 81:7d30d6019079 24 .text : ALIGN(4)
bogdanm 81:7d30d6019079 25 {
bogdanm 81:7d30d6019079 26 FILL(0xff)
bogdanm 81:7d30d6019079 27 KEEP(*(.isr_vector))
bogdanm 81:7d30d6019079 28 *(.text.ResetISR)
bogdanm 81:7d30d6019079 29 . = 0x200;
bogdanm 81:7d30d6019079 30
bogdanm 81:7d30d6019079 31 /* Global Section Table */
bogdanm 81:7d30d6019079 32 . = ALIGN(4) ;
bogdanm 81:7d30d6019079 33 __section_table_start = .;
bogdanm 81:7d30d6019079 34 __data_section_table = .;
bogdanm 81:7d30d6019079 35 LONG(LOADADDR(.data));
bogdanm 81:7d30d6019079 36 LONG( ADDR(.data)) ;
bogdanm 81:7d30d6019079 37 LONG( SIZEOF(.data));
bogdanm 81:7d30d6019079 38 LONG(LOADADDR(.data_RAM2));
bogdanm 81:7d30d6019079 39 LONG( ADDR(.data_RAM2)) ;
bogdanm 81:7d30d6019079 40 LONG( SIZEOF(.data_RAM2));
bogdanm 81:7d30d6019079 41 __data_section_table_end = .;
bogdanm 81:7d30d6019079 42 __bss_section_table = .;
bogdanm 81:7d30d6019079 43 LONG( ADDR(.bss));
bogdanm 81:7d30d6019079 44 LONG( SIZEOF(.bss));
bogdanm 81:7d30d6019079 45 LONG( ADDR(.bss_RAM2));
bogdanm 81:7d30d6019079 46 LONG( SIZEOF(.bss_RAM2));
bogdanm 81:7d30d6019079 47 __bss_section_table_end = .;
bogdanm 81:7d30d6019079 48 __section_table_end = . ;
bogdanm 81:7d30d6019079 49 /* End of Global Section Table */
bogdanm 81:7d30d6019079 50
bogdanm 81:7d30d6019079 51
bogdanm 81:7d30d6019079 52 *(.after_vectors*)
bogdanm 81:7d30d6019079 53
bogdanm 81:7d30d6019079 54 *(.text*)
bogdanm 81:7d30d6019079 55 *(.rodata .rodata.*)
bogdanm 81:7d30d6019079 56 . = ALIGN(4);
bogdanm 81:7d30d6019079 57
bogdanm 81:7d30d6019079 58 /* C++ constructors etc */
bogdanm 81:7d30d6019079 59 . = ALIGN(4);
bogdanm 81:7d30d6019079 60 KEEP(*(.init))
bogdanm 81:7d30d6019079 61
bogdanm 81:7d30d6019079 62 . = ALIGN(4);
bogdanm 81:7d30d6019079 63 __preinit_array_start = .;
bogdanm 81:7d30d6019079 64 KEEP (*(.preinit_array))
bogdanm 81:7d30d6019079 65 __preinit_array_end = .;
bogdanm 81:7d30d6019079 66
bogdanm 81:7d30d6019079 67 . = ALIGN(4);
bogdanm 81:7d30d6019079 68 __init_array_start = .;
bogdanm 81:7d30d6019079 69 KEEP (*(SORT(.init_array.*)))
bogdanm 81:7d30d6019079 70 KEEP (*(.init_array))
bogdanm 81:7d30d6019079 71 __init_array_end = .;
bogdanm 81:7d30d6019079 72
bogdanm 81:7d30d6019079 73 KEEP(*(.fini));
bogdanm 81:7d30d6019079 74
bogdanm 81:7d30d6019079 75 . = ALIGN(0x4);
bogdanm 81:7d30d6019079 76 KEEP (*crtbegin.o(.ctors))
bogdanm 81:7d30d6019079 77 KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
bogdanm 81:7d30d6019079 78 KEEP (*(SORT(.ctors.*)))
bogdanm 81:7d30d6019079 79 KEEP (*crtend.o(.ctors))
bogdanm 81:7d30d6019079 80
bogdanm 81:7d30d6019079 81 . = ALIGN(0x4);
bogdanm 81:7d30d6019079 82 KEEP (*crtbegin.o(.dtors))
bogdanm 81:7d30d6019079 83 KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
bogdanm 81:7d30d6019079 84 KEEP (*(SORT(.dtors.*)))
bogdanm 81:7d30d6019079 85 KEEP (*crtend.o(.dtors))
bogdanm 81:7d30d6019079 86 /* End C++ */
bogdanm 81:7d30d6019079 87 } > MFlash32
bogdanm 81:7d30d6019079 88
bogdanm 81:7d30d6019079 89 /*
bogdanm 81:7d30d6019079 90 * for exception handling/unwind - some Newlib functions (in common
bogdanm 81:7d30d6019079 91 * with C++ and STDC++) use this.
bogdanm 81:7d30d6019079 92 */
bogdanm 81:7d30d6019079 93 .ARM.extab : ALIGN(4)
bogdanm 81:7d30d6019079 94 {
bogdanm 81:7d30d6019079 95 *(.ARM.extab* .gnu.linkonce.armextab.*)
bogdanm 81:7d30d6019079 96 } > MFlash32
bogdanm 81:7d30d6019079 97 __exidx_start = .;
bogdanm 81:7d30d6019079 98
bogdanm 81:7d30d6019079 99 .ARM.exidx : ALIGN(4)
bogdanm 81:7d30d6019079 100 {
bogdanm 81:7d30d6019079 101 *(.ARM.exidx* .gnu.linkonce.armexidx.*)
bogdanm 81:7d30d6019079 102 } > MFlash32
bogdanm 81:7d30d6019079 103 __exidx_end = .;
bogdanm 81:7d30d6019079 104
bogdanm 81:7d30d6019079 105 _etext = .;
bogdanm 81:7d30d6019079 106
bogdanm 81:7d30d6019079 107
bogdanm 81:7d30d6019079 108 .data_RAM2 : ALIGN(4)
bogdanm 81:7d30d6019079 109 {
bogdanm 81:7d30d6019079 110 FILL(0xff)
bogdanm 81:7d30d6019079 111 *(.data.$RAM2*)
bogdanm 81:7d30d6019079 112 *(.data.$RamUsb2*)
bogdanm 81:7d30d6019079 113 . = ALIGN(4) ;
bogdanm 81:7d30d6019079 114 } > RamUsb2 AT>MFlash32
bogdanm 81:7d30d6019079 115
bogdanm 81:7d30d6019079 116 /* MAIN DATA SECTION */
bogdanm 81:7d30d6019079 117
bogdanm 81:7d30d6019079 118 .uninit_RESERVED : ALIGN(4)
bogdanm 81:7d30d6019079 119 {
bogdanm 81:7d30d6019079 120 KEEP(*(.bss.$RESERVED*))
bogdanm 81:7d30d6019079 121 } > RamLoc8
bogdanm 81:7d30d6019079 122
bogdanm 81:7d30d6019079 123 .data : ALIGN(4)
bogdanm 81:7d30d6019079 124 {
bogdanm 81:7d30d6019079 125 FILL(0xff)
bogdanm 81:7d30d6019079 126 _data = .;
bogdanm 81:7d30d6019079 127 *(vtable)
bogdanm 81:7d30d6019079 128 *(.data*)
bogdanm 81:7d30d6019079 129 . = ALIGN(4) ;
bogdanm 81:7d30d6019079 130 _edata = .;
bogdanm 81:7d30d6019079 131 } > RamLoc8 AT>MFlash32
bogdanm 81:7d30d6019079 132
bogdanm 81:7d30d6019079 133
bogdanm 81:7d30d6019079 134 .bss_RAM2 : ALIGN(4)
bogdanm 81:7d30d6019079 135 {
bogdanm 81:7d30d6019079 136 *(.bss.$RAM2*)
bogdanm 81:7d30d6019079 137 *(.bss.$RamUsb2*)
bogdanm 81:7d30d6019079 138 . = ALIGN(4) ;
bogdanm 81:7d30d6019079 139 } > RamUsb2
bogdanm 81:7d30d6019079 140
bogdanm 81:7d30d6019079 141 /* MAIN BSS SECTION */
bogdanm 81:7d30d6019079 142 .bss : ALIGN(4)
bogdanm 81:7d30d6019079 143 {
bogdanm 81:7d30d6019079 144 _bss = .;
bogdanm 81:7d30d6019079 145 *(.bss*)
bogdanm 81:7d30d6019079 146 *(COMMON)
bogdanm 81:7d30d6019079 147 . = ALIGN(4) ;
bogdanm 81:7d30d6019079 148 _ebss = .;
bogdanm 81:7d30d6019079 149 PROVIDE(end = .);
bogdanm 81:7d30d6019079 150 __end__ = .;
bogdanm 81:7d30d6019079 151 } > RamLoc8
bogdanm 81:7d30d6019079 152
bogdanm 81:7d30d6019079 153 PROVIDE(_pvHeapStart = .);
bogdanm 81:7d30d6019079 154 PROVIDE(_vStackTop = __top_RamLoc8 - 0);
bogdanm 81:7d30d6019079 155 }