The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.
Dependents: hello SerialTestv11 SerialTestv12 Sierpinski ... more
mbed 2
This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.
TARGET_LPC54114/TOOLCHAIN_IAR/LPC54114J256_cm4.icf@148:fd96258d940d, 2017-08-03 (annotated)
- Committer:
- Kojto
- Date:
- Thu Aug 03 13:37:00 2017 +0100
- Revision:
- 148:fd96258d940d
- Child:
- 152:235179ab3f27
Release 148 of the mbed library.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Kojto | 148:fd96258d940d | 1 | /* |
Kojto | 148:fd96258d940d | 2 | ** ################################################################### |
Kojto | 148:fd96258d940d | 3 | ** Processors: LPC54114J256BD64_M4 |
Kojto | 148:fd96258d940d | 4 | ** LPC54114J256UK49_M4 |
Kojto | 148:fd96258d940d | 5 | ** |
Kojto | 148:fd96258d940d | 6 | ** Compiler: IAR ANSI C/C++ Compiler for ARM |
Kojto | 148:fd96258d940d | 7 | ** Reference manual: LPC5411x User manual Rev. 1.1 25 May 2016 |
Kojto | 148:fd96258d940d | 8 | ** Version: rev. 1.0, 2016-04-29 |
Kojto | 148:fd96258d940d | 9 | ** Build: b161227 |
Kojto | 148:fd96258d940d | 10 | ** |
Kojto | 148:fd96258d940d | 11 | ** Abstract: |
Kojto | 148:fd96258d940d | 12 | ** Linker file for the IAR ANSI C/C++ Compiler for ARM |
Kojto | 148:fd96258d940d | 13 | ** |
Kojto | 148:fd96258d940d | 14 | ** Copyright (c) 2016 Freescale Semiconductor, Inc. |
Kojto | 148:fd96258d940d | 15 | ** Copyright 2016 - 2017 NXP |
Kojto | 148:fd96258d940d | 16 | ** Redistribution and use in source and binary forms, with or without modification, |
Kojto | 148:fd96258d940d | 17 | ** are permitted provided that the following conditions are met: |
Kojto | 148:fd96258d940d | 18 | ** |
Kojto | 148:fd96258d940d | 19 | ** o Redistributions of source code must retain the above copyright notice, this list |
Kojto | 148:fd96258d940d | 20 | ** of conditions and the following disclaimer. |
Kojto | 148:fd96258d940d | 21 | ** |
Kojto | 148:fd96258d940d | 22 | ** o Redistributions in binary form must reproduce the above copyright notice, this |
Kojto | 148:fd96258d940d | 23 | ** list of conditions and the following disclaimer in the documentation and/or |
Kojto | 148:fd96258d940d | 24 | ** other materials provided with the distribution. |
Kojto | 148:fd96258d940d | 25 | ** |
Kojto | 148:fd96258d940d | 26 | ** o Neither the name of the copyright holder nor the names of its |
Kojto | 148:fd96258d940d | 27 | ** contributors may be used to endorse or promote products derived from this |
Kojto | 148:fd96258d940d | 28 | ** software without specific prior written permission. |
Kojto | 148:fd96258d940d | 29 | ** |
Kojto | 148:fd96258d940d | 30 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND |
Kojto | 148:fd96258d940d | 31 | ** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
Kojto | 148:fd96258d940d | 32 | ** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
Kojto | 148:fd96258d940d | 33 | ** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR |
Kojto | 148:fd96258d940d | 34 | ** ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
Kojto | 148:fd96258d940d | 35 | ** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
Kojto | 148:fd96258d940d | 36 | ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON |
Kojto | 148:fd96258d940d | 37 | ** ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
Kojto | 148:fd96258d940d | 38 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
Kojto | 148:fd96258d940d | 39 | ** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
Kojto | 148:fd96258d940d | 40 | ** |
Kojto | 148:fd96258d940d | 41 | ** http: www.nxp.com |
Kojto | 148:fd96258d940d | 42 | ** mail: support@nxp.com |
Kojto | 148:fd96258d940d | 43 | ** |
Kojto | 148:fd96258d940d | 44 | ** ################################################################### |
Kojto | 148:fd96258d940d | 45 | */ |
Kojto | 148:fd96258d940d | 46 | define symbol __ram_vector_table__ = 1; |
Kojto | 148:fd96258d940d | 47 | |
Kojto | 148:fd96258d940d | 48 | /* Heap 1/4 of ram and stack 1/8 */ |
Kojto | 148:fd96258d940d | 49 | define symbol __stack_size__=0x2000; |
Kojto | 148:fd96258d940d | 50 | define symbol __heap_size__=0x4000; |
Kojto | 148:fd96258d940d | 51 | |
Kojto | 148:fd96258d940d | 52 | define symbol __ram_vector_table_size__ = isdefinedsymbol(__ram_vector_table__) ? 0x000000E0 : 0; |
Kojto | 148:fd96258d940d | 53 | define symbol __ram_vector_table_offset__ = isdefinedsymbol(__ram_vector_table__) ? 0x000000DF : 0; |
Kojto | 148:fd96258d940d | 54 | |
Kojto | 148:fd96258d940d | 55 | define symbol m_interrupts_start = 0x00000000; |
Kojto | 148:fd96258d940d | 56 | define symbol m_interrupts_end = 0x000000DF; |
Kojto | 148:fd96258d940d | 57 | |
Kojto | 148:fd96258d940d | 58 | define symbol m_text_start = 0x000000E0; |
Kojto | 148:fd96258d940d | 59 | define symbol m_text_end = 0x0002FFFF; |
Kojto | 148:fd96258d940d | 60 | |
Kojto | 148:fd96258d940d | 61 | define symbol m_interrupts_ram_start = 0x20000000; |
Kojto | 148:fd96258d940d | 62 | define symbol m_interrupts_ram_end = 0x20000000 + __ram_vector_table_offset__; |
Kojto | 148:fd96258d940d | 63 | |
Kojto | 148:fd96258d940d | 64 | define symbol m_data_start = m_interrupts_ram_start + __ram_vector_table_size__; |
Kojto | 148:fd96258d940d | 65 | define symbol m_data_end = 0x2000FFFF; |
Kojto | 148:fd96258d940d | 66 | |
Kojto | 148:fd96258d940d | 67 | define exported symbol rpmsg_sh_mem_start = 0x20026800; |
Kojto | 148:fd96258d940d | 68 | define exported symbol rpmsg_sh_mem_end = 0x20027FFF; |
Kojto | 148:fd96258d940d | 69 | |
Kojto | 148:fd96258d940d | 70 | define symbol m_sramx_start = 0x04000000; |
Kojto | 148:fd96258d940d | 71 | define symbol m_sramx_end = 0x04007FFF; |
Kojto | 148:fd96258d940d | 72 | |
Kojto | 148:fd96258d940d | 73 | define exported symbol core1_image_start = 0x00030000; |
Kojto | 148:fd96258d940d | 74 | define exported symbol core1_image_end = 0x0003FFFF; |
Kojto | 148:fd96258d940d | 75 | |
Kojto | 148:fd96258d940d | 76 | define symbol __crp_start__ = 0x000002FC; |
Kojto | 148:fd96258d940d | 77 | define symbol __crp_end__ = 0x000002FF; |
Kojto | 148:fd96258d940d | 78 | |
Kojto | 148:fd96258d940d | 79 | define symbol __ram_iap_start__ = 0x2000FFE0; |
Kojto | 148:fd96258d940d | 80 | define symbol __ram_iap_end__ = 0x2000FFFF; |
Kojto | 148:fd96258d940d | 81 | |
Kojto | 148:fd96258d940d | 82 | /* Sizes */ |
Kojto | 148:fd96258d940d | 83 | if (isdefinedsymbol(__stack_size__)) { |
Kojto | 148:fd96258d940d | 84 | define symbol __size_cstack__ = __stack_size__; |
Kojto | 148:fd96258d940d | 85 | } else { |
Kojto | 148:fd96258d940d | 86 | define symbol __size_cstack__ = 0x0400; |
Kojto | 148:fd96258d940d | 87 | } |
Kojto | 148:fd96258d940d | 88 | |
Kojto | 148:fd96258d940d | 89 | if (isdefinedsymbol(__heap_size__)) { |
Kojto | 148:fd96258d940d | 90 | define symbol __size_heap__ = __heap_size__; |
Kojto | 148:fd96258d940d | 91 | } else { |
Kojto | 148:fd96258d940d | 92 | define symbol __size_heap__ = 0x0800; |
Kojto | 148:fd96258d940d | 93 | } |
Kojto | 148:fd96258d940d | 94 | |
Kojto | 148:fd96258d940d | 95 | define exported symbol __VECTOR_TABLE = m_interrupts_start; |
Kojto | 148:fd96258d940d | 96 | define exported symbol __VECTOR_RAM = isdefinedsymbol(__ram_vector_table__) ? m_interrupts_ram_start : m_interrupts_start; |
Kojto | 148:fd96258d940d | 97 | define exported symbol __RAM_VECTOR_TABLE_SIZE = __ram_vector_table_size__; |
Kojto | 148:fd96258d940d | 98 | |
Kojto | 148:fd96258d940d | 99 | define memory mem with size = 4G; |
Kojto | 148:fd96258d940d | 100 | define region TEXT_region = mem:[from m_interrupts_start to m_interrupts_end] |
Kojto | 148:fd96258d940d | 101 | | mem:[from m_text_start to m_text_end] |
Kojto | 148:fd96258d940d | 102 | - mem:[from __crp_start__ to __crp_end__]; |
Kojto | 148:fd96258d940d | 103 | define region DATA_region = mem:[from m_data_start to m_data_end] |
Kojto | 148:fd96258d940d | 104 | - mem:[from __ram_iap_start__-__size_cstack__ to __ram_iap_end__]; |
Kojto | 148:fd96258d940d | 105 | define region CSTACK_region = mem:[from __ram_iap_start__-__size_cstack__ to __ram_iap_start__-1]; |
Kojto | 148:fd96258d940d | 106 | define region SRAMX_region = mem:[from m_sramx_start to m_sramx_end]; |
Kojto | 148:fd96258d940d | 107 | define region CRP_region = mem:[from __crp_start__ to __crp_end__]; |
Kojto | 148:fd96258d940d | 108 | define region m_interrupts_ram_region = mem:[from m_interrupts_ram_start to m_interrupts_ram_end]; |
Kojto | 148:fd96258d940d | 109 | |
Kojto | 148:fd96258d940d | 110 | define region rpmsg_sh_mem_region = mem:[from rpmsg_sh_mem_start to rpmsg_sh_mem_end]; |
Kojto | 148:fd96258d940d | 111 | |
Kojto | 148:fd96258d940d | 112 | define block CSTACK with alignment = 8, size = __size_cstack__ { }; |
Kojto | 148:fd96258d940d | 113 | define block HEAP with alignment = 8, size = __size_heap__ { }; |
Kojto | 148:fd96258d940d | 114 | define block RW { readwrite }; |
Kojto | 148:fd96258d940d | 115 | define block ZI { zi }; |
Kojto | 148:fd96258d940d | 116 | |
Kojto | 148:fd96258d940d | 117 | define region core1_region = mem:[from core1_image_start to core1_image_end]; |
Kojto | 148:fd96258d940d | 118 | define block SEC_CORE_IMAGE_WBLOCK { section __sec_core }; |
Kojto | 148:fd96258d940d | 119 | |
Kojto | 148:fd96258d940d | 120 | initialize by copy { readwrite }; |
Kojto | 148:fd96258d940d | 121 | |
Kojto | 148:fd96258d940d | 122 | if (isdefinedsymbol(__USE_DLIB_PERTHREAD)) |
Kojto | 148:fd96258d940d | 123 | { |
Kojto | 148:fd96258d940d | 124 | // Required in a multi-threaded application |
Kojto | 148:fd96258d940d | 125 | initialize by copy with packing = none { section __DLIB_PERTHREAD }; |
Kojto | 148:fd96258d940d | 126 | } |
Kojto | 148:fd96258d940d | 127 | |
Kojto | 148:fd96258d940d | 128 | do not initialize { section .noinit }; |
Kojto | 148:fd96258d940d | 129 | do not initialize { section rpmsg_sh_mem_section }; |
Kojto | 148:fd96258d940d | 130 | |
Kojto | 148:fd96258d940d | 131 | place at address mem: m_interrupts_start { readonly section .intvec }; |
Kojto | 148:fd96258d940d | 132 | place in TEXT_region { readonly }; |
Kojto | 148:fd96258d940d | 133 | place in DATA_region { block RW }; |
Kojto | 148:fd96258d940d | 134 | place in DATA_region { block ZI }; |
Kojto | 148:fd96258d940d | 135 | place in DATA_region { last block HEAP }; |
Kojto | 148:fd96258d940d | 136 | place in SRAMX_region { section sramx }; |
Kojto | 148:fd96258d940d | 137 | place in CSTACK_region { block CSTACK }; |
Kojto | 148:fd96258d940d | 138 | place in CRP_region { section .crp }; |
Kojto | 148:fd96258d940d | 139 | place in m_interrupts_ram_region { section m_interrupts_ram }; |
Kojto | 148:fd96258d940d | 140 | place in rpmsg_sh_mem_region { section rpmsg_sh_mem_section }; |
Kojto | 148:fd96258d940d | 141 | |
Kojto | 148:fd96258d940d | 142 | place in core1_region { block SEC_CORE_IMAGE_WBLOCK }; |