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.

Committer:
<>
Date:
Tue Mar 14 16:20:51 2017 +0000
Revision:
138:093f2bd7b9eb
Parent:
130:d75b3fe1f5cb
Release 138 of the mbed library

Ports for Upcoming Targets


Fixes and Changes

3716: fix for issue #3715: correction in startup files for ARM and IAR, alignment of system_stm32f429xx.c files https://github.com/ARMmbed/mbed-os/pull/3716
3741: STM32 remove warning in hal_tick_32b.c file https://github.com/ARMmbed/mbed-os/pull/3741
3780: STM32L4 : Fix GPIO G port compatibility https://github.com/ARMmbed/mbed-os/pull/3780
3831: NCS36510: SPISLAVE enabled (Conflict resolved) https://github.com/ARMmbed/mbed-os/pull/3831
3836: Allow to redefine nRF's PSTORAGE_NUM_OF_PAGES outside of the mbed-os https://github.com/ARMmbed/mbed-os/pull/3836
3840: STM32: gpio SPEED - always set High Speed by default https://github.com/ARMmbed/mbed-os/pull/3840
3844: STM32 GPIO: Typo correction. Update comment (GPIO_IP_WITHOUT_BRR) https://github.com/ARMmbed/mbed-os/pull/3844
3850: STM32: change spi error to debug warning https://github.com/ARMmbed/mbed-os/pull/3850
3860: Define GPIO_IP_WITHOUT_BRR for xDot platform https://github.com/ARMmbed/mbed-os/pull/3860
3880: DISCO_F469NI: allow the use of CAN2 instance when CAN1 is not activated https://github.com/ARMmbed/mbed-os/pull/3880
3795: Fix pwm period calc https://github.com/ARMmbed/mbed-os/pull/3795
3828: STM32 CAN API: correct format and type https://github.com/ARMmbed/mbed-os/pull/3828
3842: TARGET_NRF: corrected spi_init() to properly handle re-initialization https://github.com/ARMmbed/mbed-os/pull/3842
3843: STM32L476xG: set APB2 clock to 80MHz (instead of 40MHz) https://github.com/ARMmbed/mbed-os/pull/3843
3879: NUCLEO_F446ZE: Add missing AnalogIn pins on PF_3, PF_5 and PF_10. https://github.com/ARMmbed/mbed-os/pull/3879
3902: Fix heap and stack size for NUCLEO_F746ZG https://github.com/ARMmbed/mbed-os/pull/3902
3829: can_write(): return error code when no tx mailboxes are available https://github.com/ARMmbed/mbed-os/pull/3829

Who changed what in which revision?

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