added prescaler for 16 bit pwm in LPC1347 target
Fork of mbed-dev by
targets/cmsis/TARGET_ARM_SSG/TARGET_BEETLE/TOOLCHAIN_GCC_ARM/BEETLE.ld@144:ef7eb2e8f9f7, 2016-09-02 (annotated)
- Committer:
- <>
- Date:
- Fri Sep 02 15:07:44 2016 +0100
- Revision:
- 144:ef7eb2e8f9f7
This updates the lib to the mbed lib v125
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
<> | 144:ef7eb2e8f9f7 | 1 | /* |
<> | 144:ef7eb2e8f9f7 | 2 | * BEETLE CMSIS Library |
<> | 144:ef7eb2e8f9f7 | 3 | */ |
<> | 144:ef7eb2e8f9f7 | 4 | /* |
<> | 144:ef7eb2e8f9f7 | 5 | * Copyright (c) 2009-2016 ARM Limited. All rights reserved. |
<> | 144:ef7eb2e8f9f7 | 6 | * |
<> | 144:ef7eb2e8f9f7 | 7 | * SPDX-License-Identifier: Apache-2.0 |
<> | 144:ef7eb2e8f9f7 | 8 | * |
<> | 144:ef7eb2e8f9f7 | 9 | * Licensed under the Apache License, Version 2.0 (the License); you may |
<> | 144:ef7eb2e8f9f7 | 10 | * not use this file except in compliance with the License. |
<> | 144:ef7eb2e8f9f7 | 11 | * You may obtain a copy of the License at |
<> | 144:ef7eb2e8f9f7 | 12 | * |
<> | 144:ef7eb2e8f9f7 | 13 | * http://www.apache.org/licenses/LICENSE-2.0 |
<> | 144:ef7eb2e8f9f7 | 14 | * |
<> | 144:ef7eb2e8f9f7 | 15 | * Unless required by applicable law or agreed to in writing, software |
<> | 144:ef7eb2e8f9f7 | 16 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT |
<> | 144:ef7eb2e8f9f7 | 17 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
<> | 144:ef7eb2e8f9f7 | 18 | * See the License for the specific language governing permissions and |
<> | 144:ef7eb2e8f9f7 | 19 | * limitations under the License. |
<> | 144:ef7eb2e8f9f7 | 20 | */ |
<> | 144:ef7eb2e8f9f7 | 21 | /* |
<> | 144:ef7eb2e8f9f7 | 22 | * This file is derivative of CMSIS V5.00 gcc_arm.ld |
<> | 144:ef7eb2e8f9f7 | 23 | */ |
<> | 144:ef7eb2e8f9f7 | 24 | /* Linker script for mbed BEETLE SoC */ |
<> | 144:ef7eb2e8f9f7 | 25 | |
<> | 144:ef7eb2e8f9f7 | 26 | /* Linker script to configure memory regions. */ |
<> | 144:ef7eb2e8f9f7 | 27 | MEMORY |
<> | 144:ef7eb2e8f9f7 | 28 | { |
<> | 144:ef7eb2e8f9f7 | 29 | VECTORS (rx) : ORIGIN = 0x00000000, LENGTH = 0x00000400 |
<> | 144:ef7eb2e8f9f7 | 30 | FLASH (rx) : ORIGIN = 0x00000400, LENGTH = 0x00040000 - 0x00000400 |
<> | 144:ef7eb2e8f9f7 | 31 | RAM (rwx) : ORIGIN = 0x20000140, LENGTH = 0x00020000 - 0x00000140 |
<> | 144:ef7eb2e8f9f7 | 32 | } |
<> | 144:ef7eb2e8f9f7 | 33 | |
<> | 144:ef7eb2e8f9f7 | 34 | /* Linker script to place sections and symbol values. Should be used together |
<> | 144:ef7eb2e8f9f7 | 35 | * with other linker script that defines memory regions FLASH and RAM. |
<> | 144:ef7eb2e8f9f7 | 36 | * It references following symbols, which must be defined in code: |
<> | 144:ef7eb2e8f9f7 | 37 | * Reset_Handler : Entry of reset handler |
<> | 144:ef7eb2e8f9f7 | 38 | * |
<> | 144:ef7eb2e8f9f7 | 39 | * It defines following symbols, which code can use without definition: |
<> | 144:ef7eb2e8f9f7 | 40 | * __exidx_start |
<> | 144:ef7eb2e8f9f7 | 41 | * __exidx_end |
<> | 144:ef7eb2e8f9f7 | 42 | * __etext |
<> | 144:ef7eb2e8f9f7 | 43 | * __data_start__ |
<> | 144:ef7eb2e8f9f7 | 44 | * __preinit_array_start |
<> | 144:ef7eb2e8f9f7 | 45 | * __preinit_array_end |
<> | 144:ef7eb2e8f9f7 | 46 | * __init_array_start |
<> | 144:ef7eb2e8f9f7 | 47 | * __init_array_end |
<> | 144:ef7eb2e8f9f7 | 48 | * __fini_array_start |
<> | 144:ef7eb2e8f9f7 | 49 | * __fini_array_end |
<> | 144:ef7eb2e8f9f7 | 50 | * __data_end__ |
<> | 144:ef7eb2e8f9f7 | 51 | * __bss_start__ |
<> | 144:ef7eb2e8f9f7 | 52 | * __bss_end__ |
<> | 144:ef7eb2e8f9f7 | 53 | * __end__ |
<> | 144:ef7eb2e8f9f7 | 54 | * end |
<> | 144:ef7eb2e8f9f7 | 55 | * __HeapLimit |
<> | 144:ef7eb2e8f9f7 | 56 | * __StackLimit |
<> | 144:ef7eb2e8f9f7 | 57 | * __StackTop |
<> | 144:ef7eb2e8f9f7 | 58 | * __stack |
<> | 144:ef7eb2e8f9f7 | 59 | */ |
<> | 144:ef7eb2e8f9f7 | 60 | ENTRY(Reset_Handler) |
<> | 144:ef7eb2e8f9f7 | 61 | |
<> | 144:ef7eb2e8f9f7 | 62 | SECTIONS |
<> | 144:ef7eb2e8f9f7 | 63 | { |
<> | 144:ef7eb2e8f9f7 | 64 | .isr_vector : |
<> | 144:ef7eb2e8f9f7 | 65 | { |
<> | 144:ef7eb2e8f9f7 | 66 | __vector_table = .; |
<> | 144:ef7eb2e8f9f7 | 67 | KEEP(*(.vector_table)) |
<> | 144:ef7eb2e8f9f7 | 68 | *(.text.Reset_Handler) |
<> | 144:ef7eb2e8f9f7 | 69 | *(.text.System_Init) |
<> | 144:ef7eb2e8f9f7 | 70 | . = ALIGN(4); |
<> | 144:ef7eb2e8f9f7 | 71 | } > VECTORS |
<> | 144:ef7eb2e8f9f7 | 72 | |
<> | 144:ef7eb2e8f9f7 | 73 | .cordio : |
<> | 144:ef7eb2e8f9f7 | 74 | { |
<> | 144:ef7eb2e8f9f7 | 75 | *CORDIO_RO_2.1.o |
<> | 144:ef7eb2e8f9f7 | 76 | *TRIM_2.1.o |
<> | 144:ef7eb2e8f9f7 | 77 | } > FLASH |
<> | 144:ef7eb2e8f9f7 | 78 | |
<> | 144:ef7eb2e8f9f7 | 79 | .text : |
<> | 144:ef7eb2e8f9f7 | 80 | { |
<> | 144:ef7eb2e8f9f7 | 81 | *(.text*) |
<> | 144:ef7eb2e8f9f7 | 82 | |
<> | 144:ef7eb2e8f9f7 | 83 | KEEP(*(.init)) |
<> | 144:ef7eb2e8f9f7 | 84 | KEEP(*(.fini)) |
<> | 144:ef7eb2e8f9f7 | 85 | |
<> | 144:ef7eb2e8f9f7 | 86 | /* .ctors */ |
<> | 144:ef7eb2e8f9f7 | 87 | *crtbegin.o(.ctors) |
<> | 144:ef7eb2e8f9f7 | 88 | *crtbegin?.o(.ctors) |
<> | 144:ef7eb2e8f9f7 | 89 | *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) |
<> | 144:ef7eb2e8f9f7 | 90 | *(SORT(.ctors.*)) |
<> | 144:ef7eb2e8f9f7 | 91 | *(.ctors) |
<> | 144:ef7eb2e8f9f7 | 92 | |
<> | 144:ef7eb2e8f9f7 | 93 | /* .dtors */ |
<> | 144:ef7eb2e8f9f7 | 94 | *crtbegin.o(.dtors) |
<> | 144:ef7eb2e8f9f7 | 95 | *crtbegin?.o(.dtors) |
<> | 144:ef7eb2e8f9f7 | 96 | *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) |
<> | 144:ef7eb2e8f9f7 | 97 | *(SORT(.dtors.*)) |
<> | 144:ef7eb2e8f9f7 | 98 | *(.dtors) |
<> | 144:ef7eb2e8f9f7 | 99 | |
<> | 144:ef7eb2e8f9f7 | 100 | *(.rodata*) |
<> | 144:ef7eb2e8f9f7 | 101 | |
<> | 144:ef7eb2e8f9f7 | 102 | KEEP(*(.eh_frame*)) |
<> | 144:ef7eb2e8f9f7 | 103 | } > FLASH |
<> | 144:ef7eb2e8f9f7 | 104 | |
<> | 144:ef7eb2e8f9f7 | 105 | .ARM.extab : |
<> | 144:ef7eb2e8f9f7 | 106 | { |
<> | 144:ef7eb2e8f9f7 | 107 | *(.ARM.extab* .gnu.linkonce.armextab.*) |
<> | 144:ef7eb2e8f9f7 | 108 | } > FLASH |
<> | 144:ef7eb2e8f9f7 | 109 | |
<> | 144:ef7eb2e8f9f7 | 110 | __exidx_start = .; |
<> | 144:ef7eb2e8f9f7 | 111 | .ARM.exidx : |
<> | 144:ef7eb2e8f9f7 | 112 | { |
<> | 144:ef7eb2e8f9f7 | 113 | *(.ARM.exidx* .gnu.linkonce.armexidx.*) |
<> | 144:ef7eb2e8f9f7 | 114 | } > FLASH |
<> | 144:ef7eb2e8f9f7 | 115 | __exidx_end = .; |
<> | 144:ef7eb2e8f9f7 | 116 | |
<> | 144:ef7eb2e8f9f7 | 117 | __etext = .; |
<> | 144:ef7eb2e8f9f7 | 118 | |
<> | 144:ef7eb2e8f9f7 | 119 | .data : AT (__etext) |
<> | 144:ef7eb2e8f9f7 | 120 | { |
<> | 144:ef7eb2e8f9f7 | 121 | __data_start__ = .; |
<> | 144:ef7eb2e8f9f7 | 122 | *(vtable) |
<> | 144:ef7eb2e8f9f7 | 123 | *(.data*) |
<> | 144:ef7eb2e8f9f7 | 124 | |
<> | 144:ef7eb2e8f9f7 | 125 | . = ALIGN(4); |
<> | 144:ef7eb2e8f9f7 | 126 | /* preinit data */ |
<> | 144:ef7eb2e8f9f7 | 127 | PROVIDE (__preinit_array_start = .); |
<> | 144:ef7eb2e8f9f7 | 128 | KEEP(*(.preinit_array)) |
<> | 144:ef7eb2e8f9f7 | 129 | PROVIDE (__preinit_array_end = .); |
<> | 144:ef7eb2e8f9f7 | 130 | |
<> | 144:ef7eb2e8f9f7 | 131 | . = ALIGN(4); |
<> | 144:ef7eb2e8f9f7 | 132 | /* init data */ |
<> | 144:ef7eb2e8f9f7 | 133 | PROVIDE (__init_array_start = .); |
<> | 144:ef7eb2e8f9f7 | 134 | KEEP(*(SORT(.init_array.*))) |
<> | 144:ef7eb2e8f9f7 | 135 | KEEP(*(.init_array)) |
<> | 144:ef7eb2e8f9f7 | 136 | PROVIDE (__init_array_end = .); |
<> | 144:ef7eb2e8f9f7 | 137 | |
<> | 144:ef7eb2e8f9f7 | 138 | |
<> | 144:ef7eb2e8f9f7 | 139 | . = ALIGN(4); |
<> | 144:ef7eb2e8f9f7 | 140 | /* finit data */ |
<> | 144:ef7eb2e8f9f7 | 141 | PROVIDE (__fini_array_start = .); |
<> | 144:ef7eb2e8f9f7 | 142 | KEEP(*(SORT(.fini_array.*))) |
<> | 144:ef7eb2e8f9f7 | 143 | KEEP(*(.fini_array)) |
<> | 144:ef7eb2e8f9f7 | 144 | PROVIDE (__fini_array_end = .); |
<> | 144:ef7eb2e8f9f7 | 145 | |
<> | 144:ef7eb2e8f9f7 | 146 | . = ALIGN(4); |
<> | 144:ef7eb2e8f9f7 | 147 | /* All data end */ |
<> | 144:ef7eb2e8f9f7 | 148 | __data_end__ = .; |
<> | 144:ef7eb2e8f9f7 | 149 | |
<> | 144:ef7eb2e8f9f7 | 150 | } > RAM |
<> | 144:ef7eb2e8f9f7 | 151 | |
<> | 144:ef7eb2e8f9f7 | 152 | .bss : |
<> | 144:ef7eb2e8f9f7 | 153 | { |
<> | 144:ef7eb2e8f9f7 | 154 | __bss_start__ = .; |
<> | 144:ef7eb2e8f9f7 | 155 | *(.bss*) |
<> | 144:ef7eb2e8f9f7 | 156 | *(COMMON) |
<> | 144:ef7eb2e8f9f7 | 157 | __bss_end__ = .; |
<> | 144:ef7eb2e8f9f7 | 158 | } > RAM |
<> | 144:ef7eb2e8f9f7 | 159 | |
<> | 144:ef7eb2e8f9f7 | 160 | bss_size = __bss_end__ - __bss_start__; |
<> | 144:ef7eb2e8f9f7 | 161 | |
<> | 144:ef7eb2e8f9f7 | 162 | .heap : |
<> | 144:ef7eb2e8f9f7 | 163 | { |
<> | 144:ef7eb2e8f9f7 | 164 | __end__ = .; |
<> | 144:ef7eb2e8f9f7 | 165 | end = __end__; |
<> | 144:ef7eb2e8f9f7 | 166 | *(.heap*) |
<> | 144:ef7eb2e8f9f7 | 167 | __HeapLimit = .; |
<> | 144:ef7eb2e8f9f7 | 168 | } > RAM |
<> | 144:ef7eb2e8f9f7 | 169 | |
<> | 144:ef7eb2e8f9f7 | 170 | /* .stack_dummy section doesn't contains any symbols. It is only |
<> | 144:ef7eb2e8f9f7 | 171 | * used for linker to calculate size of stack sections, and assign |
<> | 144:ef7eb2e8f9f7 | 172 | * values to stack symbols later */ |
<> | 144:ef7eb2e8f9f7 | 173 | .stack_dummy : |
<> | 144:ef7eb2e8f9f7 | 174 | { |
<> | 144:ef7eb2e8f9f7 | 175 | *(.stack) |
<> | 144:ef7eb2e8f9f7 | 176 | } > RAM |
<> | 144:ef7eb2e8f9f7 | 177 | |
<> | 144:ef7eb2e8f9f7 | 178 | /* Set stack top to end of RAM, and stack limit move down by |
<> | 144:ef7eb2e8f9f7 | 179 | * size of stack_dummy section */ |
<> | 144:ef7eb2e8f9f7 | 180 | __StackTop = ORIGIN(RAM) + LENGTH(RAM); |
<> | 144:ef7eb2e8f9f7 | 181 | __StackLimit = __StackTop - SIZEOF(.stack_dummy); |
<> | 144:ef7eb2e8f9f7 | 182 | PROVIDE(__stack = __StackTop); |
<> | 144:ef7eb2e8f9f7 | 183 | |
<> | 144:ef7eb2e8f9f7 | 184 | /* Check if data + heap + stack exceeds RAM limit */ |
<> | 144:ef7eb2e8f9f7 | 185 | ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") |
<> | 144:ef7eb2e8f9f7 | 186 | |
<> | 144:ef7eb2e8f9f7 | 187 | } /* End of sections */ |