ads1115 only
Fork of mbed by
TARGET_KL43Z/TOOLCHAIN_IAR/MKL43Z256xxx4.icf@135:fce8a9387ed1, 2017-01-17 (annotated)
- Committer:
- kaoshen
- Date:
- Tue Jan 17 23:27:32 2017 +0000
- Revision:
- 135:fce8a9387ed1
- Parent:
- 124:2241e3a39974
333 ADS1115 ADC1
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Kojto | 124:2241e3a39974 | 1 | /* |
Kojto | 124:2241e3a39974 | 2 | ** ################################################################### |
Kojto | 124:2241e3a39974 | 3 | ** Processors: MKL43Z256VLH4 |
Kojto | 124:2241e3a39974 | 4 | ** MKL43Z256VMP4 |
Kojto | 124:2241e3a39974 | 5 | ** |
Kojto | 124:2241e3a39974 | 6 | ** Compiler: IAR ANSI C/C++ Compiler for ARM |
Kojto | 124:2241e3a39974 | 7 | ** Reference manual: KL43P64M48SF6RM, Rev.3, Aug 2014 |
Kojto | 124:2241e3a39974 | 8 | ** Version: rev. 1.6, 2015-07-29 |
Kojto | 124:2241e3a39974 | 9 | ** Build: b160406 |
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 | ** |
Kojto | 124:2241e3a39974 | 14 | ** Copyright (c) 2016 Freescale Semiconductor, Inc. |
Kojto | 124:2241e3a39974 | 15 | ** All rights reserved. |
Kojto | 124:2241e3a39974 | 16 | ** |
Kojto | 124:2241e3a39974 | 17 | ** Redistribution and use in source and binary forms, with or without modification, |
Kojto | 124:2241e3a39974 | 18 | ** are permitted provided that the following conditions are met: |
Kojto | 124:2241e3a39974 | 19 | ** |
Kojto | 124:2241e3a39974 | 20 | ** o Redistributions of source code must retain the above copyright notice, this list |
Kojto | 124:2241e3a39974 | 21 | ** of conditions and the following disclaimer. |
Kojto | 124:2241e3a39974 | 22 | ** |
Kojto | 124:2241e3a39974 | 23 | ** o Redistributions in binary form must reproduce the above copyright notice, this |
Kojto | 124:2241e3a39974 | 24 | ** list of conditions and the following disclaimer in the documentation and/or |
Kojto | 124:2241e3a39974 | 25 | ** other materials provided with the distribution. |
Kojto | 124:2241e3a39974 | 26 | ** |
Kojto | 124:2241e3a39974 | 27 | ** o Neither the name of Freescale Semiconductor, Inc. nor the names of its |
Kojto | 124:2241e3a39974 | 28 | ** contributors may be used to endorse or promote products derived from this |
Kojto | 124:2241e3a39974 | 29 | ** software without specific prior written permission. |
Kojto | 124:2241e3a39974 | 30 | ** |
Kojto | 124:2241e3a39974 | 31 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND |
Kojto | 124:2241e3a39974 | 32 | ** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
Kojto | 124:2241e3a39974 | 33 | ** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
Kojto | 124:2241e3a39974 | 34 | ** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR |
Kojto | 124:2241e3a39974 | 35 | ** ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
Kojto | 124:2241e3a39974 | 36 | ** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
Kojto | 124:2241e3a39974 | 37 | ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON |
Kojto | 124:2241e3a39974 | 38 | ** ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
Kojto | 124:2241e3a39974 | 39 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
Kojto | 124:2241e3a39974 | 40 | ** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
Kojto | 124:2241e3a39974 | 41 | ** |
Kojto | 124:2241e3a39974 | 42 | ** http: www.freescale.com |
Kojto | 124:2241e3a39974 | 43 | ** mail: support@freescale.com |
Kojto | 124:2241e3a39974 | 44 | ** |
Kojto | 124:2241e3a39974 | 45 | ** ################################################################### |
Kojto | 124:2241e3a39974 | 46 | */ |
Kojto | 124:2241e3a39974 | 47 | define symbol __ram_vector_table__ = 1; |
Kojto | 124:2241e3a39974 | 48 | |
Kojto | 124:2241e3a39974 | 49 | /* Heap 1/4 of ram and stack 1/8 */ |
Kojto | 124:2241e3a39974 | 50 | define symbol __stack_size__=0x1000; |
Kojto | 124:2241e3a39974 | 51 | define symbol __heap_size__=0x2800; |
Kojto | 124:2241e3a39974 | 52 | |
Kojto | 124:2241e3a39974 | 53 | define symbol __ram_vector_table_size__ = isdefinedsymbol(__ram_vector_table__) ? 0x00000200 : 0; |
Kojto | 124:2241e3a39974 | 54 | define symbol __ram_vector_table_offset__ = isdefinedsymbol(__ram_vector_table__) ? 0x000001FF : 0; |
Kojto | 124:2241e3a39974 | 55 | |
Kojto | 124:2241e3a39974 | 56 | define symbol m_interrupts_start = 0x00000000; |
Kojto | 124:2241e3a39974 | 57 | define symbol m_interrupts_end = 0x000001FF; |
Kojto | 124:2241e3a39974 | 58 | |
Kojto | 124:2241e3a39974 | 59 | define symbol m_flash_config_start = 0x00000400; |
Kojto | 124:2241e3a39974 | 60 | define symbol m_flash_config_end = 0x0000040F; |
Kojto | 124:2241e3a39974 | 61 | |
Kojto | 124:2241e3a39974 | 62 | define symbol m_text_start = 0x00000410; |
Kojto | 124:2241e3a39974 | 63 | define symbol m_text_end = 0x0003FFFF; |
Kojto | 124:2241e3a39974 | 64 | |
Kojto | 124:2241e3a39974 | 65 | define symbol m_interrupts_ram_start = 0x1FFFE000; |
Kojto | 124:2241e3a39974 | 66 | define symbol m_interrupts_ram_end = 0x1FFFE000 + __ram_vector_table_offset__; |
Kojto | 124:2241e3a39974 | 67 | |
Kojto | 124:2241e3a39974 | 68 | define symbol m_data_start = m_interrupts_ram_start + __ram_vector_table_size__; |
Kojto | 124:2241e3a39974 | 69 | define symbol m_data_end = 0x20005FFF; |
Kojto | 124:2241e3a39974 | 70 | |
Kojto | 124:2241e3a39974 | 71 | /* Sizes */ |
Kojto | 124:2241e3a39974 | 72 | if (isdefinedsymbol(__stack_size__)) { |
Kojto | 124:2241e3a39974 | 73 | define symbol __size_cstack__ = __stack_size__; |
Kojto | 124:2241e3a39974 | 74 | } else { |
Kojto | 124:2241e3a39974 | 75 | define symbol __size_cstack__ = 0x0400; |
Kojto | 124:2241e3a39974 | 76 | } |
Kojto | 124:2241e3a39974 | 77 | |
Kojto | 124:2241e3a39974 | 78 | if (isdefinedsymbol(__heap_size__)) { |
Kojto | 124:2241e3a39974 | 79 | define symbol __size_heap__ = __heap_size__; |
Kojto | 124:2241e3a39974 | 80 | } else { |
Kojto | 124:2241e3a39974 | 81 | define symbol __size_heap__ = 0x0400; |
Kojto | 124:2241e3a39974 | 82 | } |
Kojto | 124:2241e3a39974 | 83 | |
Kojto | 124:2241e3a39974 | 84 | define exported symbol __VECTOR_TABLE = m_interrupts_start; |
Kojto | 124:2241e3a39974 | 85 | define exported symbol __VECTOR_RAM = isdefinedsymbol(__ram_vector_table__) ? m_interrupts_ram_start : m_interrupts_start; |
Kojto | 124:2241e3a39974 | 86 | define exported symbol __RAM_VECTOR_TABLE_SIZE = __ram_vector_table_size__; |
Kojto | 124:2241e3a39974 | 87 | |
Kojto | 124:2241e3a39974 | 88 | define memory mem with size = 4G; |
Kojto | 124:2241e3a39974 | 89 | define region m_flash_config_region = mem:[from m_flash_config_start to m_flash_config_end]; |
Kojto | 124:2241e3a39974 | 90 | define region TEXT_region = mem:[from m_interrupts_start to m_interrupts_end] |
Kojto | 124:2241e3a39974 | 91 | | mem:[from m_text_start to m_text_end]; |
Kojto | 124:2241e3a39974 | 92 | define region DATA_region = mem:[from m_data_start to m_data_end-__size_cstack__]; |
Kojto | 124:2241e3a39974 | 93 | define region CSTACK_region = mem:[from m_data_end-__size_cstack__+1 to m_data_end]; |
Kojto | 124:2241e3a39974 | 94 | define region m_interrupts_ram_region = mem:[from m_interrupts_ram_start to m_interrupts_ram_end]; |
Kojto | 124:2241e3a39974 | 95 | |
Kojto | 124:2241e3a39974 | 96 | define block CSTACK with alignment = 8, size = __size_cstack__ { }; |
Kojto | 124:2241e3a39974 | 97 | define block HEAP with alignment = 8, size = __size_heap__ { }; |
Kojto | 124:2241e3a39974 | 98 | define block RW { readwrite }; |
Kojto | 124:2241e3a39974 | 99 | define block ZI { zi }; |
Kojto | 124:2241e3a39974 | 100 | |
Kojto | 124:2241e3a39974 | 101 | initialize by copy { readwrite, section .textrw }; |
Kojto | 124:2241e3a39974 | 102 | do not initialize { section .noinit }; |
Kojto | 124:2241e3a39974 | 103 | |
Kojto | 124:2241e3a39974 | 104 | place at address mem: m_interrupts_start { readonly section .intvec }; |
Kojto | 124:2241e3a39974 | 105 | place in m_flash_config_region { section FlashConfig }; |
Kojto | 124:2241e3a39974 | 106 | place in TEXT_region { readonly }; |
Kojto | 124:2241e3a39974 | 107 | place in DATA_region { block RW }; |
Kojto | 124:2241e3a39974 | 108 | place in DATA_region { block ZI }; |
Kojto | 124:2241e3a39974 | 109 | place in DATA_region { last block HEAP }; |
Kojto | 124:2241e3a39974 | 110 | place in CSTACK_region { block CSTACK }; |
Kojto | 124:2241e3a39974 | 111 | place in m_interrupts_ram_region { section m_interrupts_ram }; |
Kojto | 124:2241e3a39974 | 112 |