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