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