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.

Committer:
AnnaBridge
Date:
Fri Feb 16 16:16:41 2018 +0000
Revision:
161:aa5281ff4a02
Child:
170:e95d10626187
mbed library. Release version 159.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
AnnaBridge 161:aa5281ff4a02 1 /*
AnnaBridge 161:aa5281ff4a02 2 ** ###################################################################
AnnaBridge 161:aa5281ff4a02 3 ** Processors: MIMXRT1052CVL5A
AnnaBridge 161:aa5281ff4a02 4 ** MIMXRT1052DVL6A
AnnaBridge 161:aa5281ff4a02 5 **
AnnaBridge 161:aa5281ff4a02 6 ** Compiler: IAR ANSI C/C++ Compiler for ARM
AnnaBridge 161:aa5281ff4a02 7 ** Reference manual: IMXRT1050RM Rev.C, 08/2017
AnnaBridge 161:aa5281ff4a02 8 ** Version: rev. 0.1, 2017-01-10
AnnaBridge 161:aa5281ff4a02 9 ** Build: b170927
AnnaBridge 161:aa5281ff4a02 10 **
AnnaBridge 161:aa5281ff4a02 11 ** Abstract:
AnnaBridge 161:aa5281ff4a02 12 ** Linker file for the IAR ANSI C/C++ Compiler for ARM
AnnaBridge 161:aa5281ff4a02 13 **
AnnaBridge 161:aa5281ff4a02 14 ** Copyright 2016 Freescale Semiconductor, Inc.
AnnaBridge 161:aa5281ff4a02 15 ** Copyright 2016-2017 NXP
AnnaBridge 161:aa5281ff4a02 16 ** Redistribution and use in source and binary forms, with or without modification,
AnnaBridge 161:aa5281ff4a02 17 ** are permitted provided that the following conditions are met:
AnnaBridge 161:aa5281ff4a02 18 **
AnnaBridge 161:aa5281ff4a02 19 ** 1. Redistributions of source code must retain the above copyright notice, this list
AnnaBridge 161:aa5281ff4a02 20 ** of conditions and the following disclaimer.
AnnaBridge 161:aa5281ff4a02 21 **
AnnaBridge 161:aa5281ff4a02 22 ** 2. Redistributions in binary form must reproduce the above copyright notice, this
AnnaBridge 161:aa5281ff4a02 23 ** list of conditions and the following disclaimer in the documentation and/or
AnnaBridge 161:aa5281ff4a02 24 ** other materials provided with the distribution.
AnnaBridge 161:aa5281ff4a02 25 **
AnnaBridge 161:aa5281ff4a02 26 ** 3. Neither the name of the copyright holder nor the names of its
AnnaBridge 161:aa5281ff4a02 27 ** contributors may be used to endorse or promote products derived from this
AnnaBridge 161:aa5281ff4a02 28 ** software without specific prior written permission.
AnnaBridge 161:aa5281ff4a02 29 **
AnnaBridge 161:aa5281ff4a02 30 ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
AnnaBridge 161:aa5281ff4a02 31 ** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
AnnaBridge 161:aa5281ff4a02 32 ** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
AnnaBridge 161:aa5281ff4a02 33 ** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
AnnaBridge 161:aa5281ff4a02 34 ** ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
AnnaBridge 161:aa5281ff4a02 35 ** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
AnnaBridge 161:aa5281ff4a02 36 ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
AnnaBridge 161:aa5281ff4a02 37 ** ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
AnnaBridge 161:aa5281ff4a02 38 ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
AnnaBridge 161:aa5281ff4a02 39 ** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
AnnaBridge 161:aa5281ff4a02 40 **
AnnaBridge 161:aa5281ff4a02 41 ** http: www.nxp.com
AnnaBridge 161:aa5281ff4a02 42 ** mail: support@nxp.com
AnnaBridge 161:aa5281ff4a02 43 **
AnnaBridge 161:aa5281ff4a02 44 ** ###################################################################
AnnaBridge 161:aa5281ff4a02 45 */
AnnaBridge 161:aa5281ff4a02 46 define symbol __ram_vector_table__ = 1;
AnnaBridge 161:aa5281ff4a02 47
AnnaBridge 161:aa5281ff4a02 48 /* Heap 1/4 of ram and stack 1/8 */
AnnaBridge 161:aa5281ff4a02 49 define symbol __stack_size__=0x8000;
AnnaBridge 161:aa5281ff4a02 50 define symbol __heap_size__=0x10000;
AnnaBridge 161:aa5281ff4a02 51
AnnaBridge 161:aa5281ff4a02 52 define symbol __ram_vector_table_size__ = isdefinedsymbol(__ram_vector_table__) ? 0x00000400 : 0;
AnnaBridge 161:aa5281ff4a02 53 define symbol __ram_vector_table_offset__ = isdefinedsymbol(__ram_vector_table__) ? 0x000003FF : 0;
AnnaBridge 161:aa5281ff4a02 54
AnnaBridge 161:aa5281ff4a02 55 define symbol m_interrupts_start = 0x60002000;
AnnaBridge 161:aa5281ff4a02 56 define symbol m_interrupts_end = 0x600023FF;
AnnaBridge 161:aa5281ff4a02 57
AnnaBridge 161:aa5281ff4a02 58 define symbol m_text_start = 0x60002400;
AnnaBridge 161:aa5281ff4a02 59 define symbol m_text_end = 0x63FFFFFF;
AnnaBridge 161:aa5281ff4a02 60
AnnaBridge 161:aa5281ff4a02 61 define symbol m_interrupts_ram_start = 0x20000000;
AnnaBridge 161:aa5281ff4a02 62 define symbol m_interrupts_ram_end = 0x20000000 + __ram_vector_table_offset__;
AnnaBridge 161:aa5281ff4a02 63
AnnaBridge 161:aa5281ff4a02 64 define symbol m_data_start = m_interrupts_ram_start + __ram_vector_table_size__;
AnnaBridge 161:aa5281ff4a02 65 define symbol m_data_end = 0x2001FFFF;
AnnaBridge 161:aa5281ff4a02 66
AnnaBridge 161:aa5281ff4a02 67 define symbol m_data2_start = 0x20200000;
AnnaBridge 161:aa5281ff4a02 68 define symbol m_data2_end = 0x2023FFFF;
AnnaBridge 161:aa5281ff4a02 69
AnnaBridge 161:aa5281ff4a02 70 /* Sizes */
AnnaBridge 161:aa5281ff4a02 71 if (isdefinedsymbol(__stack_size__)) {
AnnaBridge 161:aa5281ff4a02 72 define symbol __size_cstack__ = __stack_size__;
AnnaBridge 161:aa5281ff4a02 73 } else {
AnnaBridge 161:aa5281ff4a02 74 define symbol __size_cstack__ = 0x0400;
AnnaBridge 161:aa5281ff4a02 75 }
AnnaBridge 161:aa5281ff4a02 76
AnnaBridge 161:aa5281ff4a02 77 if (isdefinedsymbol(__heap_size__)) {
AnnaBridge 161:aa5281ff4a02 78 define symbol __size_heap__ = __heap_size__;
AnnaBridge 161:aa5281ff4a02 79 } else {
AnnaBridge 161:aa5281ff4a02 80 define symbol __size_heap__ = 0x0400;
AnnaBridge 161:aa5281ff4a02 81 }
AnnaBridge 161:aa5281ff4a02 82
AnnaBridge 161:aa5281ff4a02 83 define exported symbol __VECTOR_TABLE = m_interrupts_start;
AnnaBridge 161:aa5281ff4a02 84 define exported symbol __VECTOR_RAM = isdefinedsymbol(__ram_vector_table__) ? m_interrupts_ram_start : m_interrupts_start;
AnnaBridge 161:aa5281ff4a02 85 define exported symbol __RAM_VECTOR_TABLE_SIZE = __ram_vector_table_size__;
AnnaBridge 161:aa5281ff4a02 86
AnnaBridge 161:aa5281ff4a02 87 define memory mem with size = 4G;
AnnaBridge 161:aa5281ff4a02 88 define region TEXT_region = mem:[from m_interrupts_start to m_interrupts_end]
AnnaBridge 161:aa5281ff4a02 89 | mem:[from m_text_start to m_text_end];
AnnaBridge 161:aa5281ff4a02 90
AnnaBridge 161:aa5281ff4a02 91 define region DATA_region = mem:[from m_data_start to m_data_end-__size_cstack__];
AnnaBridge 161:aa5281ff4a02 92 define region DATA2_region = mem:[from m_data2_start to m_data2_end];
AnnaBridge 161:aa5281ff4a02 93 define region CSTACK_region = mem:[from m_data_end-__size_cstack__+1 to m_data_end];
AnnaBridge 161:aa5281ff4a02 94 define region m_interrupts_ram_region = mem:[from m_interrupts_ram_start to m_interrupts_ram_end];
AnnaBridge 161:aa5281ff4a02 95
AnnaBridge 161:aa5281ff4a02 96 define block CSTACK with alignment = 8, size = __size_cstack__ { };
AnnaBridge 161:aa5281ff4a02 97 define block HEAP with alignment = 8, size = __size_heap__ { };
AnnaBridge 161:aa5281ff4a02 98 define block RW { readwrite };
AnnaBridge 161:aa5281ff4a02 99 define block ZI { zi };
AnnaBridge 161:aa5281ff4a02 100 define block NCACHE_VAR { section NonCacheable , section NonCacheable.init };
AnnaBridge 161:aa5281ff4a02 101
AnnaBridge 161:aa5281ff4a02 102 initialize by copy { readwrite, section .textrw };
AnnaBridge 161:aa5281ff4a02 103 do not initialize { section .noinit };
AnnaBridge 161:aa5281ff4a02 104
AnnaBridge 161:aa5281ff4a02 105 place at address mem: m_interrupts_start { readonly section .intvec };
AnnaBridge 161:aa5281ff4a02 106
AnnaBridge 161:aa5281ff4a02 107 place in TEXT_region { readonly };
AnnaBridge 161:aa5281ff4a02 108 place in DATA_region { block RW };
AnnaBridge 161:aa5281ff4a02 109 place in DATA_region { block ZI };
AnnaBridge 161:aa5281ff4a02 110 place in DATA_region { last block HEAP };
AnnaBridge 161:aa5281ff4a02 111 place in DATA_region { block NCACHE_VAR };
AnnaBridge 161:aa5281ff4a02 112 place in CSTACK_region { block CSTACK };
AnnaBridge 161:aa5281ff4a02 113 place in m_interrupts_ram_region { section m_interrupts_ram };