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_K64F/TOOLCHAIN_IAR/MK64FN1M0xxx12.icf@172:65be27845400, 2019-02-20 (annotated)
- Committer:
- AnnaBridge
- Date:
- Wed Feb 20 20:53:29 2019 +0000
- Revision:
- 172:65be27845400
- Parent:
- 156:ff21514d8981
mbed library release version 165
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
AnnaBridge | 156:ff21514d8981 | 1 | /* |
AnnaBridge | 156:ff21514d8981 | 2 | ** ################################################################### |
AnnaBridge | 156:ff21514d8981 | 3 | ** Processors: MK64FN1M0CAJ12 |
AnnaBridge | 156:ff21514d8981 | 4 | ** MK64FN1M0VDC12 |
AnnaBridge | 156:ff21514d8981 | 5 | ** MK64FN1M0VLL12 |
AnnaBridge | 156:ff21514d8981 | 6 | ** MK64FN1M0VLQ12 |
AnnaBridge | 156:ff21514d8981 | 7 | ** MK64FN1M0VMD12 |
AnnaBridge | 156:ff21514d8981 | 8 | ** |
AnnaBridge | 156:ff21514d8981 | 9 | ** Compiler: IAR ANSI C/C++ Compiler for ARM |
AnnaBridge | 156:ff21514d8981 | 10 | ** Reference manual: K64P144M120SF5RM, Rev.2, January 2014 |
AnnaBridge | 156:ff21514d8981 | 11 | ** Version: rev. 2.9, 2016-03-21 |
AnnaBridge | 156:ff21514d8981 | 12 | ** Build: b160406 |
AnnaBridge | 156:ff21514d8981 | 13 | ** |
AnnaBridge | 156:ff21514d8981 | 14 | ** Abstract: |
AnnaBridge | 156:ff21514d8981 | 15 | ** Linker file for the IAR ANSI C/C++ Compiler for ARM |
AnnaBridge | 156:ff21514d8981 | 16 | ** |
AnnaBridge | 156:ff21514d8981 | 17 | ** Copyright (c) 2016 Freescale Semiconductor, Inc. |
AnnaBridge | 156:ff21514d8981 | 18 | ** All rights reserved. |
AnnaBridge | 156:ff21514d8981 | 19 | ** |
AnnaBridge | 156:ff21514d8981 | 20 | ** Redistribution and use in source and binary forms, with or without modification, |
AnnaBridge | 156:ff21514d8981 | 21 | ** are permitted provided that the following conditions are met: |
AnnaBridge | 156:ff21514d8981 | 22 | ** |
AnnaBridge | 156:ff21514d8981 | 23 | ** o Redistributions of source code must retain the above copyright notice, this list |
AnnaBridge | 156:ff21514d8981 | 24 | ** of conditions and the following disclaimer. |
AnnaBridge | 156:ff21514d8981 | 25 | ** |
AnnaBridge | 156:ff21514d8981 | 26 | ** o Redistributions in binary form must reproduce the above copyright notice, this |
AnnaBridge | 156:ff21514d8981 | 27 | ** list of conditions and the following disclaimer in the documentation and/or |
AnnaBridge | 156:ff21514d8981 | 28 | ** other materials provided with the distribution. |
AnnaBridge | 156:ff21514d8981 | 29 | ** |
AnnaBridge | 156:ff21514d8981 | 30 | ** o Neither the name of Freescale Semiconductor, Inc. nor the names of its |
AnnaBridge | 156:ff21514d8981 | 31 | ** contributors may be used to endorse or promote products derived from this |
AnnaBridge | 156:ff21514d8981 | 32 | ** software without specific prior written permission. |
AnnaBridge | 156:ff21514d8981 | 33 | ** |
AnnaBridge | 156:ff21514d8981 | 34 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND |
AnnaBridge | 156:ff21514d8981 | 35 | ** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
AnnaBridge | 156:ff21514d8981 | 36 | ** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
AnnaBridge | 156:ff21514d8981 | 37 | ** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR |
AnnaBridge | 156:ff21514d8981 | 38 | ** ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
AnnaBridge | 156:ff21514d8981 | 39 | ** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
AnnaBridge | 156:ff21514d8981 | 40 | ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON |
AnnaBridge | 156:ff21514d8981 | 41 | ** ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
AnnaBridge | 156:ff21514d8981 | 42 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
AnnaBridge | 156:ff21514d8981 | 43 | ** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
AnnaBridge | 156:ff21514d8981 | 44 | ** |
AnnaBridge | 156:ff21514d8981 | 45 | ** http: www.freescale.com |
AnnaBridge | 156:ff21514d8981 | 46 | ** mail: support@freescale.com |
AnnaBridge | 156:ff21514d8981 | 47 | ** |
AnnaBridge | 156:ff21514d8981 | 48 | ** ################################################################### |
AnnaBridge | 156:ff21514d8981 | 49 | */ |
AnnaBridge | 156:ff21514d8981 | 50 | define symbol __ram_vector_table__ = 1; |
AnnaBridge | 156:ff21514d8981 | 51 | |
AnnaBridge | 156:ff21514d8981 | 52 | if (!isdefinedsymbol(MBED_APP_START)) { |
AnnaBridge | 156:ff21514d8981 | 53 | define symbol MBED_APP_START = 0; |
AnnaBridge | 156:ff21514d8981 | 54 | } |
AnnaBridge | 156:ff21514d8981 | 55 | |
AnnaBridge | 156:ff21514d8981 | 56 | if (!isdefinedsymbol(MBED_APP_SIZE)) { |
AnnaBridge | 156:ff21514d8981 | 57 | define symbol MBED_APP_SIZE = 0x100000; |
AnnaBridge | 156:ff21514d8981 | 58 | } |
AnnaBridge | 156:ff21514d8981 | 59 | |
AnnaBridge | 172:65be27845400 | 60 | if (!isdefinedsymbol(MBED_BOOT_STACK_SIZE)) { |
AnnaBridge | 172:65be27845400 | 61 | define symbol MBED_BOOT_STACK_SIZE = 0x400; |
AnnaBridge | 172:65be27845400 | 62 | } |
AnnaBridge | 172:65be27845400 | 63 | |
AnnaBridge | 172:65be27845400 | 64 | define symbol __stack_size__=MBED_BOOT_STACK_SIZE; |
AnnaBridge | 172:65be27845400 | 65 | define symbol __heap_size__=0x10000; |
AnnaBridge | 172:65be27845400 | 66 | |
AnnaBridge | 156:ff21514d8981 | 67 | define symbol __ram_vector_table_size__ = isdefinedsymbol(__ram_vector_table__) ? 0x00000400 : 0; |
AnnaBridge | 156:ff21514d8981 | 68 | define symbol __ram_vector_table_offset__ = isdefinedsymbol(__ram_vector_table__) ? 0x000003FF : 0; |
AnnaBridge | 156:ff21514d8981 | 69 | |
AnnaBridge | 156:ff21514d8981 | 70 | define symbol m_interrupts_start = MBED_APP_START; |
AnnaBridge | 156:ff21514d8981 | 71 | define symbol m_interrupts_end = MBED_APP_START + 0x3FF; |
AnnaBridge | 156:ff21514d8981 | 72 | |
AnnaBridge | 156:ff21514d8981 | 73 | define symbol m_flash_config_start = MBED_APP_START + 0x400; |
AnnaBridge | 156:ff21514d8981 | 74 | define symbol m_flash_config_end = MBED_APP_START + 0x40F; |
AnnaBridge | 156:ff21514d8981 | 75 | |
AnnaBridge | 156:ff21514d8981 | 76 | define symbol m_text_start = MBED_APP_START + 0x410; |
AnnaBridge | 156:ff21514d8981 | 77 | define symbol m_text_end = MBED_APP_START + MBED_APP_SIZE - 1; |
AnnaBridge | 156:ff21514d8981 | 78 | |
AnnaBridge | 156:ff21514d8981 | 79 | define symbol m_interrupts_ram_start = 0x1FFF0000; |
AnnaBridge | 156:ff21514d8981 | 80 | define symbol m_interrupts_ram_end = 0x1FFF0000 + __ram_vector_table_offset__; |
AnnaBridge | 156:ff21514d8981 | 81 | |
AnnaBridge | 172:65be27845400 | 82 | define symbol m_crash_data_start = m_interrupts_ram_start + __ram_vector_table_size__; |
AnnaBridge | 172:65be27845400 | 83 | define symbol m_crash_data_size = 0x100; |
AnnaBridge | 172:65be27845400 | 84 | |
AnnaBridge | 172:65be27845400 | 85 | define symbol m_data_start = m_interrupts_ram_start + __ram_vector_table_size__ + m_crash_data_size; |
AnnaBridge | 156:ff21514d8981 | 86 | define symbol m_data_end = 0x1FFFFFFF; |
AnnaBridge | 156:ff21514d8981 | 87 | |
AnnaBridge | 156:ff21514d8981 | 88 | define symbol m_data_2_start = 0x20000000; |
AnnaBridge | 156:ff21514d8981 | 89 | define symbol m_data_2_end = 0x2002FFFF; |
AnnaBridge | 156:ff21514d8981 | 90 | |
AnnaBridge | 156:ff21514d8981 | 91 | /* Sizes */ |
AnnaBridge | 156:ff21514d8981 | 92 | if (isdefinedsymbol(__stack_size__)) { |
AnnaBridge | 156:ff21514d8981 | 93 | define symbol __size_cstack__ = __stack_size__; |
AnnaBridge | 156:ff21514d8981 | 94 | } else { |
AnnaBridge | 156:ff21514d8981 | 95 | define symbol __size_cstack__ = 0x0400; |
AnnaBridge | 156:ff21514d8981 | 96 | } |
AnnaBridge | 156:ff21514d8981 | 97 | |
AnnaBridge | 156:ff21514d8981 | 98 | if (isdefinedsymbol(__heap_size__)) { |
AnnaBridge | 156:ff21514d8981 | 99 | define symbol __size_heap__ = __heap_size__; |
AnnaBridge | 156:ff21514d8981 | 100 | } else { |
AnnaBridge | 156:ff21514d8981 | 101 | define symbol __size_heap__ = 0x0400; |
AnnaBridge | 156:ff21514d8981 | 102 | } |
AnnaBridge | 156:ff21514d8981 | 103 | |
AnnaBridge | 156:ff21514d8981 | 104 | define exported symbol __VECTOR_TABLE = m_interrupts_start; |
AnnaBridge | 156:ff21514d8981 | 105 | define exported symbol __VECTOR_RAM = isdefinedsymbol(__ram_vector_table__) ? m_interrupts_ram_start : m_interrupts_start; |
AnnaBridge | 156:ff21514d8981 | 106 | define exported symbol __RAM_VECTOR_TABLE_SIZE = __ram_vector_table_size__; |
AnnaBridge | 172:65be27845400 | 107 | define exported symbol __CRASH_DATA_RAM_START__ = m_crash_data_start; |
AnnaBridge | 172:65be27845400 | 108 | define exported symbol __CRASH_DATA_RAM_END__ = m_crash_data_start + m_crash_data_size; |
AnnaBridge | 156:ff21514d8981 | 109 | |
AnnaBridge | 156:ff21514d8981 | 110 | define memory mem with size = 4G; |
AnnaBridge | 156:ff21514d8981 | 111 | define region m_flash_config_region = mem:[from m_flash_config_start to m_flash_config_end]; |
AnnaBridge | 156:ff21514d8981 | 112 | define region TEXT_region = mem:[from m_interrupts_start to m_interrupts_end] |
AnnaBridge | 156:ff21514d8981 | 113 | | mem:[from m_text_start to m_text_end]; |
AnnaBridge | 156:ff21514d8981 | 114 | define region DATA_region = mem:[from m_data_start to m_data_end] |
AnnaBridge | 156:ff21514d8981 | 115 | | mem:[from m_data_2_start to m_data_2_end-__size_cstack__]; |
AnnaBridge | 156:ff21514d8981 | 116 | define region CSTACK_region = mem:[from m_data_2_end-__size_cstack__+1 to m_data_2_end]; |
AnnaBridge | 156:ff21514d8981 | 117 | define region m_interrupts_ram_region = mem:[from m_interrupts_ram_start to m_interrupts_ram_end]; |
AnnaBridge | 156:ff21514d8981 | 118 | |
AnnaBridge | 156:ff21514d8981 | 119 | define block CSTACK with alignment = 8, size = __size_cstack__ { }; |
AnnaBridge | 156:ff21514d8981 | 120 | define block HEAP with alignment = 8, size = __size_heap__ { }; |
AnnaBridge | 156:ff21514d8981 | 121 | define block RW { readwrite }; |
AnnaBridge | 156:ff21514d8981 | 122 | define block ZI { zi }; |
AnnaBridge | 156:ff21514d8981 | 123 | |
AnnaBridge | 156:ff21514d8981 | 124 | initialize by copy { readwrite, section .textrw }; |
AnnaBridge | 156:ff21514d8981 | 125 | do not initialize { section .noinit }; |
AnnaBridge | 156:ff21514d8981 | 126 | |
AnnaBridge | 156:ff21514d8981 | 127 | place at address mem: m_interrupts_start { readonly section .intvec }; |
AnnaBridge | 156:ff21514d8981 | 128 | place in m_flash_config_region { section FlashConfig }; |
AnnaBridge | 156:ff21514d8981 | 129 | place in TEXT_region { readonly }; |
AnnaBridge | 156:ff21514d8981 | 130 | place in DATA_region { block RW }; |
AnnaBridge | 156:ff21514d8981 | 131 | place in DATA_region { block ZI }; |
AnnaBridge | 156:ff21514d8981 | 132 | place in DATA_region { last block HEAP }; |
AnnaBridge | 156:ff21514d8981 | 133 | place in CSTACK_region { block CSTACK }; |
AnnaBridge | 156:ff21514d8981 | 134 | place in m_interrupts_ram_region { section m_interrupts_ram }; |
AnnaBridge | 156:ff21514d8981 | 135 |