mbed library sources

Dependents:   Encrypted my_mbed lklk CyaSSL_DTLS_Cellular ... more

Superseded

This library was superseded by mbed-dev - https://os.mbed.com/users/mbed_official/code/mbed-dev/.

Development branch of the mbed library sources. This library is kept in synch with the latest changes from the mbed SDK and it is not guaranteed to work.

If you are looking for a stable and tested release, please import one of the official mbed library releases:

Import librarymbed

The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

Committer:
mbed_official
Date:
Mon Sep 28 10:45:10 2015 +0100
Revision:
630:825f75ca301e
Synchronized with git revision 54fbe4144faf309c37205a5d39fa665daa919f10

Full URL: https://github.com/mbedmicro/mbed/commit/54fbe4144faf309c37205a5d39fa665daa919f10/

NUCLEO_F031K6 : Add new target

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 630:825f75ca301e 1 ;******************** (C) COPYRIGHT 2015 STMicroelectronics ********************
mbed_official 630:825f75ca301e 2 ;* File Name : startup_stm32f031x6.s
mbed_official 630:825f75ca301e 3 ;* Author : MCD Application Team
mbed_official 630:825f75ca301e 4 ;* Version : V2.2.2
mbed_official 630:825f75ca301e 5 ;* Date : 26-June-2015
mbed_official 630:825f75ca301e 6 ;* Description : STM32F031x4/STM32F031x6 devices vector table for MDK-ARM toolchain.
mbed_official 630:825f75ca301e 7 ;* This module performs:
mbed_official 630:825f75ca301e 8 ;* - Set the initial SP
mbed_official 630:825f75ca301e 9 ;* - Set the initial PC == Reset_Handler
mbed_official 630:825f75ca301e 10 ;* - Set the vector table entries with the exceptions ISR address
mbed_official 630:825f75ca301e 11 ;* - Branches to __main in the C library (which eventually
mbed_official 630:825f75ca301e 12 ;* calls main()).
mbed_official 630:825f75ca301e 13 ;* After Reset the CortexM0 processor is in Thread mode,
mbed_official 630:825f75ca301e 14 ;* priority is Privileged, and the Stack is set to Main.
mbed_official 630:825f75ca301e 15 ;* <<< Use Configuration Wizard in Context Menu >>>
mbed_official 630:825f75ca301e 16 ;*******************************************************************************
mbed_official 630:825f75ca301e 17 ;
mbed_official 630:825f75ca301e 18 ;* Redistribution and use in source and binary forms, with or without modification,
mbed_official 630:825f75ca301e 19 ;* are permitted provided that the following conditions are met:
mbed_official 630:825f75ca301e 20 ;* 1. Redistributions of source code must retain the above copyright notice,
mbed_official 630:825f75ca301e 21 ;* this list of conditions and the following disclaimer.
mbed_official 630:825f75ca301e 22 ;* 2. Redistributions in binary form must reproduce the above copyright notice,
mbed_official 630:825f75ca301e 23 ;* this list of conditions and the following disclaimer in the documentation
mbed_official 630:825f75ca301e 24 ;* and/or other materials provided with the distribution.
mbed_official 630:825f75ca301e 25 ;* 3. Neither the name of STMicroelectronics nor the names of its contributors
mbed_official 630:825f75ca301e 26 ;* may be used to endorse or promote products derived from this software
mbed_official 630:825f75ca301e 27 ;* without specific prior written permission.
mbed_official 630:825f75ca301e 28 ;*
mbed_official 630:825f75ca301e 29 ;* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
mbed_official 630:825f75ca301e 30 ;* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
mbed_official 630:825f75ca301e 31 ;* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
mbed_official 630:825f75ca301e 32 ;* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
mbed_official 630:825f75ca301e 33 ;* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
mbed_official 630:825f75ca301e 34 ;* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
mbed_official 630:825f75ca301e 35 ;* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
mbed_official 630:825f75ca301e 36 ;* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
mbed_official 630:825f75ca301e 37 ;* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
mbed_official 630:825f75ca301e 38 ;* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
mbed_official 630:825f75ca301e 39 ;
mbed_official 630:825f75ca301e 40 ;*******************************************************************************
mbed_official 630:825f75ca301e 41
mbed_official 630:825f75ca301e 42 ; Amount of memory (in bytes) allocated for Stack
mbed_official 630:825f75ca301e 43 ; Tailor this value to your application needs
mbed_official 630:825f75ca301e 44 ; <h> Stack Configuration
mbed_official 630:825f75ca301e 45 ; <o> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
mbed_official 630:825f75ca301e 46 ; </h>
mbed_official 630:825f75ca301e 47
mbed_official 630:825f75ca301e 48 Stack_Size EQU 0x00000400
mbed_official 630:825f75ca301e 49
mbed_official 630:825f75ca301e 50 AREA STACK, NOINIT, READWRITE, ALIGN=3
mbed_official 630:825f75ca301e 51 EXPORT __initial_sp
mbed_official 630:825f75ca301e 52
mbed_official 630:825f75ca301e 53 Stack_Mem SPACE Stack_Size
mbed_official 630:825f75ca301e 54 __initial_sp EQU 0x20001000 ; Top of RAM
mbed_official 630:825f75ca301e 55
mbed_official 630:825f75ca301e 56
mbed_official 630:825f75ca301e 57 ; <h> Heap Configuration
mbed_official 630:825f75ca301e 58 ; <o> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
mbed_official 630:825f75ca301e 59 ; </h>
mbed_official 630:825f75ca301e 60
mbed_official 630:825f75ca301e 61 Heap_Size EQU 0x00000400
mbed_official 630:825f75ca301e 62
mbed_official 630:825f75ca301e 63 AREA HEAP, NOINIT, READWRITE, ALIGN=3
mbed_official 630:825f75ca301e 64 EXPORT __heap_base
mbed_official 630:825f75ca301e 65 EXPORT __heap_limit
mbed_official 630:825f75ca301e 66
mbed_official 630:825f75ca301e 67 __heap_base
mbed_official 630:825f75ca301e 68 Heap_Mem SPACE Heap_Size
mbed_official 630:825f75ca301e 69 __heap_limit EQU (__initial_sp - Stack_Size)
mbed_official 630:825f75ca301e 70
mbed_official 630:825f75ca301e 71 PRESERVE8
mbed_official 630:825f75ca301e 72 THUMB
mbed_official 630:825f75ca301e 73
mbed_official 630:825f75ca301e 74
mbed_official 630:825f75ca301e 75 ; Vector Table Mapped to Address 0 at Reset
mbed_official 630:825f75ca301e 76 AREA RESET, DATA, READONLY
mbed_official 630:825f75ca301e 77 EXPORT __Vectors
mbed_official 630:825f75ca301e 78 EXPORT __Vectors_End
mbed_official 630:825f75ca301e 79 EXPORT __Vectors_Size
mbed_official 630:825f75ca301e 80
mbed_official 630:825f75ca301e 81 __Vectors DCD __initial_sp ; Top of Stack
mbed_official 630:825f75ca301e 82 DCD Reset_Handler ; Reset Handler
mbed_official 630:825f75ca301e 83 DCD NMI_Handler ; NMI Handler
mbed_official 630:825f75ca301e 84 DCD HardFault_Handler ; Hard Fault Handler
mbed_official 630:825f75ca301e 85 DCD 0 ; Reserved
mbed_official 630:825f75ca301e 86 DCD 0 ; Reserved
mbed_official 630:825f75ca301e 87 DCD 0 ; Reserved
mbed_official 630:825f75ca301e 88 DCD 0 ; Reserved
mbed_official 630:825f75ca301e 89 DCD 0 ; Reserved
mbed_official 630:825f75ca301e 90 DCD 0 ; Reserved
mbed_official 630:825f75ca301e 91 DCD 0 ; Reserved
mbed_official 630:825f75ca301e 92 DCD SVC_Handler ; SVCall Handler
mbed_official 630:825f75ca301e 93 DCD 0 ; Reserved
mbed_official 630:825f75ca301e 94 DCD 0 ; Reserved
mbed_official 630:825f75ca301e 95 DCD PendSV_Handler ; PendSV Handler
mbed_official 630:825f75ca301e 96 DCD SysTick_Handler ; SysTick Handler
mbed_official 630:825f75ca301e 97
mbed_official 630:825f75ca301e 98 ; External Interrupts
mbed_official 630:825f75ca301e 99 DCD WWDG_IRQHandler ; Window Watchdog
mbed_official 630:825f75ca301e 100 DCD PVD_IRQHandler ; PVD through EXTI Line detect
mbed_official 630:825f75ca301e 101 DCD RTC_IRQHandler ; RTC through EXTI Line
mbed_official 630:825f75ca301e 102 DCD FLASH_IRQHandler ; FLASH
mbed_official 630:825f75ca301e 103 DCD RCC_IRQHandler ; RCC
mbed_official 630:825f75ca301e 104 DCD EXTI0_1_IRQHandler ; EXTI Line 0 and 1
mbed_official 630:825f75ca301e 105 DCD EXTI2_3_IRQHandler ; EXTI Line 2 and 3
mbed_official 630:825f75ca301e 106 DCD EXTI4_15_IRQHandler ; EXTI Line 4 to 15
mbed_official 630:825f75ca301e 107 DCD 0 ; Reserved
mbed_official 630:825f75ca301e 108 DCD DMA1_Channel1_IRQHandler ; DMA1 Channel 1
mbed_official 630:825f75ca301e 109 DCD DMA1_Channel2_3_IRQHandler ; DMA1 Channel 2 and Channel 3
mbed_official 630:825f75ca301e 110 DCD DMA1_Channel4_5_IRQHandler ; DMA1 Channel 4 and Channel 5
mbed_official 630:825f75ca301e 111 DCD ADC1_IRQHandler ; ADC1
mbed_official 630:825f75ca301e 112 DCD TIM1_BRK_UP_TRG_COM_IRQHandler ; TIM1 Break, Update, Trigger and Commutation
mbed_official 630:825f75ca301e 113 DCD TIM1_CC_IRQHandler ; TIM1 Capture Compare
mbed_official 630:825f75ca301e 114 DCD TIM2_IRQHandler ; TIM2
mbed_official 630:825f75ca301e 115 DCD TIM3_IRQHandler ; TIM3
mbed_official 630:825f75ca301e 116 DCD 0 ; Reserved
mbed_official 630:825f75ca301e 117 DCD 0 ; Reserved
mbed_official 630:825f75ca301e 118 DCD TIM14_IRQHandler ; TIM14
mbed_official 630:825f75ca301e 119 DCD 0 ; Reserved
mbed_official 630:825f75ca301e 120 DCD TIM16_IRQHandler ; TIM16
mbed_official 630:825f75ca301e 121 DCD TIM17_IRQHandler ; TIM17
mbed_official 630:825f75ca301e 122 DCD I2C1_IRQHandler ; I2C1
mbed_official 630:825f75ca301e 123 DCD 0 ; Reserved
mbed_official 630:825f75ca301e 124 DCD SPI1_IRQHandler ; SPI1
mbed_official 630:825f75ca301e 125 DCD 0 ; Reserved
mbed_official 630:825f75ca301e 126 DCD USART1_IRQHandler ; USART1
mbed_official 630:825f75ca301e 127
mbed_official 630:825f75ca301e 128
mbed_official 630:825f75ca301e 129 __Vectors_End
mbed_official 630:825f75ca301e 130
mbed_official 630:825f75ca301e 131 __Vectors_Size EQU __Vectors_End - __Vectors
mbed_official 630:825f75ca301e 132
mbed_official 630:825f75ca301e 133 AREA |.text|, CODE, READONLY
mbed_official 630:825f75ca301e 134
mbed_official 630:825f75ca301e 135 ; Reset handler routine
mbed_official 630:825f75ca301e 136 Reset_Handler PROC
mbed_official 630:825f75ca301e 137 EXPORT Reset_Handler [WEAK]
mbed_official 630:825f75ca301e 138 IMPORT __main
mbed_official 630:825f75ca301e 139 IMPORT SystemInit
mbed_official 630:825f75ca301e 140 LDR R0, =SystemInit
mbed_official 630:825f75ca301e 141 BLX R0
mbed_official 630:825f75ca301e 142 LDR R0, =__main
mbed_official 630:825f75ca301e 143 BX R0
mbed_official 630:825f75ca301e 144 ENDP
mbed_official 630:825f75ca301e 145
mbed_official 630:825f75ca301e 146 ; Dummy Exception Handlers (infinite loops which can be modified)
mbed_official 630:825f75ca301e 147
mbed_official 630:825f75ca301e 148 NMI_Handler PROC
mbed_official 630:825f75ca301e 149 EXPORT NMI_Handler [WEAK]
mbed_official 630:825f75ca301e 150 B .
mbed_official 630:825f75ca301e 151 ENDP
mbed_official 630:825f75ca301e 152 HardFault_Handler\
mbed_official 630:825f75ca301e 153 PROC
mbed_official 630:825f75ca301e 154 EXPORT HardFault_Handler [WEAK]
mbed_official 630:825f75ca301e 155 B .
mbed_official 630:825f75ca301e 156 ENDP
mbed_official 630:825f75ca301e 157 SVC_Handler PROC
mbed_official 630:825f75ca301e 158 EXPORT SVC_Handler [WEAK]
mbed_official 630:825f75ca301e 159 B .
mbed_official 630:825f75ca301e 160 ENDP
mbed_official 630:825f75ca301e 161 PendSV_Handler PROC
mbed_official 630:825f75ca301e 162 EXPORT PendSV_Handler [WEAK]
mbed_official 630:825f75ca301e 163 B .
mbed_official 630:825f75ca301e 164 ENDP
mbed_official 630:825f75ca301e 165 SysTick_Handler PROC
mbed_official 630:825f75ca301e 166 EXPORT SysTick_Handler [WEAK]
mbed_official 630:825f75ca301e 167 B .
mbed_official 630:825f75ca301e 168 ENDP
mbed_official 630:825f75ca301e 169
mbed_official 630:825f75ca301e 170 Default_Handler PROC
mbed_official 630:825f75ca301e 171
mbed_official 630:825f75ca301e 172 EXPORT WWDG_IRQHandler [WEAK]
mbed_official 630:825f75ca301e 173 EXPORT PVD_IRQHandler [WEAK]
mbed_official 630:825f75ca301e 174 EXPORT RTC_IRQHandler [WEAK]
mbed_official 630:825f75ca301e 175 EXPORT FLASH_IRQHandler [WEAK]
mbed_official 630:825f75ca301e 176 EXPORT RCC_IRQHandler [WEAK]
mbed_official 630:825f75ca301e 177 EXPORT EXTI0_1_IRQHandler [WEAK]
mbed_official 630:825f75ca301e 178 EXPORT EXTI2_3_IRQHandler [WEAK]
mbed_official 630:825f75ca301e 179 EXPORT EXTI4_15_IRQHandler [WEAK]
mbed_official 630:825f75ca301e 180 EXPORT DMA1_Channel1_IRQHandler [WEAK]
mbed_official 630:825f75ca301e 181 EXPORT DMA1_Channel2_3_IRQHandler [WEAK]
mbed_official 630:825f75ca301e 182 EXPORT DMA1_Channel4_5_IRQHandler [WEAK]
mbed_official 630:825f75ca301e 183 EXPORT ADC1_IRQHandler [WEAK]
mbed_official 630:825f75ca301e 184 EXPORT TIM1_BRK_UP_TRG_COM_IRQHandler [WEAK]
mbed_official 630:825f75ca301e 185 EXPORT TIM1_CC_IRQHandler [WEAK]
mbed_official 630:825f75ca301e 186 EXPORT TIM2_IRQHandler [WEAK]
mbed_official 630:825f75ca301e 187 EXPORT TIM3_IRQHandler [WEAK]
mbed_official 630:825f75ca301e 188 EXPORT TIM14_IRQHandler [WEAK]
mbed_official 630:825f75ca301e 189 EXPORT TIM16_IRQHandler [WEAK]
mbed_official 630:825f75ca301e 190 EXPORT TIM17_IRQHandler [WEAK]
mbed_official 630:825f75ca301e 191 EXPORT I2C1_IRQHandler [WEAK]
mbed_official 630:825f75ca301e 192 EXPORT SPI1_IRQHandler [WEAK]
mbed_official 630:825f75ca301e 193 EXPORT USART1_IRQHandler [WEAK]
mbed_official 630:825f75ca301e 194
mbed_official 630:825f75ca301e 195
mbed_official 630:825f75ca301e 196 WWDG_IRQHandler
mbed_official 630:825f75ca301e 197 PVD_IRQHandler
mbed_official 630:825f75ca301e 198 RTC_IRQHandler
mbed_official 630:825f75ca301e 199 FLASH_IRQHandler
mbed_official 630:825f75ca301e 200 RCC_IRQHandler
mbed_official 630:825f75ca301e 201 EXTI0_1_IRQHandler
mbed_official 630:825f75ca301e 202 EXTI2_3_IRQHandler
mbed_official 630:825f75ca301e 203 EXTI4_15_IRQHandler
mbed_official 630:825f75ca301e 204 DMA1_Channel1_IRQHandler
mbed_official 630:825f75ca301e 205 DMA1_Channel2_3_IRQHandler
mbed_official 630:825f75ca301e 206 DMA1_Channel4_5_IRQHandler
mbed_official 630:825f75ca301e 207 ADC1_IRQHandler
mbed_official 630:825f75ca301e 208 TIM1_BRK_UP_TRG_COM_IRQHandler
mbed_official 630:825f75ca301e 209 TIM1_CC_IRQHandler
mbed_official 630:825f75ca301e 210 TIM2_IRQHandler
mbed_official 630:825f75ca301e 211 TIM3_IRQHandler
mbed_official 630:825f75ca301e 212 TIM14_IRQHandler
mbed_official 630:825f75ca301e 213 TIM16_IRQHandler
mbed_official 630:825f75ca301e 214 TIM17_IRQHandler
mbed_official 630:825f75ca301e 215 I2C1_IRQHandler
mbed_official 630:825f75ca301e 216 SPI1_IRQHandler
mbed_official 630:825f75ca301e 217 USART1_IRQHandler
mbed_official 630:825f75ca301e 218
mbed_official 630:825f75ca301e 219 B .
mbed_official 630:825f75ca301e 220
mbed_official 630:825f75ca301e 221 ENDP
mbed_official 630:825f75ca301e 222
mbed_official 630:825f75ca301e 223 ALIGN
mbed_official 630:825f75ca301e 224 END
mbed_official 630:825f75ca301e 225
mbed_official 630:825f75ca301e 226 ;************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE*****