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:
mbed_official
Date:
Fri Jul 31 14:15:09 2015 +0100
Revision:
600:7d17ca308cd1
Parent:
507:d4fc7603a669
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?

UserRevisionLine numberNew contents of line
mbed_official 507:d4fc7603a669 1 /*******************************************************************************
mbed_official 507:d4fc7603a669 2 * Copyright (C) 2015 Maxim Integrated Products, Inc., All Rights Reserved.
mbed_official 507:d4fc7603a669 3 *
mbed_official 507:d4fc7603a669 4 * Permission is hereby granted, free of charge, to any person obtaining a
mbed_official 507:d4fc7603a669 5 * copy of this software and associated documentation files (the "Software"),
mbed_official 507:d4fc7603a669 6 * to deal in the Software without restriction, including without limitation
mbed_official 507:d4fc7603a669 7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
mbed_official 507:d4fc7603a669 8 * and/or sell copies of the Software, and to permit persons to whom the
mbed_official 507:d4fc7603a669 9 * Software is furnished to do so, subject to the following conditions:
mbed_official 507:d4fc7603a669 10 *
mbed_official 507:d4fc7603a669 11 * The above copyright notice and this permission notice shall be included
mbed_official 507:d4fc7603a669 12 * in all copies or substantial portions of the Software.
mbed_official 507:d4fc7603a669 13 *
mbed_official 507:d4fc7603a669 14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
mbed_official 507:d4fc7603a669 15 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
mbed_official 507:d4fc7603a669 16 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
mbed_official 507:d4fc7603a669 17 * IN NO EVENT SHALL MAXIM INTEGRATED BE LIABLE FOR ANY CLAIM, DAMAGES
mbed_official 507:d4fc7603a669 18 * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
mbed_official 507:d4fc7603a669 19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
mbed_official 507:d4fc7603a669 20 * OTHER DEALINGS IN THE SOFTWARE.
mbed_official 507:d4fc7603a669 21 *
mbed_official 507:d4fc7603a669 22 * Except as contained in this notice, the name of Maxim Integrated
mbed_official 507:d4fc7603a669 23 * Products, Inc. shall not be used except as stated in the Maxim Integrated
mbed_official 507:d4fc7603a669 24 * Products, Inc. Branding Policy.
mbed_official 507:d4fc7603a669 25 *
mbed_official 507:d4fc7603a669 26 * The mere transfer of this software does not imply any licenses
mbed_official 507:d4fc7603a669 27 * of trade secrets, proprietary technology, copyrights, patents,
mbed_official 507:d4fc7603a669 28 * trademarks, maskwork rights, or any other form of intellectual
mbed_official 507:d4fc7603a669 29 * property whatsoever. Maxim Integrated Products, Inc. retains all
mbed_official 507:d4fc7603a669 30 * ownership rights.
mbed_official 507:d4fc7603a669 31 *******************************************************************************
mbed_official 507:d4fc7603a669 32 */
mbed_official 507:d4fc7603a669 33
mbed_official 507:d4fc7603a669 34 /******************************************************************************
mbed_official 507:d4fc7603a669 35 *
mbed_official 507:d4fc7603a669 36 * Linker configuration file, default ARM Cortex M3 produced by Maxim Integrated Inc.
mbed_official 507:d4fc7603a669 37 *
mbed_official 507:d4fc7603a669 38 *****************************************************************************/
mbed_official 507:d4fc7603a669 39
mbed_official 507:d4fc7603a669 40 MEMORY
mbed_official 507:d4fc7603a669 41 {
mbed_official 507:d4fc7603a669 42 FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x00040000 /* start from 0x0, fullsize flash, 256k */
mbed_official 507:d4fc7603a669 43 RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00008000 /* full-size SRAM, 32k */
mbed_official 507:d4fc7603a669 44 }
mbed_official 507:d4fc7603a669 45
mbed_official 507:d4fc7603a669 46 /* Linker script to place sections and symbol values. Should be used together
mbed_official 507:d4fc7603a669 47 * with other linker script that defines memory regions FLASH and RAM.
mbed_official 507:d4fc7603a669 48 * It references following symbols, which must be defined in code:
mbed_official 507:d4fc7603a669 49 * Reset_Handler : Entry of reset handler
mbed_official 507:d4fc7603a669 50 *
mbed_official 507:d4fc7603a669 51 * It defines following symbols, which code can use without definition:
mbed_official 507:d4fc7603a669 52 * __exidx_start
mbed_official 507:d4fc7603a669 53 * __exidx_end
mbed_official 507:d4fc7603a669 54 * __etext
mbed_official 507:d4fc7603a669 55 * __data_start__
mbed_official 507:d4fc7603a669 56 * __preinit_array_start
mbed_official 507:d4fc7603a669 57 * __preinit_array_end
mbed_official 507:d4fc7603a669 58 * __init_array_start
mbed_official 507:d4fc7603a669 59 * __init_array_end
mbed_official 507:d4fc7603a669 60 * __fini_array_start
mbed_official 507:d4fc7603a669 61 * __fini_array_end
mbed_official 507:d4fc7603a669 62 * __data_end__
mbed_official 507:d4fc7603a669 63 * __bss_start__
mbed_official 507:d4fc7603a669 64 * __bss_end__
mbed_official 507:d4fc7603a669 65 * __end__
mbed_official 507:d4fc7603a669 66 * end
mbed_official 507:d4fc7603a669 67 * __HeapLimit
mbed_official 507:d4fc7603a669 68 * __StackLimit
mbed_official 507:d4fc7603a669 69 * __StackTop
mbed_official 507:d4fc7603a669 70 * __stack
mbed_official 507:d4fc7603a669 71 */
mbed_official 507:d4fc7603a669 72 ENTRY(Reset_Handler)
mbed_official 507:d4fc7603a669 73
mbed_official 507:d4fc7603a669 74 SECTIONS
mbed_official 507:d4fc7603a669 75 {
mbed_official 507:d4fc7603a669 76 .text :
mbed_official 507:d4fc7603a669 77 {
mbed_official 507:d4fc7603a669 78 KEEP(*(.isr_vector))
mbed_official 507:d4fc7603a669 79 *(.text*)
mbed_official 507:d4fc7603a669 80
mbed_official 507:d4fc7603a669 81 KEEP(*(.init))
mbed_official 507:d4fc7603a669 82 KEEP(*(.fini))
mbed_official 507:d4fc7603a669 83
mbed_official 507:d4fc7603a669 84 /* .ctors */
mbed_official 507:d4fc7603a669 85 *crtbegin.o(.ctors)
mbed_official 507:d4fc7603a669 86 *crtbegin?.o(.ctors)
mbed_official 507:d4fc7603a669 87 *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
mbed_official 507:d4fc7603a669 88 *(SORT(.ctors.*))
mbed_official 507:d4fc7603a669 89 *(.ctors)
mbed_official 507:d4fc7603a669 90
mbed_official 507:d4fc7603a669 91 /* .dtors */
mbed_official 507:d4fc7603a669 92 *crtbegin.o(.dtors)
mbed_official 507:d4fc7603a669 93 *crtbegin?.o(.dtors)
mbed_official 507:d4fc7603a669 94 *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
mbed_official 507:d4fc7603a669 95 *(SORT(.dtors.*))
mbed_official 507:d4fc7603a669 96 *(.dtors)
mbed_official 507:d4fc7603a669 97
mbed_official 507:d4fc7603a669 98 *(.rodata*)
mbed_official 507:d4fc7603a669 99
mbed_official 507:d4fc7603a669 100 KEEP(*(.eh_frame*))
mbed_official 507:d4fc7603a669 101 } > FLASH
mbed_official 507:d4fc7603a669 102
mbed_official 507:d4fc7603a669 103 .ARM.extab :
mbed_official 507:d4fc7603a669 104 {
mbed_official 507:d4fc7603a669 105 *(.ARM.extab* .gnu.linkonce.armextab.*)
mbed_official 507:d4fc7603a669 106 } > FLASH
mbed_official 507:d4fc7603a669 107
mbed_official 507:d4fc7603a669 108 __exidx_start = .;
mbed_official 507:d4fc7603a669 109 .ARM.exidx :
mbed_official 507:d4fc7603a669 110 {
mbed_official 507:d4fc7603a669 111 *(.ARM.exidx* .gnu.linkonce.armexidx.*)
mbed_official 507:d4fc7603a669 112 } > FLASH
mbed_official 507:d4fc7603a669 113 __exidx_end = .;
mbed_official 507:d4fc7603a669 114
mbed_official 507:d4fc7603a669 115 __etext = .;
mbed_official 507:d4fc7603a669 116
mbed_official 507:d4fc7603a669 117 .data : AT (__etext)
mbed_official 507:d4fc7603a669 118 {
mbed_official 507:d4fc7603a669 119 __data_start__ = .;
mbed_official 507:d4fc7603a669 120 *(vtable)
mbed_official 507:d4fc7603a669 121 *(.data*)
mbed_official 507:d4fc7603a669 122
mbed_official 507:d4fc7603a669 123 . = ALIGN(4);
mbed_official 507:d4fc7603a669 124 /* preinit data */
mbed_official 507:d4fc7603a669 125 PROVIDE_HIDDEN (__preinit_array_start = .);
mbed_official 507:d4fc7603a669 126 KEEP(*(.preinit_array))
mbed_official 507:d4fc7603a669 127 PROVIDE_HIDDEN (__preinit_array_end = .);
mbed_official 507:d4fc7603a669 128
mbed_official 507:d4fc7603a669 129 . = ALIGN(4);
mbed_official 507:d4fc7603a669 130 /* init data */
mbed_official 507:d4fc7603a669 131 PROVIDE_HIDDEN (__init_array_start = .);
mbed_official 507:d4fc7603a669 132 KEEP(*(SORT(.init_array.*)))
mbed_official 507:d4fc7603a669 133 KEEP(*(.init_array))
mbed_official 507:d4fc7603a669 134 PROVIDE_HIDDEN (__init_array_end = .);
mbed_official 507:d4fc7603a669 135
mbed_official 507:d4fc7603a669 136
mbed_official 507:d4fc7603a669 137 . = ALIGN(4);
mbed_official 507:d4fc7603a669 138 /* finit data */
mbed_official 507:d4fc7603a669 139 PROVIDE_HIDDEN (__fini_array_start = .);
mbed_official 507:d4fc7603a669 140 KEEP(*(SORT(.fini_array.*)))
mbed_official 507:d4fc7603a669 141 KEEP(*(.fini_array))
mbed_official 507:d4fc7603a669 142 PROVIDE_HIDDEN (__fini_array_end = .);
mbed_official 507:d4fc7603a669 143
mbed_official 507:d4fc7603a669 144 . = ALIGN(4);
mbed_official 507:d4fc7603a669 145 /* All data end */
mbed_official 507:d4fc7603a669 146 __data_end__ = .;
mbed_official 507:d4fc7603a669 147
mbed_official 507:d4fc7603a669 148 } > RAM
mbed_official 507:d4fc7603a669 149
mbed_official 507:d4fc7603a669 150 .bss :
mbed_official 507:d4fc7603a669 151 {
mbed_official 507:d4fc7603a669 152 __bss_start__ = .;
mbed_official 507:d4fc7603a669 153 *(.bss*)
mbed_official 507:d4fc7603a669 154 *(COMMON)
mbed_official 507:d4fc7603a669 155 __bss_end__ = .;
mbed_official 507:d4fc7603a669 156 } > RAM
mbed_official 507:d4fc7603a669 157
mbed_official 507:d4fc7603a669 158 .heap :
mbed_official 507:d4fc7603a669 159 {
mbed_official 507:d4fc7603a669 160 __end__ = .;
mbed_official 507:d4fc7603a669 161 end = __end__;
mbed_official 507:d4fc7603a669 162 *(.heap*)
mbed_official 507:d4fc7603a669 163 __HeapLimit = .;
mbed_official 507:d4fc7603a669 164 } > RAM
mbed_official 507:d4fc7603a669 165
mbed_official 507:d4fc7603a669 166 /* .stack_dummy section doesn't contains any symbols. It is only
mbed_official 507:d4fc7603a669 167 * used for linker to calculate size of stack sections, and assign
mbed_official 507:d4fc7603a669 168 * values to stack symbols later */
mbed_official 507:d4fc7603a669 169 .stack_dummy :
mbed_official 507:d4fc7603a669 170 {
mbed_official 507:d4fc7603a669 171 *(.stack)
mbed_official 507:d4fc7603a669 172 } > RAM
mbed_official 507:d4fc7603a669 173
mbed_official 507:d4fc7603a669 174 /* Set stack top to end of RAM, and stack limit move down by
mbed_official 507:d4fc7603a669 175 * size of stack_dummy section */
mbed_official 507:d4fc7603a669 176 __StackTop = ORIGIN(RAM) + LENGTH(RAM);
mbed_official 507:d4fc7603a669 177 __StackLimit = __StackTop - SIZEOF(.stack_dummy);
mbed_official 507:d4fc7603a669 178 PROVIDE(__stack = __StackTop);
mbed_official 507:d4fc7603a669 179
mbed_official 507:d4fc7603a669 180 /* Check if data + heap + stack exceeds RAM limit */
mbed_official 507:d4fc7603a669 181 ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack")
mbed_official 507:d4fc7603a669 182 }