ads1115 only

Fork of mbed by mbed official

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?

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
Kojto 124:2241e3a39974 9 ** Build: b151009
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) 2015 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__=0x8000;
Kojto 124:2241e3a39974 51 define symbol __heap_size__=0x10000;
Kojto 124:2241e3a39974 52
Kojto 124:2241e3a39974 53 define symbol __ram_vector_table_size__ = isdefinedsymbol(__ram_vector_table__) ? 0x00000400 : 0;
Kojto 124:2241e3a39974 54 define symbol __ram_vector_table_offset__ = isdefinedsymbol(__ram_vector_table__) ? 0x000003FF : 0;
Kojto 124:2241e3a39974 55
Kojto 124:2241e3a39974 56 define symbol m_interrupts_start = 0x00000000;
Kojto 124:2241e3a39974 57 define symbol m_interrupts_end = 0x000003FF;
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 = 0x001FFFFF;
Kojto 124:2241e3a39974 64
Kojto 124:2241e3a39974 65 define symbol m_interrupts_ram_start = 0x1FFF0000;
Kojto 124:2241e3a39974 66 define symbol m_interrupts_ram_end = 0x1FFF0000 + __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 = 0x1FFFFFFF;
Kojto 124:2241e3a39974 70
Kojto 124:2241e3a39974 71 define symbol m_data_2_start = 0x20000000;
Kojto 124:2241e3a39974 72 define symbol m_data_2_end = 0x2002FFFF;
Kojto 124:2241e3a39974 73
Kojto 124:2241e3a39974 74 /* Sizes */
Kojto 124:2241e3a39974 75 if (isdefinedsymbol(__stack_size__)) {
Kojto 124:2241e3a39974 76 define symbol __size_cstack__ = __stack_size__;
Kojto 124:2241e3a39974 77 } else {
Kojto 124:2241e3a39974 78 define symbol __size_cstack__ = 0x0400;
Kojto 124:2241e3a39974 79 }
Kojto 124:2241e3a39974 80
Kojto 124:2241e3a39974 81 if (isdefinedsymbol(__heap_size__)) {
Kojto 124:2241e3a39974 82 define symbol __size_heap__ = __heap_size__;
Kojto 124:2241e3a39974 83 } else {
Kojto 124:2241e3a39974 84 define symbol __size_heap__ = 0x0400;
Kojto 124:2241e3a39974 85 }
Kojto 124:2241e3a39974 86
Kojto 124:2241e3a39974 87 define exported symbol __VECTOR_TABLE = m_interrupts_start;
Kojto 124:2241e3a39974 88 define exported symbol __VECTOR_RAM = isdefinedsymbol(__ram_vector_table__) ? m_interrupts_ram_start : m_interrupts_start;
Kojto 124:2241e3a39974 89 define exported symbol __RAM_VECTOR_TABLE_SIZE = __ram_vector_table_size__;
Kojto 124:2241e3a39974 90
Kojto 124:2241e3a39974 91 define memory mem with size = 4G;
Kojto 124:2241e3a39974 92 define region m_flash_config_region = mem:[from m_flash_config_start to m_flash_config_end];
Kojto 124:2241e3a39974 93 define region TEXT_region = mem:[from m_interrupts_start to m_interrupts_end]
Kojto 124:2241e3a39974 94 | mem:[from m_text_start to m_text_end];
Kojto 124:2241e3a39974 95 define region DATA_region = mem:[from m_data_start to m_data_end]
Kojto 124:2241e3a39974 96 | mem:[from m_data_2_start to m_data_2_end-__size_cstack__];
Kojto 124:2241e3a39974 97 define region CSTACK_region = mem:[from m_data_2_end-__size_cstack__+1 to m_data_2_end];
Kojto 124:2241e3a39974 98 define region m_interrupts_ram_region = mem:[from m_interrupts_ram_start to m_interrupts_ram_end];
Kojto 124:2241e3a39974 99
Kojto 124:2241e3a39974 100 define block CSTACK with alignment = 8, size = __size_cstack__ { };
Kojto 124:2241e3a39974 101 define block HEAP with alignment = 8, size = __size_heap__ { };
Kojto 124:2241e3a39974 102 define block RW { readwrite };
Kojto 124:2241e3a39974 103 define block ZI { zi };
Kojto 124:2241e3a39974 104
Kojto 124:2241e3a39974 105 initialize by copy { readwrite, section .textrw };
Kojto 124:2241e3a39974 106 do not initialize { section .noinit };
Kojto 124:2241e3a39974 107
Kojto 124:2241e3a39974 108 place at address mem: m_interrupts_start { readonly section .intvec };
Kojto 124:2241e3a39974 109 place in m_flash_config_region { section FlashConfig };
Kojto 124:2241e3a39974 110 place in TEXT_region { readonly };
Kojto 124:2241e3a39974 111 place in DATA_region { block RW };
Kojto 124:2241e3a39974 112 place in DATA_region { block ZI };
Kojto 124:2241e3a39974 113 place in DATA_region { last block HEAP };
Kojto 124:2241e3a39974 114 place in CSTACK_region { block CSTACK };
Kojto 124:2241e3a39974 115 place in m_interrupts_ram_region { section m_interrupts_ram };
Kojto 124:2241e3a39974 116