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:
Wed Oct 11 12:36:33 2017 +0100
Revision:
153:b484a57bc302
Parent:
124:2241e3a39974
Child:
154:fb8e0ae1cceb
Release 153 of the mbed library.

Who changed what in which revision?

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