Fork of the official mbed C/C SDK provides the software platform and libraries to build your applications for RenBED.
Dependents: 1-RenBuggyTimed RenBED_RGB RenBED_RGB_PWM RenBED_RGB
Fork of mbed by
TARGET_LPC1768/TOOLCHAIN_GCC_CR/LPC1768.ld@121:672067c3ada4, 2016-04-14 (annotated)
- Committer:
- elijahorr
- Date:
- Thu Apr 14 07:28:54 2016 +0000
- Revision:
- 121:672067c3ada4
- Parent:
- 108:34e6b704fe68
.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
bogdanm | 66:9c8f0e3462fb | 1 | /* mbed - LPC1768 linker script |
bogdanm | 66:9c8f0e3462fb | 2 | * Based linker script generated by Code Red Technologies Red Suite 4.1 |
bogdanm | 66:9c8f0e3462fb | 3 | */ |
bogdanm | 66:9c8f0e3462fb | 4 | GROUP(libgcc.a libc.a libstdc++.a libm.a libcr_newlib_nohost.a crti.o crtn.o crtbegin.o crtend.o) |
bogdanm | 66:9c8f0e3462fb | 5 | |
bogdanm | 66:9c8f0e3462fb | 6 | MEMORY |
bogdanm | 66:9c8f0e3462fb | 7 | { |
bogdanm | 66:9c8f0e3462fb | 8 | /* Define each memory region */ |
bogdanm | 66:9c8f0e3462fb | 9 | MFlash512 (rx) : ORIGIN = 0x0, LENGTH = 0x80000 /* 512k */ |
bogdanm | 66:9c8f0e3462fb | 10 | RamLoc32 (rwx) : ORIGIN = 0x100000C8, LENGTH = 0x7F38 /* 32k */ |
Kojto | 108:34e6b704fe68 | 11 | RamAHB_USB (rwx) : ORIGIN = 0x2007c000, LENGTH = 0x4000 /* 16k */ |
Kojto | 108:34e6b704fe68 | 12 | RamAHB_Eth (rwx) : ORIGIN = 0x20080000, LENGTH = 0x4000 /* 16k */ |
bogdanm | 66:9c8f0e3462fb | 13 | |
bogdanm | 66:9c8f0e3462fb | 14 | } |
bogdanm | 66:9c8f0e3462fb | 15 | /* Define a symbol for the top of each memory region */ |
bogdanm | 66:9c8f0e3462fb | 16 | __top_MFlash512 = 0x0 + 0x80000; |
bogdanm | 66:9c8f0e3462fb | 17 | __top_RamLoc32 = 0x10000000 + 0x8000; |
bogdanm | 66:9c8f0e3462fb | 18 | __top_RamAHB32 = 0x2007c000 + 0x8000; |
bogdanm | 66:9c8f0e3462fb | 19 | |
bogdanm | 66:9c8f0e3462fb | 20 | ENTRY(ResetISR) |
bogdanm | 66:9c8f0e3462fb | 21 | |
bogdanm | 66:9c8f0e3462fb | 22 | SECTIONS |
bogdanm | 66:9c8f0e3462fb | 23 | { |
bogdanm | 66:9c8f0e3462fb | 24 | |
bogdanm | 66:9c8f0e3462fb | 25 | /* MAIN TEXT SECTION */ |
bogdanm | 66:9c8f0e3462fb | 26 | .text : ALIGN(4) |
bogdanm | 66:9c8f0e3462fb | 27 | { |
bogdanm | 66:9c8f0e3462fb | 28 | FILL(0xff) |
bogdanm | 66:9c8f0e3462fb | 29 | KEEP(*(.isr_vector)) |
bogdanm | 66:9c8f0e3462fb | 30 | |
bogdanm | 66:9c8f0e3462fb | 31 | /* Global Section Table */ |
bogdanm | 66:9c8f0e3462fb | 32 | . = ALIGN(4) ; |
bogdanm | 66:9c8f0e3462fb | 33 | __section_table_start = .; |
bogdanm | 66:9c8f0e3462fb | 34 | __data_section_table = .; |
bogdanm | 66:9c8f0e3462fb | 35 | LONG(LOADADDR(.data)); |
bogdanm | 66:9c8f0e3462fb | 36 | LONG( ADDR(.data)) ; |
bogdanm | 66:9c8f0e3462fb | 37 | LONG( SIZEOF(.data)); |
bogdanm | 66:9c8f0e3462fb | 38 | LONG(LOADADDR(.data_RAM2)); |
bogdanm | 66:9c8f0e3462fb | 39 | LONG( ADDR(.data_RAM2)) ; |
bogdanm | 66:9c8f0e3462fb | 40 | LONG( SIZEOF(.data_RAM2)); |
bogdanm | 66:9c8f0e3462fb | 41 | __data_section_table_end = .; |
bogdanm | 66:9c8f0e3462fb | 42 | __bss_section_table = .; |
bogdanm | 66:9c8f0e3462fb | 43 | LONG( ADDR(.bss)); |
bogdanm | 66:9c8f0e3462fb | 44 | LONG( SIZEOF(.bss)); |
bogdanm | 66:9c8f0e3462fb | 45 | LONG( ADDR(.bss_RAM2)); |
bogdanm | 66:9c8f0e3462fb | 46 | LONG( SIZEOF(.bss_RAM2)); |
bogdanm | 66:9c8f0e3462fb | 47 | __bss_section_table_end = .; |
bogdanm | 66:9c8f0e3462fb | 48 | __section_table_end = . ; |
bogdanm | 66:9c8f0e3462fb | 49 | /* End of Global Section Table */ |
bogdanm | 66:9c8f0e3462fb | 50 | |
bogdanm | 66:9c8f0e3462fb | 51 | |
bogdanm | 66:9c8f0e3462fb | 52 | *(.after_vectors*) |
bogdanm | 66:9c8f0e3462fb | 53 | |
bogdanm | 66:9c8f0e3462fb | 54 | *(.text*) |
bogdanm | 66:9c8f0e3462fb | 55 | *(.rodata .rodata.*) |
bogdanm | 66:9c8f0e3462fb | 56 | . = ALIGN(4); |
bogdanm | 66:9c8f0e3462fb | 57 | |
bogdanm | 66:9c8f0e3462fb | 58 | /* C++ constructors etc */ |
bogdanm | 66:9c8f0e3462fb | 59 | . = ALIGN(4); |
bogdanm | 66:9c8f0e3462fb | 60 | KEEP(*(.init)) |
bogdanm | 66:9c8f0e3462fb | 61 | |
bogdanm | 66:9c8f0e3462fb | 62 | . = ALIGN(4); |
bogdanm | 66:9c8f0e3462fb | 63 | __preinit_array_start = .; |
bogdanm | 66:9c8f0e3462fb | 64 | KEEP (*(.preinit_array)) |
bogdanm | 66:9c8f0e3462fb | 65 | __preinit_array_end = .; |
bogdanm | 66:9c8f0e3462fb | 66 | |
bogdanm | 66:9c8f0e3462fb | 67 | . = ALIGN(4); |
bogdanm | 66:9c8f0e3462fb | 68 | __init_array_start = .; |
bogdanm | 66:9c8f0e3462fb | 69 | KEEP (*(SORT(.init_array.*))) |
bogdanm | 66:9c8f0e3462fb | 70 | KEEP (*(.init_array)) |
bogdanm | 66:9c8f0e3462fb | 71 | __init_array_end = .; |
bogdanm | 66:9c8f0e3462fb | 72 | |
bogdanm | 66:9c8f0e3462fb | 73 | KEEP(*(.fini)); |
bogdanm | 66:9c8f0e3462fb | 74 | |
bogdanm | 66:9c8f0e3462fb | 75 | . = ALIGN(0x4); |
bogdanm | 66:9c8f0e3462fb | 76 | KEEP (*crtbegin.o(.ctors)) |
bogdanm | 66:9c8f0e3462fb | 77 | KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors)) |
bogdanm | 66:9c8f0e3462fb | 78 | KEEP (*(SORT(.ctors.*))) |
bogdanm | 66:9c8f0e3462fb | 79 | KEEP (*crtend.o(.ctors)) |
bogdanm | 66:9c8f0e3462fb | 80 | |
bogdanm | 66:9c8f0e3462fb | 81 | . = ALIGN(0x4); |
bogdanm | 66:9c8f0e3462fb | 82 | KEEP (*crtbegin.o(.dtors)) |
bogdanm | 66:9c8f0e3462fb | 83 | KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors)) |
bogdanm | 66:9c8f0e3462fb | 84 | KEEP (*(SORT(.dtors.*))) |
bogdanm | 66:9c8f0e3462fb | 85 | KEEP (*crtend.o(.dtors)) |
bogdanm | 66:9c8f0e3462fb | 86 | /* End C++ */ |
bogdanm | 66:9c8f0e3462fb | 87 | } > MFlash512 |
bogdanm | 66:9c8f0e3462fb | 88 | |
bogdanm | 66:9c8f0e3462fb | 89 | /* |
bogdanm | 66:9c8f0e3462fb | 90 | * for exception handling/unwind - some Newlib functions (in common |
bogdanm | 66:9c8f0e3462fb | 91 | * with C++ and STDC++) use this. |
bogdanm | 66:9c8f0e3462fb | 92 | */ |
bogdanm | 66:9c8f0e3462fb | 93 | .ARM.extab : ALIGN(4) |
bogdanm | 66:9c8f0e3462fb | 94 | { |
bogdanm | 66:9c8f0e3462fb | 95 | *(.ARM.extab* .gnu.linkonce.armextab.*) |
bogdanm | 66:9c8f0e3462fb | 96 | } > MFlash512 |
bogdanm | 66:9c8f0e3462fb | 97 | __exidx_start = .; |
bogdanm | 66:9c8f0e3462fb | 98 | |
bogdanm | 66:9c8f0e3462fb | 99 | .ARM.exidx : ALIGN(4) |
bogdanm | 66:9c8f0e3462fb | 100 | { |
bogdanm | 66:9c8f0e3462fb | 101 | *(.ARM.exidx* .gnu.linkonce.armexidx.*) |
bogdanm | 66:9c8f0e3462fb | 102 | } > MFlash512 |
bogdanm | 66:9c8f0e3462fb | 103 | __exidx_end = .; |
bogdanm | 66:9c8f0e3462fb | 104 | |
bogdanm | 66:9c8f0e3462fb | 105 | _etext = .; |
bogdanm | 66:9c8f0e3462fb | 106 | |
bogdanm | 66:9c8f0e3462fb | 107 | |
bogdanm | 66:9c8f0e3462fb | 108 | .data_RAM2 : ALIGN(4) |
bogdanm | 66:9c8f0e3462fb | 109 | { |
bogdanm | 66:9c8f0e3462fb | 110 | FILL(0xff) |
bogdanm | 66:9c8f0e3462fb | 111 | *(.data.$RAM2*) |
bogdanm | 66:9c8f0e3462fb | 112 | *(.data.$RamAHB32*) |
bogdanm | 66:9c8f0e3462fb | 113 | . = ALIGN(4) ; |
Kojto | 108:34e6b704fe68 | 114 | } > RamAHB_USB AT>MFlash512 |
bogdanm | 66:9c8f0e3462fb | 115 | |
bogdanm | 66:9c8f0e3462fb | 116 | /* MAIN DATA SECTION */ |
bogdanm | 66:9c8f0e3462fb | 117 | |
Kojto | 108:34e6b704fe68 | 118 | .uninit_RESERVED(NOLOAD) : ALIGN(4) |
bogdanm | 66:9c8f0e3462fb | 119 | { |
bogdanm | 66:9c8f0e3462fb | 120 | KEEP(*(.bss.$RESERVED*)) |
bogdanm | 66:9c8f0e3462fb | 121 | } > RamLoc32 |
bogdanm | 66:9c8f0e3462fb | 122 | |
bogdanm | 66:9c8f0e3462fb | 123 | .data : ALIGN(4) |
bogdanm | 66:9c8f0e3462fb | 124 | { |
bogdanm | 66:9c8f0e3462fb | 125 | FILL(0xff) |
bogdanm | 66:9c8f0e3462fb | 126 | _data = .; |
bogdanm | 66:9c8f0e3462fb | 127 | *(vtable) |
bogdanm | 66:9c8f0e3462fb | 128 | *(.data*) |
bogdanm | 66:9c8f0e3462fb | 129 | . = ALIGN(4) ; |
bogdanm | 66:9c8f0e3462fb | 130 | _edata = .; |
bogdanm | 66:9c8f0e3462fb | 131 | } > RamLoc32 AT>MFlash512 |
bogdanm | 66:9c8f0e3462fb | 132 | |
bogdanm | 66:9c8f0e3462fb | 133 | |
Kojto | 108:34e6b704fe68 | 134 | .bss_RAM2(NOLOAD) : ALIGN(4) |
bogdanm | 66:9c8f0e3462fb | 135 | { |
bogdanm | 66:9c8f0e3462fb | 136 | *(.bss.$RAM2*) |
bogdanm | 66:9c8f0e3462fb | 137 | *(.bss.$RamAHB32*) |
Kojto | 108:34e6b704fe68 | 138 | *(AHBSRAM0) |
bogdanm | 66:9c8f0e3462fb | 139 | . = ALIGN(4) ; |
Kojto | 108:34e6b704fe68 | 140 | } > RamAHB_USB |
bogdanm | 66:9c8f0e3462fb | 141 | |
Kojto | 108:34e6b704fe68 | 142 | .bss_RAM3(NOLOAD) : ALIGN(4) |
Kojto | 108:34e6b704fe68 | 143 | { |
Kojto | 108:34e6b704fe68 | 144 | *(AHBSRAM1) |
Kojto | 108:34e6b704fe68 | 145 | . = ALIGN(4) ; |
Kojto | 108:34e6b704fe68 | 146 | } > RamAHB_Eth |
bogdanm | 66:9c8f0e3462fb | 147 | /* MAIN BSS SECTION */ |
Kojto | 108:34e6b704fe68 | 148 | .bss(NOLOAD) : ALIGN(4) |
bogdanm | 66:9c8f0e3462fb | 149 | { |
bogdanm | 66:9c8f0e3462fb | 150 | _bss = .; |
bogdanm | 66:9c8f0e3462fb | 151 | *(.bss*) |
bogdanm | 66:9c8f0e3462fb | 152 | *(COMMON) |
bogdanm | 66:9c8f0e3462fb | 153 | . = ALIGN(4) ; |
bogdanm | 66:9c8f0e3462fb | 154 | _ebss = .; |
bogdanm | 66:9c8f0e3462fb | 155 | PROVIDE(end = .); |
bogdanm | 76:824293ae5e43 | 156 | __end__ = .; |
bogdanm | 66:9c8f0e3462fb | 157 | } > RamLoc32 |
bogdanm | 66:9c8f0e3462fb | 158 | |
bogdanm | 66:9c8f0e3462fb | 159 | PROVIDE(_pvHeapStart = .); |
bogdanm | 66:9c8f0e3462fb | 160 | PROVIDE(_vStackTop = __top_RamLoc32 - 0); |
bogdanm | 66:9c8f0e3462fb | 161 | } |