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:
Wed Jul 01 08:15:11 2015 +0100
Revision:
577:15494b56c2f3
Parent:
targets/cmsis/TARGET_STM/TARGET_STM32F1/TARGET_NUCLEO_F103RB/TOOLCHAIN_ARM_STD/startup_stm32f103xb.s@489:119543c9f674
Synchronized with git revision 7766e75dd858812cd79aedb3080349715f55dd56

Full URL: https://github.com/mbedmicro/mbed/commit/7766e75dd858812cd79aedb3080349715f55dd56/

GCC asm updates

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 489:119543c9f674 1 ;******************** (C) COPYRIGHT 2014 STMicroelectronics ********************
mbed_official 489:119543c9f674 2 ;* File Name : startup_stm32f103xb.s
mbed_official 489:119543c9f674 3 ;* Author : MCD Application Team
mbed_official 489:119543c9f674 4 ;* Version : V4.0.0
mbed_official 489:119543c9f674 5 ;* Date : 16-December-2014
mbed_official 489:119543c9f674 6 ;* Description : STM32F103xB Devices vector table for MDK-ARM toolchain.
mbed_official 489:119543c9f674 7 ;* This module performs:
mbed_official 489:119543c9f674 8 ;* - Set the initial SP
mbed_official 489:119543c9f674 9 ;* - Set the initial PC == Reset_Handler
mbed_official 489:119543c9f674 10 ;* - Set the vector table entries with the exceptions ISR address
mbed_official 489:119543c9f674 11 ;* - Configure the clock system
mbed_official 489:119543c9f674 12 ;* - Branches to __main in the C library (which eventually
mbed_official 489:119543c9f674 13 ;* calls main()).
mbed_official 489:119543c9f674 14 ;* After Reset the Cortex-M3 processor is in Thread mode,
mbed_official 489:119543c9f674 15 ;* priority is Privileged, and the Stack is set to Main.
mbed_official 489:119543c9f674 16 ;********************************************************************************
mbed_official 489:119543c9f674 17 ;*
mbed_official 489:119543c9f674 18 ;* COPYRIGHT(c) 2014 STMicroelectronics
mbed_official 489:119543c9f674 19 ;*
mbed_official 489:119543c9f674 20 ;* Redistribution and use in source and binary forms, with or without modification,
mbed_official 489:119543c9f674 21 ;* are permitted provided that the following conditions are met:
mbed_official 489:119543c9f674 22 ;* 1. Redistributions of source code must retain the above copyright notice,
mbed_official 489:119543c9f674 23 ;* this list of conditions and the following disclaimer.
mbed_official 489:119543c9f674 24 ;* 2. Redistributions in binary form must reproduce the above copyright notice,
mbed_official 489:119543c9f674 25 ;* this list of conditions and the following disclaimer in the documentation
mbed_official 489:119543c9f674 26 ;* and/or other materials provided with the distribution.
mbed_official 489:119543c9f674 27 ;* 3. Neither the name of STMicroelectronics nor the names of its contributors
mbed_official 489:119543c9f674 28 ;* may be used to endorse or promote products derived from this software
mbed_official 489:119543c9f674 29 ;* without specific prior written permission.
mbed_official 489:119543c9f674 30 ;*
mbed_official 489:119543c9f674 31 ;* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
mbed_official 489:119543c9f674 32 ;* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
mbed_official 489:119543c9f674 33 ;* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
mbed_official 489:119543c9f674 34 ;* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
mbed_official 489:119543c9f674 35 ;* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
mbed_official 489:119543c9f674 36 ;* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
mbed_official 489:119543c9f674 37 ;* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
mbed_official 489:119543c9f674 38 ;* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
mbed_official 489:119543c9f674 39 ;* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
mbed_official 489:119543c9f674 40 ;* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
mbed_official 489:119543c9f674 41 ;
mbed_official 489:119543c9f674 42 ;*******************************************************************************
mbed_official 489:119543c9f674 43
mbed_official 489:119543c9f674 44 __initial_sp EQU 0x20005000 ; Top of RAM
mbed_official 489:119543c9f674 45
mbed_official 489:119543c9f674 46 PRESERVE8
mbed_official 489:119543c9f674 47 THUMB
mbed_official 489:119543c9f674 48
mbed_official 489:119543c9f674 49
mbed_official 489:119543c9f674 50 ; Vector Table Mapped to Address 0 at Reset
mbed_official 489:119543c9f674 51 AREA RESET, DATA, READONLY
mbed_official 489:119543c9f674 52 EXPORT __Vectors
mbed_official 489:119543c9f674 53 EXPORT __Vectors_End
mbed_official 489:119543c9f674 54 EXPORT __Vectors_Size
mbed_official 489:119543c9f674 55
mbed_official 489:119543c9f674 56 __Vectors DCD __initial_sp ; Top of Stack
mbed_official 489:119543c9f674 57 DCD Reset_Handler ; Reset Handler
mbed_official 489:119543c9f674 58 DCD NMI_Handler ; NMI Handler
mbed_official 489:119543c9f674 59 DCD HardFault_Handler ; Hard Fault Handler
mbed_official 489:119543c9f674 60 DCD MemManage_Handler ; MPU Fault Handler
mbed_official 489:119543c9f674 61 DCD BusFault_Handler ; Bus Fault Handler
mbed_official 489:119543c9f674 62 DCD UsageFault_Handler ; Usage Fault Handler
mbed_official 489:119543c9f674 63 DCD 0 ; Reserved
mbed_official 489:119543c9f674 64 DCD 0 ; Reserved
mbed_official 489:119543c9f674 65 DCD 0 ; Reserved
mbed_official 489:119543c9f674 66 DCD 0 ; Reserved
mbed_official 489:119543c9f674 67 DCD SVC_Handler ; SVCall Handler
mbed_official 489:119543c9f674 68 DCD DebugMon_Handler ; Debug Monitor Handler
mbed_official 489:119543c9f674 69 DCD 0 ; Reserved
mbed_official 489:119543c9f674 70 DCD PendSV_Handler ; PendSV Handler
mbed_official 489:119543c9f674 71 DCD SysTick_Handler ; SysTick Handler
mbed_official 489:119543c9f674 72
mbed_official 489:119543c9f674 73 ; External Interrupts
mbed_official 489:119543c9f674 74 DCD WWDG_IRQHandler ; Window Watchdog
mbed_official 489:119543c9f674 75 DCD PVD_IRQHandler ; PVD through EXTI Line detect
mbed_official 489:119543c9f674 76 DCD TAMPER_IRQHandler ; Tamper
mbed_official 489:119543c9f674 77 DCD RTC_IRQHandler ; RTC
mbed_official 489:119543c9f674 78 DCD FLASH_IRQHandler ; Flash
mbed_official 489:119543c9f674 79 DCD RCC_IRQHandler ; RCC
mbed_official 489:119543c9f674 80 DCD EXTI0_IRQHandler ; EXTI Line 0
mbed_official 489:119543c9f674 81 DCD EXTI1_IRQHandler ; EXTI Line 1
mbed_official 489:119543c9f674 82 DCD EXTI2_IRQHandler ; EXTI Line 2
mbed_official 489:119543c9f674 83 DCD EXTI3_IRQHandler ; EXTI Line 3
mbed_official 489:119543c9f674 84 DCD EXTI4_IRQHandler ; EXTI Line 4
mbed_official 489:119543c9f674 85 DCD DMA1_Channel1_IRQHandler ; DMA1 Channel 1
mbed_official 489:119543c9f674 86 DCD DMA1_Channel2_IRQHandler ; DMA1 Channel 2
mbed_official 489:119543c9f674 87 DCD DMA1_Channel3_IRQHandler ; DMA1 Channel 3
mbed_official 489:119543c9f674 88 DCD DMA1_Channel4_IRQHandler ; DMA1 Channel 4
mbed_official 489:119543c9f674 89 DCD DMA1_Channel5_IRQHandler ; DMA1 Channel 5
mbed_official 489:119543c9f674 90 DCD DMA1_Channel6_IRQHandler ; DMA1 Channel 6
mbed_official 489:119543c9f674 91 DCD DMA1_Channel7_IRQHandler ; DMA1 Channel 7
mbed_official 489:119543c9f674 92 DCD ADC1_2_IRQHandler ; ADC1_2
mbed_official 489:119543c9f674 93 DCD USB_HP_CAN1_TX_IRQHandler ; USB High Priority or CAN1 TX
mbed_official 489:119543c9f674 94 DCD USB_LP_CAN1_RX0_IRQHandler ; USB Low Priority or CAN1 RX0
mbed_official 489:119543c9f674 95 DCD CAN1_RX1_IRQHandler ; CAN1 RX1
mbed_official 489:119543c9f674 96 DCD CAN1_SCE_IRQHandler ; CAN1 SCE
mbed_official 489:119543c9f674 97 DCD EXTI9_5_IRQHandler ; EXTI Line 9..5
mbed_official 489:119543c9f674 98 DCD TIM1_BRK_IRQHandler ; TIM1 Break
mbed_official 489:119543c9f674 99 DCD TIM1_UP_IRQHandler ; TIM1 Update
mbed_official 489:119543c9f674 100 DCD TIM1_TRG_COM_IRQHandler ; TIM1 Trigger and Commutation
mbed_official 489:119543c9f674 101 DCD TIM1_CC_IRQHandler ; TIM1 Capture Compare
mbed_official 489:119543c9f674 102 DCD TIM2_IRQHandler ; TIM2
mbed_official 489:119543c9f674 103 DCD TIM3_IRQHandler ; TIM3
mbed_official 489:119543c9f674 104 DCD TIM4_IRQHandler ; TIM4
mbed_official 489:119543c9f674 105 DCD I2C1_EV_IRQHandler ; I2C1 Event
mbed_official 489:119543c9f674 106 DCD I2C1_ER_IRQHandler ; I2C1 Error
mbed_official 489:119543c9f674 107 DCD I2C2_EV_IRQHandler ; I2C2 Event
mbed_official 489:119543c9f674 108 DCD I2C2_ER_IRQHandler ; I2C2 Error
mbed_official 489:119543c9f674 109 DCD SPI1_IRQHandler ; SPI1
mbed_official 489:119543c9f674 110 DCD SPI2_IRQHandler ; SPI2
mbed_official 489:119543c9f674 111 DCD USART1_IRQHandler ; USART1
mbed_official 489:119543c9f674 112 DCD USART2_IRQHandler ; USART2
mbed_official 489:119543c9f674 113 DCD USART3_IRQHandler ; USART3
mbed_official 489:119543c9f674 114 DCD EXTI15_10_IRQHandler ; EXTI Line 15..10
mbed_official 489:119543c9f674 115 DCD RTC_Alarm_IRQHandler ; RTC Alarm through EXTI Line
mbed_official 489:119543c9f674 116 DCD USBWakeUp_IRQHandler ; USB Wakeup from suspend
mbed_official 489:119543c9f674 117 __Vectors_End
mbed_official 489:119543c9f674 118
mbed_official 489:119543c9f674 119 __Vectors_Size EQU __Vectors_End - __Vectors
mbed_official 489:119543c9f674 120
mbed_official 489:119543c9f674 121 AREA |.text|, CODE, READONLY
mbed_official 489:119543c9f674 122
mbed_official 489:119543c9f674 123 ; Reset handler
mbed_official 489:119543c9f674 124 Reset_Handler PROC
mbed_official 489:119543c9f674 125 EXPORT Reset_Handler [WEAK]
mbed_official 489:119543c9f674 126 IMPORT __main
mbed_official 489:119543c9f674 127 IMPORT SystemInit
mbed_official 489:119543c9f674 128 LDR R0, =SystemInit
mbed_official 489:119543c9f674 129 BLX R0
mbed_official 489:119543c9f674 130 LDR R0, =__main
mbed_official 489:119543c9f674 131 BX R0
mbed_official 489:119543c9f674 132 ENDP
mbed_official 489:119543c9f674 133
mbed_official 489:119543c9f674 134 ; Dummy Exception Handlers (infinite loops which can be modified)
mbed_official 489:119543c9f674 135
mbed_official 489:119543c9f674 136 NMI_Handler PROC
mbed_official 489:119543c9f674 137 EXPORT NMI_Handler [WEAK]
mbed_official 489:119543c9f674 138 B .
mbed_official 489:119543c9f674 139 ENDP
mbed_official 489:119543c9f674 140 HardFault_Handler\
mbed_official 489:119543c9f674 141 PROC
mbed_official 489:119543c9f674 142 EXPORT HardFault_Handler [WEAK]
mbed_official 489:119543c9f674 143 B .
mbed_official 489:119543c9f674 144 ENDP
mbed_official 489:119543c9f674 145 MemManage_Handler\
mbed_official 489:119543c9f674 146 PROC
mbed_official 489:119543c9f674 147 EXPORT MemManage_Handler [WEAK]
mbed_official 489:119543c9f674 148 B .
mbed_official 489:119543c9f674 149 ENDP
mbed_official 489:119543c9f674 150 BusFault_Handler\
mbed_official 489:119543c9f674 151 PROC
mbed_official 489:119543c9f674 152 EXPORT BusFault_Handler [WEAK]
mbed_official 489:119543c9f674 153 B .
mbed_official 489:119543c9f674 154 ENDP
mbed_official 489:119543c9f674 155 UsageFault_Handler\
mbed_official 489:119543c9f674 156 PROC
mbed_official 489:119543c9f674 157 EXPORT UsageFault_Handler [WEAK]
mbed_official 489:119543c9f674 158 B .
mbed_official 489:119543c9f674 159 ENDP
mbed_official 489:119543c9f674 160 SVC_Handler PROC
mbed_official 489:119543c9f674 161 EXPORT SVC_Handler [WEAK]
mbed_official 489:119543c9f674 162 B .
mbed_official 489:119543c9f674 163 ENDP
mbed_official 489:119543c9f674 164 DebugMon_Handler\
mbed_official 489:119543c9f674 165 PROC
mbed_official 489:119543c9f674 166 EXPORT DebugMon_Handler [WEAK]
mbed_official 489:119543c9f674 167 B .
mbed_official 489:119543c9f674 168 ENDP
mbed_official 489:119543c9f674 169 PendSV_Handler PROC
mbed_official 489:119543c9f674 170 EXPORT PendSV_Handler [WEAK]
mbed_official 489:119543c9f674 171 B .
mbed_official 489:119543c9f674 172 ENDP
mbed_official 489:119543c9f674 173 SysTick_Handler PROC
mbed_official 489:119543c9f674 174 EXPORT SysTick_Handler [WEAK]
mbed_official 489:119543c9f674 175 B .
mbed_official 489:119543c9f674 176 ENDP
mbed_official 489:119543c9f674 177
mbed_official 489:119543c9f674 178 Default_Handler PROC
mbed_official 489:119543c9f674 179
mbed_official 489:119543c9f674 180 EXPORT WWDG_IRQHandler [WEAK]
mbed_official 489:119543c9f674 181 EXPORT PVD_IRQHandler [WEAK]
mbed_official 489:119543c9f674 182 EXPORT TAMPER_IRQHandler [WEAK]
mbed_official 489:119543c9f674 183 EXPORT RTC_IRQHandler [WEAK]
mbed_official 489:119543c9f674 184 EXPORT FLASH_IRQHandler [WEAK]
mbed_official 489:119543c9f674 185 EXPORT RCC_IRQHandler [WEAK]
mbed_official 489:119543c9f674 186 EXPORT EXTI0_IRQHandler [WEAK]
mbed_official 489:119543c9f674 187 EXPORT EXTI1_IRQHandler [WEAK]
mbed_official 489:119543c9f674 188 EXPORT EXTI2_IRQHandler [WEAK]
mbed_official 489:119543c9f674 189 EXPORT EXTI3_IRQHandler [WEAK]
mbed_official 489:119543c9f674 190 EXPORT EXTI4_IRQHandler [WEAK]
mbed_official 489:119543c9f674 191 EXPORT DMA1_Channel1_IRQHandler [WEAK]
mbed_official 489:119543c9f674 192 EXPORT DMA1_Channel2_IRQHandler [WEAK]
mbed_official 489:119543c9f674 193 EXPORT DMA1_Channel3_IRQHandler [WEAK]
mbed_official 489:119543c9f674 194 EXPORT DMA1_Channel4_IRQHandler [WEAK]
mbed_official 489:119543c9f674 195 EXPORT DMA1_Channel5_IRQHandler [WEAK]
mbed_official 489:119543c9f674 196 EXPORT DMA1_Channel6_IRQHandler [WEAK]
mbed_official 489:119543c9f674 197 EXPORT DMA1_Channel7_IRQHandler [WEAK]
mbed_official 489:119543c9f674 198 EXPORT ADC1_2_IRQHandler [WEAK]
mbed_official 489:119543c9f674 199 EXPORT USB_HP_CAN1_TX_IRQHandler [WEAK]
mbed_official 489:119543c9f674 200 EXPORT USB_LP_CAN1_RX0_IRQHandler [WEAK]
mbed_official 489:119543c9f674 201 EXPORT CAN1_RX1_IRQHandler [WEAK]
mbed_official 489:119543c9f674 202 EXPORT CAN1_SCE_IRQHandler [WEAK]
mbed_official 489:119543c9f674 203 EXPORT EXTI9_5_IRQHandler [WEAK]
mbed_official 489:119543c9f674 204 EXPORT TIM1_BRK_IRQHandler [WEAK]
mbed_official 489:119543c9f674 205 EXPORT TIM1_UP_IRQHandler [WEAK]
mbed_official 489:119543c9f674 206 EXPORT TIM1_TRG_COM_IRQHandler [WEAK]
mbed_official 489:119543c9f674 207 EXPORT TIM1_CC_IRQHandler [WEAK]
mbed_official 489:119543c9f674 208 EXPORT TIM2_IRQHandler [WEAK]
mbed_official 489:119543c9f674 209 EXPORT TIM3_IRQHandler [WEAK]
mbed_official 489:119543c9f674 210 EXPORT TIM4_IRQHandler [WEAK]
mbed_official 489:119543c9f674 211 EXPORT I2C1_EV_IRQHandler [WEAK]
mbed_official 489:119543c9f674 212 EXPORT I2C1_ER_IRQHandler [WEAK]
mbed_official 489:119543c9f674 213 EXPORT I2C2_EV_IRQHandler [WEAK]
mbed_official 489:119543c9f674 214 EXPORT I2C2_ER_IRQHandler [WEAK]
mbed_official 489:119543c9f674 215 EXPORT SPI1_IRQHandler [WEAK]
mbed_official 489:119543c9f674 216 EXPORT SPI2_IRQHandler [WEAK]
mbed_official 489:119543c9f674 217 EXPORT USART1_IRQHandler [WEAK]
mbed_official 489:119543c9f674 218 EXPORT USART2_IRQHandler [WEAK]
mbed_official 489:119543c9f674 219 EXPORT USART3_IRQHandler [WEAK]
mbed_official 489:119543c9f674 220 EXPORT EXTI15_10_IRQHandler [WEAK]
mbed_official 489:119543c9f674 221 EXPORT RTC_Alarm_IRQHandler [WEAK]
mbed_official 489:119543c9f674 222 EXPORT USBWakeUp_IRQHandler [WEAK]
mbed_official 489:119543c9f674 223
mbed_official 489:119543c9f674 224 WWDG_IRQHandler
mbed_official 489:119543c9f674 225 PVD_IRQHandler
mbed_official 489:119543c9f674 226 TAMPER_IRQHandler
mbed_official 489:119543c9f674 227 RTC_IRQHandler
mbed_official 489:119543c9f674 228 FLASH_IRQHandler
mbed_official 489:119543c9f674 229 RCC_IRQHandler
mbed_official 489:119543c9f674 230 EXTI0_IRQHandler
mbed_official 489:119543c9f674 231 EXTI1_IRQHandler
mbed_official 489:119543c9f674 232 EXTI2_IRQHandler
mbed_official 489:119543c9f674 233 EXTI3_IRQHandler
mbed_official 489:119543c9f674 234 EXTI4_IRQHandler
mbed_official 489:119543c9f674 235 DMA1_Channel1_IRQHandler
mbed_official 489:119543c9f674 236 DMA1_Channel2_IRQHandler
mbed_official 489:119543c9f674 237 DMA1_Channel3_IRQHandler
mbed_official 489:119543c9f674 238 DMA1_Channel4_IRQHandler
mbed_official 489:119543c9f674 239 DMA1_Channel5_IRQHandler
mbed_official 489:119543c9f674 240 DMA1_Channel6_IRQHandler
mbed_official 489:119543c9f674 241 DMA1_Channel7_IRQHandler
mbed_official 489:119543c9f674 242 ADC1_2_IRQHandler
mbed_official 489:119543c9f674 243 USB_HP_CAN1_TX_IRQHandler
mbed_official 489:119543c9f674 244 USB_LP_CAN1_RX0_IRQHandler
mbed_official 489:119543c9f674 245 CAN1_RX1_IRQHandler
mbed_official 489:119543c9f674 246 CAN1_SCE_IRQHandler
mbed_official 489:119543c9f674 247 EXTI9_5_IRQHandler
mbed_official 489:119543c9f674 248 TIM1_BRK_IRQHandler
mbed_official 489:119543c9f674 249 TIM1_UP_IRQHandler
mbed_official 489:119543c9f674 250 TIM1_TRG_COM_IRQHandler
mbed_official 489:119543c9f674 251 TIM1_CC_IRQHandler
mbed_official 489:119543c9f674 252 TIM2_IRQHandler
mbed_official 489:119543c9f674 253 TIM3_IRQHandler
mbed_official 489:119543c9f674 254 TIM4_IRQHandler
mbed_official 489:119543c9f674 255 I2C1_EV_IRQHandler
mbed_official 489:119543c9f674 256 I2C1_ER_IRQHandler
mbed_official 489:119543c9f674 257 I2C2_EV_IRQHandler
mbed_official 489:119543c9f674 258 I2C2_ER_IRQHandler
mbed_official 489:119543c9f674 259 SPI1_IRQHandler
mbed_official 489:119543c9f674 260 SPI2_IRQHandler
mbed_official 489:119543c9f674 261 USART1_IRQHandler
mbed_official 489:119543c9f674 262 USART2_IRQHandler
mbed_official 489:119543c9f674 263 USART3_IRQHandler
mbed_official 489:119543c9f674 264 EXTI15_10_IRQHandler
mbed_official 489:119543c9f674 265 RTC_Alarm_IRQHandler
mbed_official 489:119543c9f674 266 USBWakeUp_IRQHandler
mbed_official 489:119543c9f674 267
mbed_official 489:119543c9f674 268 B .
mbed_official 489:119543c9f674 269
mbed_official 489:119543c9f674 270 ENDP
mbed_official 489:119543c9f674 271
mbed_official 489:119543c9f674 272 ALIGN
mbed_official 489:119543c9f674 273 END