mbed library sources
Dependents: Encrypted my_mbed lklk CyaSSL_DTLS_Cellular ... more
Superseded
This library was superseded by mbed-dev - https://os.mbed.com/users/mbed_official/code/mbed-dev/.
Development branch of the mbed library sources. This library is kept in synch with the latest changes from the mbed SDK and it is not guaranteed to work.
If you are looking for a stable and tested release, please import one of the official mbed library releases:
Import librarymbed
The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.
targets/cmsis/TARGET_NXP/TARGET_LPC176X/TOOLCHAIN_GCC_ARM/LPC1768.ld@600:7d17ca308cd1, 2015-07-31 (annotated)
- Committer:
- mbed_official
- Date:
- Fri Jul 31 14:15:09 2015 +0100
- Revision:
- 600:7d17ca308cd1
- Parent:
- 19:398f4c622e1b
Synchronized with git revision e4cd8bbd3e05b68e5a7f466c74035a85743d45e0
Full URL: https://github.com/mbedmicro/mbed/commit/e4cd8bbd3e05b68e5a7f466c74035a85743d45e0/
Enable LPC8xx usart when configuring it
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
emilmont | 10:3bc89ef62ce7 | 1 | /* Linker script for mbed LPC1768 */ |
emilmont | 10:3bc89ef62ce7 | 2 | |
emilmont | 10:3bc89ef62ce7 | 3 | /* Linker script to configure memory regions. */ |
emilmont | 10:3bc89ef62ce7 | 4 | MEMORY |
emilmont | 10:3bc89ef62ce7 | 5 | { |
emilmont | 10:3bc89ef62ce7 | 6 | FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 512K |
bogdanm | 19:398f4c622e1b | 7 | RAM (rwx) : ORIGIN = 0x100000C8, LENGTH = (32K - 0xC8) |
emilmont | 10:3bc89ef62ce7 | 8 | |
emilmont | 10:3bc89ef62ce7 | 9 | USB_RAM(rwx) : ORIGIN = 0x2007C000, LENGTH = 16K |
emilmont | 10:3bc89ef62ce7 | 10 | ETH_RAM(rwx) : ORIGIN = 0x20080000, LENGTH = 16K |
emilmont | 10:3bc89ef62ce7 | 11 | } |
emilmont | 10:3bc89ef62ce7 | 12 | |
emilmont | 10:3bc89ef62ce7 | 13 | /* Linker script to place sections and symbol values. Should be used together |
emilmont | 10:3bc89ef62ce7 | 14 | * with other linker script that defines memory regions FLASH and RAM. |
emilmont | 10:3bc89ef62ce7 | 15 | * It references following symbols, which must be defined in code: |
emilmont | 10:3bc89ef62ce7 | 16 | * Reset_Handler : Entry of reset handler |
emilmont | 10:3bc89ef62ce7 | 17 | * |
emilmont | 10:3bc89ef62ce7 | 18 | * It defines following symbols, which code can use without definition: |
emilmont | 10:3bc89ef62ce7 | 19 | * __exidx_start |
emilmont | 10:3bc89ef62ce7 | 20 | * __exidx_end |
emilmont | 10:3bc89ef62ce7 | 21 | * __etext |
emilmont | 10:3bc89ef62ce7 | 22 | * __data_start__ |
emilmont | 10:3bc89ef62ce7 | 23 | * __preinit_array_start |
emilmont | 10:3bc89ef62ce7 | 24 | * __preinit_array_end |
emilmont | 10:3bc89ef62ce7 | 25 | * __init_array_start |
emilmont | 10:3bc89ef62ce7 | 26 | * __init_array_end |
emilmont | 10:3bc89ef62ce7 | 27 | * __fini_array_start |
emilmont | 10:3bc89ef62ce7 | 28 | * __fini_array_end |
emilmont | 10:3bc89ef62ce7 | 29 | * __data_end__ |
emilmont | 10:3bc89ef62ce7 | 30 | * __bss_start__ |
emilmont | 10:3bc89ef62ce7 | 31 | * __bss_end__ |
emilmont | 10:3bc89ef62ce7 | 32 | * __end__ |
emilmont | 10:3bc89ef62ce7 | 33 | * end |
emilmont | 10:3bc89ef62ce7 | 34 | * __HeapLimit |
emilmont | 10:3bc89ef62ce7 | 35 | * __StackLimit |
emilmont | 10:3bc89ef62ce7 | 36 | * __StackTop |
emilmont | 10:3bc89ef62ce7 | 37 | * __stack |
emilmont | 10:3bc89ef62ce7 | 38 | */ |
emilmont | 10:3bc89ef62ce7 | 39 | ENTRY(Reset_Handler) |
emilmont | 10:3bc89ef62ce7 | 40 | |
emilmont | 10:3bc89ef62ce7 | 41 | SECTIONS |
emilmont | 10:3bc89ef62ce7 | 42 | { |
emilmont | 10:3bc89ef62ce7 | 43 | .text : |
emilmont | 10:3bc89ef62ce7 | 44 | { |
emilmont | 10:3bc89ef62ce7 | 45 | KEEP(*(.isr_vector)) |
emilmont | 10:3bc89ef62ce7 | 46 | *(.text*) |
emilmont | 10:3bc89ef62ce7 | 47 | |
emilmont | 10:3bc89ef62ce7 | 48 | KEEP(*(.init)) |
emilmont | 10:3bc89ef62ce7 | 49 | KEEP(*(.fini)) |
emilmont | 10:3bc89ef62ce7 | 50 | |
emilmont | 10:3bc89ef62ce7 | 51 | /* .ctors */ |
emilmont | 10:3bc89ef62ce7 | 52 | *crtbegin.o(.ctors) |
emilmont | 10:3bc89ef62ce7 | 53 | *crtbegin?.o(.ctors) |
emilmont | 10:3bc89ef62ce7 | 54 | *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) |
emilmont | 10:3bc89ef62ce7 | 55 | *(SORT(.ctors.*)) |
emilmont | 10:3bc89ef62ce7 | 56 | *(.ctors) |
emilmont | 10:3bc89ef62ce7 | 57 | |
emilmont | 10:3bc89ef62ce7 | 58 | /* .dtors */ |
emilmont | 10:3bc89ef62ce7 | 59 | *crtbegin.o(.dtors) |
emilmont | 10:3bc89ef62ce7 | 60 | *crtbegin?.o(.dtors) |
emilmont | 10:3bc89ef62ce7 | 61 | *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) |
emilmont | 10:3bc89ef62ce7 | 62 | *(SORT(.dtors.*)) |
emilmont | 10:3bc89ef62ce7 | 63 | *(.dtors) |
emilmont | 10:3bc89ef62ce7 | 64 | |
emilmont | 10:3bc89ef62ce7 | 65 | *(.rodata*) |
emilmont | 10:3bc89ef62ce7 | 66 | |
emilmont | 10:3bc89ef62ce7 | 67 | KEEP(*(.eh_frame*)) |
emilmont | 10:3bc89ef62ce7 | 68 | } > FLASH |
emilmont | 10:3bc89ef62ce7 | 69 | |
emilmont | 10:3bc89ef62ce7 | 70 | .ARM.extab : |
emilmont | 10:3bc89ef62ce7 | 71 | { |
emilmont | 10:3bc89ef62ce7 | 72 | *(.ARM.extab* .gnu.linkonce.armextab.*) |
emilmont | 10:3bc89ef62ce7 | 73 | } > FLASH |
emilmont | 10:3bc89ef62ce7 | 74 | |
emilmont | 10:3bc89ef62ce7 | 75 | __exidx_start = .; |
emilmont | 10:3bc89ef62ce7 | 76 | .ARM.exidx : |
emilmont | 10:3bc89ef62ce7 | 77 | { |
emilmont | 10:3bc89ef62ce7 | 78 | *(.ARM.exidx* .gnu.linkonce.armexidx.*) |
emilmont | 10:3bc89ef62ce7 | 79 | } > FLASH |
emilmont | 10:3bc89ef62ce7 | 80 | __exidx_end = .; |
emilmont | 10:3bc89ef62ce7 | 81 | |
emilmont | 10:3bc89ef62ce7 | 82 | __etext = .; |
emilmont | 10:3bc89ef62ce7 | 83 | |
emilmont | 10:3bc89ef62ce7 | 84 | .data : AT (__etext) |
emilmont | 10:3bc89ef62ce7 | 85 | { |
emilmont | 10:3bc89ef62ce7 | 86 | __data_start__ = .; |
bogdanm | 19:398f4c622e1b | 87 | Image$$RW_IRAM1$$Base = .; |
emilmont | 10:3bc89ef62ce7 | 88 | *(vtable) |
emilmont | 10:3bc89ef62ce7 | 89 | *(.data*) |
emilmont | 10:3bc89ef62ce7 | 90 | |
emilmont | 10:3bc89ef62ce7 | 91 | . = ALIGN(4); |
emilmont | 10:3bc89ef62ce7 | 92 | /* preinit data */ |
emilmont | 10:3bc89ef62ce7 | 93 | PROVIDE (__preinit_array_start = .); |
emilmont | 10:3bc89ef62ce7 | 94 | KEEP(*(.preinit_array)) |
emilmont | 10:3bc89ef62ce7 | 95 | PROVIDE (__preinit_array_end = .); |
emilmont | 10:3bc89ef62ce7 | 96 | |
emilmont | 10:3bc89ef62ce7 | 97 | . = ALIGN(4); |
emilmont | 10:3bc89ef62ce7 | 98 | /* init data */ |
emilmont | 10:3bc89ef62ce7 | 99 | PROVIDE (__init_array_start = .); |
emilmont | 10:3bc89ef62ce7 | 100 | KEEP(*(SORT(.init_array.*))) |
emilmont | 10:3bc89ef62ce7 | 101 | KEEP(*(.init_array)) |
emilmont | 10:3bc89ef62ce7 | 102 | PROVIDE (__init_array_end = .); |
emilmont | 10:3bc89ef62ce7 | 103 | |
emilmont | 10:3bc89ef62ce7 | 104 | |
emilmont | 10:3bc89ef62ce7 | 105 | . = ALIGN(4); |
emilmont | 10:3bc89ef62ce7 | 106 | /* finit data */ |
emilmont | 10:3bc89ef62ce7 | 107 | PROVIDE (__fini_array_start = .); |
emilmont | 10:3bc89ef62ce7 | 108 | KEEP(*(SORT(.fini_array.*))) |
emilmont | 10:3bc89ef62ce7 | 109 | KEEP(*(.fini_array)) |
emilmont | 10:3bc89ef62ce7 | 110 | PROVIDE (__fini_array_end = .); |
emilmont | 10:3bc89ef62ce7 | 111 | |
emilmont | 10:3bc89ef62ce7 | 112 | . = ALIGN(4); |
emilmont | 10:3bc89ef62ce7 | 113 | /* All data end */ |
emilmont | 10:3bc89ef62ce7 | 114 | __data_end__ = .; |
emilmont | 10:3bc89ef62ce7 | 115 | |
emilmont | 10:3bc89ef62ce7 | 116 | } > RAM |
emilmont | 10:3bc89ef62ce7 | 117 | |
bogdanm | 19:398f4c622e1b | 118 | |
emilmont | 10:3bc89ef62ce7 | 119 | .bss : |
emilmont | 10:3bc89ef62ce7 | 120 | { |
emilmont | 10:3bc89ef62ce7 | 121 | __bss_start__ = .; |
emilmont | 10:3bc89ef62ce7 | 122 | *(.bss*) |
emilmont | 10:3bc89ef62ce7 | 123 | *(COMMON) |
emilmont | 10:3bc89ef62ce7 | 124 | __bss_end__ = .; |
bogdanm | 19:398f4c622e1b | 125 | Image$$RW_IRAM1$$ZI$$Limit = . ; |
emilmont | 10:3bc89ef62ce7 | 126 | } > RAM |
bogdanm | 19:398f4c622e1b | 127 | |
emilmont | 10:3bc89ef62ce7 | 128 | |
emilmont | 10:3bc89ef62ce7 | 129 | .heap : |
emilmont | 10:3bc89ef62ce7 | 130 | { |
emilmont | 10:3bc89ef62ce7 | 131 | __end__ = .; |
emilmont | 10:3bc89ef62ce7 | 132 | end = __end__; |
emilmont | 10:3bc89ef62ce7 | 133 | *(.heap*) |
emilmont | 10:3bc89ef62ce7 | 134 | __HeapLimit = .; |
emilmont | 10:3bc89ef62ce7 | 135 | } > RAM |
emilmont | 10:3bc89ef62ce7 | 136 | |
emilmont | 10:3bc89ef62ce7 | 137 | /* .stack_dummy section doesn't contains any symbols. It is only |
emilmont | 10:3bc89ef62ce7 | 138 | * used for linker to calculate size of stack sections, and assign |
emilmont | 10:3bc89ef62ce7 | 139 | * values to stack symbols later */ |
emilmont | 10:3bc89ef62ce7 | 140 | .stack_dummy : |
emilmont | 10:3bc89ef62ce7 | 141 | { |
emilmont | 10:3bc89ef62ce7 | 142 | *(.stack) |
emilmont | 10:3bc89ef62ce7 | 143 | } > RAM |
emilmont | 10:3bc89ef62ce7 | 144 | |
emilmont | 10:3bc89ef62ce7 | 145 | /* Set stack top to end of RAM, and stack limit move down by |
emilmont | 10:3bc89ef62ce7 | 146 | * size of stack_dummy section */ |
emilmont | 10:3bc89ef62ce7 | 147 | __StackTop = ORIGIN(RAM) + LENGTH(RAM); |
emilmont | 10:3bc89ef62ce7 | 148 | __StackLimit = __StackTop - SIZEOF(.stack_dummy); |
emilmont | 10:3bc89ef62ce7 | 149 | PROVIDE(__stack = __StackTop); |
emilmont | 10:3bc89ef62ce7 | 150 | |
emilmont | 10:3bc89ef62ce7 | 151 | /* Check if data + heap + stack exceeds RAM limit */ |
emilmont | 10:3bc89ef62ce7 | 152 | ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") |
bogdanm | 19:398f4c622e1b | 153 | |
bogdanm | 19:398f4c622e1b | 154 | |
bogdanm | 19:398f4c622e1b | 155 | /* Code can explicitly ask for data to be |
bogdanm | 19:398f4c622e1b | 156 | placed in these higher RAM banks where |
bogdanm | 19:398f4c622e1b | 157 | they will be left uninitialized. |
bogdanm | 19:398f4c622e1b | 158 | */ |
bogdanm | 19:398f4c622e1b | 159 | .AHBSRAM0 (NOLOAD): |
bogdanm | 19:398f4c622e1b | 160 | { |
bogdanm | 19:398f4c622e1b | 161 | Image$$RW_IRAM2$$Base = . ; |
bogdanm | 19:398f4c622e1b | 162 | *(AHBSRAM0) |
bogdanm | 19:398f4c622e1b | 163 | Image$$RW_IRAM2$$ZI$$Limit = .; |
bogdanm | 19:398f4c622e1b | 164 | } > USB_RAM |
bogdanm | 19:398f4c622e1b | 165 | |
bogdanm | 19:398f4c622e1b | 166 | .AHBSRAM1 (NOLOAD): |
bogdanm | 19:398f4c622e1b | 167 | { |
bogdanm | 19:398f4c622e1b | 168 | Image$$RW_IRAM3$$Base = . ; |
bogdanm | 19:398f4c622e1b | 169 | *(AHBSRAM1) |
bogdanm | 19:398f4c622e1b | 170 | Image$$RW_IRAM3$$ZI$$Limit = .; |
bogdanm | 19:398f4c622e1b | 171 | } > ETH_RAM |
emilmont | 10:3bc89ef62ce7 | 172 | } |