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.

Committer:
bogdanm
Date:
Wed Aug 07 16:43:59 2013 +0300
Revision:
15:4892fe388435
Added LPC4088 target and interrupt chaining code

Who changed what in which revision?

UserRevisionLine numberNew contents of line
bogdanm 15:4892fe388435 1 /*
bogdanm 15:4892fe388435 2 * KL25Z ARM GCC linker script file
bogdanm 15:4892fe388435 3 */
bogdanm 15:4892fe388435 4
bogdanm 15:4892fe388435 5 MEMORY
bogdanm 15:4892fe388435 6 {
bogdanm 15:4892fe388435 7 VECTORS (rx) : ORIGIN = 0x00000000, LENGTH = 0x00000400
bogdanm 15:4892fe388435 8 FLASH_PROTECTION (rx) : ORIGIN = 0x00000400, LENGTH = 0x00000010
bogdanm 15:4892fe388435 9 FLASH (rx) : ORIGIN = 0x00000410, LENGTH = 128K - 0x00000410
bogdanm 15:4892fe388435 10 RAM (rwx) : ORIGIN = 0x1FFFF0C0, LENGTH = 16K - 0xC0
bogdanm 15:4892fe388435 11 }
bogdanm 15:4892fe388435 12
bogdanm 15:4892fe388435 13 /* Linker script to place sections and symbol values. Should be used together
bogdanm 15:4892fe388435 14 * with other linker script that defines memory regions FLASH and RAM.
bogdanm 15:4892fe388435 15 * It references following symbols, which must be defined in code:
bogdanm 15:4892fe388435 16 * _reset_init : Entry of reset handler
bogdanm 15:4892fe388435 17 *
bogdanm 15:4892fe388435 18 * It defines following symbols, which code can use without definition:
bogdanm 15:4892fe388435 19 * __exidx_start
bogdanm 15:4892fe388435 20 * __exidx_end
bogdanm 15:4892fe388435 21 * __etext
bogdanm 15:4892fe388435 22 * __data_start__
bogdanm 15:4892fe388435 23 * __preinit_array_start
bogdanm 15:4892fe388435 24 * __preinit_array_end
bogdanm 15:4892fe388435 25 * __init_array_start
bogdanm 15:4892fe388435 26 * __init_array_end
bogdanm 15:4892fe388435 27 * __fini_array_start
bogdanm 15:4892fe388435 28 * __fini_array_end
bogdanm 15:4892fe388435 29 * __data_end__
bogdanm 15:4892fe388435 30 * __bss_start__
bogdanm 15:4892fe388435 31 * __bss_end__
bogdanm 15:4892fe388435 32 * __end__
bogdanm 15:4892fe388435 33 * end
bogdanm 15:4892fe388435 34 * __HeapLimit
bogdanm 15:4892fe388435 35 * __StackLimit
bogdanm 15:4892fe388435 36 * __StackTop
bogdanm 15:4892fe388435 37 * __stack
bogdanm 15:4892fe388435 38 */
bogdanm 15:4892fe388435 39 ENTRY(Reset_Handler)
bogdanm 15:4892fe388435 40
bogdanm 15:4892fe388435 41 SECTIONS
bogdanm 15:4892fe388435 42 {
bogdanm 15:4892fe388435 43 .isr_vector :
bogdanm 15:4892fe388435 44 {
bogdanm 15:4892fe388435 45 __vector_table = .;
bogdanm 15:4892fe388435 46 KEEP(*(.vector_table))
bogdanm 15:4892fe388435 47 *(.text.Reset_Handler)
bogdanm 15:4892fe388435 48 *(.text.System_Init)
bogdanm 15:4892fe388435 49 . = ALIGN(4);
bogdanm 15:4892fe388435 50 } > VECTORS
bogdanm 15:4892fe388435 51
bogdanm 15:4892fe388435 52 .flash_protect :
bogdanm 15:4892fe388435 53 {
bogdanm 15:4892fe388435 54 KEEP(*(.kinetis_flash_config_field))
bogdanm 15:4892fe388435 55 . = ALIGN(4);
bogdanm 15:4892fe388435 56 } > FLASH_PROTECTION
bogdanm 15:4892fe388435 57
bogdanm 15:4892fe388435 58 .text :
bogdanm 15:4892fe388435 59 {
bogdanm 15:4892fe388435 60 *(.text*)
bogdanm 15:4892fe388435 61
bogdanm 15:4892fe388435 62 KEEP(*(.init))
bogdanm 15:4892fe388435 63 KEEP(*(.fini))
bogdanm 15:4892fe388435 64
bogdanm 15:4892fe388435 65 /* .ctors */
bogdanm 15:4892fe388435 66 *crtbegin.o(.ctors)
bogdanm 15:4892fe388435 67 *crtbegin?.o(.ctors)
bogdanm 15:4892fe388435 68 *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
bogdanm 15:4892fe388435 69 *(SORT(.ctors.*))
bogdanm 15:4892fe388435 70 *(.ctors)
bogdanm 15:4892fe388435 71
bogdanm 15:4892fe388435 72 /* .dtors */
bogdanm 15:4892fe388435 73 *crtbegin.o(.dtors)
bogdanm 15:4892fe388435 74 *crtbegin?.o(.dtors)
bogdanm 15:4892fe388435 75 *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
bogdanm 15:4892fe388435 76 *(SORT(.dtors.*))
bogdanm 15:4892fe388435 77 *(.dtors)
bogdanm 15:4892fe388435 78
bogdanm 15:4892fe388435 79 *(.rodata*)
bogdanm 15:4892fe388435 80
bogdanm 15:4892fe388435 81 KEEP(*(.eh_frame*))
bogdanm 15:4892fe388435 82 } > FLASH
bogdanm 15:4892fe388435 83
bogdanm 15:4892fe388435 84 .ARM.extab :
bogdanm 15:4892fe388435 85 {
bogdanm 15:4892fe388435 86 *(.ARM.extab* .gnu.linkonce.armextab.*)
bogdanm 15:4892fe388435 87 } > FLASH
bogdanm 15:4892fe388435 88
bogdanm 15:4892fe388435 89 __exidx_start = .;
bogdanm 15:4892fe388435 90 .ARM.exidx :
bogdanm 15:4892fe388435 91 {
bogdanm 15:4892fe388435 92 *(.ARM.exidx* .gnu.linkonce.armexidx.*)
bogdanm 15:4892fe388435 93 } > FLASH
bogdanm 15:4892fe388435 94 __exidx_end = .;
bogdanm 15:4892fe388435 95
bogdanm 15:4892fe388435 96 __etext = .;
bogdanm 15:4892fe388435 97
bogdanm 15:4892fe388435 98 .data : AT (__etext)
bogdanm 15:4892fe388435 99 {
bogdanm 15:4892fe388435 100 __data_start__ = .;
bogdanm 15:4892fe388435 101 *(vtable)
bogdanm 15:4892fe388435 102 *(.data*)
bogdanm 15:4892fe388435 103
bogdanm 15:4892fe388435 104 . = ALIGN(4);
bogdanm 15:4892fe388435 105 /* preinit data */
bogdanm 15:4892fe388435 106 PROVIDE_HIDDEN (__preinit_array_start = .);
bogdanm 15:4892fe388435 107 KEEP(*(.preinit_array))
bogdanm 15:4892fe388435 108 PROVIDE_HIDDEN (__preinit_array_end = .);
bogdanm 15:4892fe388435 109
bogdanm 15:4892fe388435 110 . = ALIGN(4);
bogdanm 15:4892fe388435 111 /* init data */
bogdanm 15:4892fe388435 112 PROVIDE_HIDDEN (__init_array_start = .);
bogdanm 15:4892fe388435 113 KEEP(*(SORT(.init_array.*)))
bogdanm 15:4892fe388435 114 KEEP(*(.init_array))
bogdanm 15:4892fe388435 115 PROVIDE_HIDDEN (__init_array_end = .);
bogdanm 15:4892fe388435 116
bogdanm 15:4892fe388435 117
bogdanm 15:4892fe388435 118 . = ALIGN(4);
bogdanm 15:4892fe388435 119 /* finit data */
bogdanm 15:4892fe388435 120 PROVIDE_HIDDEN (__fini_array_start = .);
bogdanm 15:4892fe388435 121 KEEP(*(SORT(.fini_array.*)))
bogdanm 15:4892fe388435 122 KEEP(*(.fini_array))
bogdanm 15:4892fe388435 123 PROVIDE_HIDDEN (__fini_array_end = .);
bogdanm 15:4892fe388435 124
bogdanm 15:4892fe388435 125 . = ALIGN(4);
bogdanm 15:4892fe388435 126 /* All data end */
bogdanm 15:4892fe388435 127 __data_end__ = .;
bogdanm 15:4892fe388435 128
bogdanm 15:4892fe388435 129 } > RAM
bogdanm 15:4892fe388435 130
bogdanm 15:4892fe388435 131 .bss :
bogdanm 15:4892fe388435 132 {
bogdanm 15:4892fe388435 133 __bss_start__ = .;
bogdanm 15:4892fe388435 134 *(.bss*)
bogdanm 15:4892fe388435 135 *(COMMON)
bogdanm 15:4892fe388435 136 __bss_end__ = .;
bogdanm 15:4892fe388435 137 } > RAM
bogdanm 15:4892fe388435 138
bogdanm 15:4892fe388435 139 .heap :
bogdanm 15:4892fe388435 140 {
bogdanm 15:4892fe388435 141 __end__ = .;
bogdanm 15:4892fe388435 142 end = __end__;
bogdanm 15:4892fe388435 143 *(.heap*)
bogdanm 15:4892fe388435 144 __HeapLimit = .;
bogdanm 15:4892fe388435 145 } > RAM
bogdanm 15:4892fe388435 146
bogdanm 15:4892fe388435 147 /* .stack_dummy section doesn't contains any symbols. It is only
bogdanm 15:4892fe388435 148 * used for linker to calculate size of stack sections, and assign
bogdanm 15:4892fe388435 149 * values to stack symbols later */
bogdanm 15:4892fe388435 150 .stack_dummy :
bogdanm 15:4892fe388435 151 {
bogdanm 15:4892fe388435 152 *(.stack)
bogdanm 15:4892fe388435 153 } > RAM
bogdanm 15:4892fe388435 154
bogdanm 15:4892fe388435 155 /* Set stack top to end of RAM, and stack limit move down by
bogdanm 15:4892fe388435 156 * size of stack_dummy section */
bogdanm 15:4892fe388435 157 __StackTop = ORIGIN(RAM) + LENGTH(RAM);
bogdanm 15:4892fe388435 158 __StackLimit = __StackTop - SIZEOF(.stack_dummy);
bogdanm 15:4892fe388435 159 PROVIDE(__stack = __StackTop);
bogdanm 15:4892fe388435 160
bogdanm 15:4892fe388435 161 /* Check if data + heap + stack exceeds RAM limit */
bogdanm 15:4892fe388435 162 ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack")
bogdanm 15:4892fe388435 163 }