Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 5 | mjames | 1 | ;******************** (C) COPYRIGHT 2016 STMicroelectronics ******************** |
| 2 | mjames | 2 | ;* File Name : startup_stm32f101x6.s |
| 3 | ;* Author : MCD Application Team |
||
| 5 | mjames | 4 | ;* Version : V4.1.0 |
| 5 | ;* Date : 29-April-2016 |
||
| 2 | mjames | 6 | ;* Description : STM32F101x6 Access Line Devices vector table for EWARM |
| 7 | ;* toolchain. |
||
| 8 | ;* This module performs: |
||
| 9 | ;* - Set the initial SP |
||
| 10 | ;* - Configure the clock system |
||
| 11 | ;* - Set the initial PC == __iar_program_start, |
||
| 12 | ;* - Set the vector table entries with the exceptions ISR |
||
| 13 | ;* address. |
||
| 14 | ;* After Reset the Cortex-M3 processor is in Thread mode, |
||
| 15 | ;* priority is Privileged, and the Stack is set to Main. |
||
| 16 | ;******************************************************************************** |
||
| 17 | ;* |
||
| 5 | mjames | 18 | ;* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2> |
| 2 | mjames | 19 | ;* |
| 20 | ;* Redistribution and use in source and binary forms, with or without modification, |
||
| 21 | ;* are permitted provided that the following conditions are met: |
||
| 22 | ;* 1. Redistributions of source code must retain the above copyright notice, |
||
| 23 | ;* this list of conditions and the following disclaimer. |
||
| 24 | ;* 2. Redistributions in binary form must reproduce the above copyright notice, |
||
| 25 | ;* this list of conditions and the following disclaimer in the documentation |
||
| 26 | ;* and/or other materials provided with the distribution. |
||
| 27 | ;* 3. Neither the name of STMicroelectronics nor the names of its contributors |
||
| 28 | ;* may be used to endorse or promote products derived from this software |
||
| 29 | ;* without specific prior written permission. |
||
| 30 | ;* |
||
| 31 | ;* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
||
| 32 | ;* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
||
| 33 | ;* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
||
| 34 | ;* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
||
| 35 | ;* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
||
| 36 | ;* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
||
| 37 | ;* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
||
| 38 | ;* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
||
| 39 | ;* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
||
| 40 | ;* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
||
| 41 | ;* |
||
| 42 | ;******************************************************************************* |
||
| 43 | ; |
||
| 44 | ; |
||
| 45 | ; The modules in this file are included in the libraries, and may be replaced |
||
| 46 | ; by any user-defined modules that define the PUBLIC symbol _program_start or |
||
| 47 | ; a user defined start symbol. |
||
| 48 | ; To override the cstartup defined in the library, simply add your modified |
||
| 49 | ; version to the workbench project. |
||
| 50 | ; |
||
| 51 | ; The vector table is normally located at address 0. |
||
| 52 | ; When debugging in RAM, it can be located in RAM, aligned to at least 2^6. |
||
| 53 | ; The name "__vector_table" has special meaning for C-SPY: |
||
| 54 | ; it is where the SP start value is found, and the NVIC vector |
||
| 55 | ; table register (VTOR) is initialized to this address if != 0. |
||
| 56 | ; |
||
| 57 | ; Cortex-M version |
||
| 58 | ; |
||
| 59 | |||
| 60 | MODULE ?cstartup |
||
| 61 | |||
| 62 | ;; Forward declaration of sections. |
||
| 63 | SECTION CSTACK:DATA:NOROOT(3) |
||
| 64 | |||
| 65 | SECTION .intvec:CODE:NOROOT(2) |
||
| 66 | |||
| 67 | EXTERN __iar_program_start |
||
| 68 | EXTERN SystemInit |
||
| 69 | PUBLIC __vector_table |
||
| 70 | |||
| 71 | DATA |
||
| 72 | __vector_table |
||
| 73 | DCD sfe(CSTACK) |
||
| 74 | DCD Reset_Handler ; Reset Handler |
||
| 75 | DCD NMI_Handler ; NMI Handler |
||
| 76 | DCD HardFault_Handler ; Hard Fault Handler |
||
| 77 | DCD MemManage_Handler ; MPU Fault Handler |
||
| 78 | DCD BusFault_Handler ; Bus Fault Handler |
||
| 79 | DCD UsageFault_Handler ; Usage Fault Handler |
||
| 80 | DCD 0 ; Reserved |
||
| 81 | DCD 0 ; Reserved |
||
| 82 | DCD 0 ; Reserved |
||
| 83 | DCD 0 ; Reserved |
||
| 84 | DCD SVC_Handler ; SVCall Handler |
||
| 85 | DCD DebugMon_Handler ; Debug Monitor Handler |
||
| 86 | DCD 0 ; Reserved |
||
| 87 | DCD PendSV_Handler ; PendSV Handler |
||
| 88 | DCD SysTick_Handler ; SysTick Handler |
||
| 89 | |||
| 90 | ; External Interrupts |
||
| 91 | DCD WWDG_IRQHandler ; Window Watchdog |
||
| 92 | DCD PVD_IRQHandler ; PVD through EXTI Line detect |
||
| 93 | DCD TAMPER_IRQHandler ; Tamper |
||
| 94 | DCD RTC_IRQHandler ; RTC |
||
| 95 | DCD FLASH_IRQHandler ; Flash |
||
| 96 | DCD RCC_IRQHandler ; RCC |
||
| 97 | DCD EXTI0_IRQHandler ; EXTI Line 0 |
||
| 98 | DCD EXTI1_IRQHandler ; EXTI Line 1 |
||
| 99 | DCD EXTI2_IRQHandler ; EXTI Line 2 |
||
| 100 | DCD EXTI3_IRQHandler ; EXTI Line 3 |
||
| 101 | DCD EXTI4_IRQHandler ; EXTI Line 4 |
||
| 102 | DCD DMA1_Channel1_IRQHandler ; DMA1 Channel 1 |
||
| 103 | DCD DMA1_Channel2_IRQHandler ; DMA1 Channel 2 |
||
| 104 | DCD DMA1_Channel3_IRQHandler ; DMA1 Channel 3 |
||
| 105 | DCD DMA1_Channel4_IRQHandler ; DMA1 Channel 4 |
||
| 106 | DCD DMA1_Channel5_IRQHandler ; DMA1 Channel 5 |
||
| 107 | DCD DMA1_Channel6_IRQHandler ; DMA1 Channel 6 |
||
| 108 | DCD DMA1_Channel7_IRQHandler ; DMA1 Channel 7 |
||
| 109 | DCD ADC1_IRQHandler ; ADC1 |
||
| 110 | DCD 0 ; Reserved |
||
| 111 | DCD 0 ; Reserved |
||
| 112 | DCD 0 ; Reserved |
||
| 113 | DCD 0 ; Reserved |
||
| 114 | DCD EXTI9_5_IRQHandler ; EXTI Line 9..5 |
||
| 115 | DCD 0 ; Reserved |
||
| 116 | DCD 0 ; Reserved |
||
| 117 | DCD 0 ; Reserved |
||
| 118 | DCD 0 ; Reserved |
||
| 119 | DCD TIM2_IRQHandler ; TIM2 |
||
| 120 | DCD TIM3_IRQHandler ; TIM3 |
||
| 121 | DCD 0 ; Reserved |
||
| 122 | DCD I2C1_EV_IRQHandler ; I2C1 Event |
||
| 123 | DCD I2C1_ER_IRQHandler ; I2C1 Error |
||
| 124 | DCD 0 ; Reserved |
||
| 125 | DCD 0 ; Reserved |
||
| 126 | DCD SPI1_IRQHandler ; SPI1 |
||
| 127 | DCD 0 ; Reserved |
||
| 128 | DCD USART1_IRQHandler ; USART1 |
||
| 129 | DCD USART2_IRQHandler ; USART2 |
||
| 130 | DCD 0 ; Reserved |
||
| 131 | DCD EXTI15_10_IRQHandler ; EXTI Line 15..10 |
||
| 132 | DCD RTC_Alarm_IRQHandler ; RTC Alarm through EXTI Line |
||
| 133 | DCD 0 ; Reserved |
||
| 134 | |||
| 135 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
||
| 136 | ;; |
||
| 137 | ;; Default interrupt handlers. |
||
| 138 | ;; |
||
| 139 | THUMB |
||
| 140 | |||
| 141 | PUBWEAK Reset_Handler |
||
| 142 | SECTION .text:CODE:REORDER:NOROOT(2) |
||
| 143 | Reset_Handler |
||
| 144 | LDR R0, =SystemInit |
||
| 145 | BLX R0 |
||
| 146 | LDR R0, =__iar_program_start |
||
| 147 | BX R0 |
||
| 148 | |||
| 149 | PUBWEAK NMI_Handler |
||
| 150 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 151 | NMI_Handler |
||
| 152 | B NMI_Handler |
||
| 153 | |||
| 154 | PUBWEAK HardFault_Handler |
||
| 155 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 156 | HardFault_Handler |
||
| 157 | B HardFault_Handler |
||
| 158 | |||
| 159 | PUBWEAK MemManage_Handler |
||
| 160 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 161 | MemManage_Handler |
||
| 162 | B MemManage_Handler |
||
| 163 | |||
| 164 | PUBWEAK BusFault_Handler |
||
| 165 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 166 | BusFault_Handler |
||
| 167 | B BusFault_Handler |
||
| 168 | |||
| 169 | PUBWEAK UsageFault_Handler |
||
| 170 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 171 | UsageFault_Handler |
||
| 172 | B UsageFault_Handler |
||
| 173 | |||
| 174 | PUBWEAK SVC_Handler |
||
| 175 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 176 | SVC_Handler |
||
| 177 | B SVC_Handler |
||
| 178 | |||
| 179 | PUBWEAK DebugMon_Handler |
||
| 180 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 181 | DebugMon_Handler |
||
| 182 | B DebugMon_Handler |
||
| 183 | |||
| 184 | PUBWEAK PendSV_Handler |
||
| 185 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 186 | PendSV_Handler |
||
| 187 | B PendSV_Handler |
||
| 188 | |||
| 189 | PUBWEAK SysTick_Handler |
||
| 190 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 191 | SysTick_Handler |
||
| 192 | B SysTick_Handler |
||
| 193 | |||
| 194 | PUBWEAK WWDG_IRQHandler |
||
| 195 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 196 | WWDG_IRQHandler |
||
| 197 | B WWDG_IRQHandler |
||
| 198 | |||
| 199 | PUBWEAK PVD_IRQHandler |
||
| 200 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 201 | PVD_IRQHandler |
||
| 202 | B PVD_IRQHandler |
||
| 203 | |||
| 204 | PUBWEAK TAMPER_IRQHandler |
||
| 205 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 206 | TAMPER_IRQHandler |
||
| 207 | B TAMPER_IRQHandler |
||
| 208 | |||
| 209 | PUBWEAK RTC_IRQHandler |
||
| 210 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 211 | RTC_IRQHandler |
||
| 212 | B RTC_IRQHandler |
||
| 213 | |||
| 214 | PUBWEAK FLASH_IRQHandler |
||
| 215 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 216 | FLASH_IRQHandler |
||
| 217 | B FLASH_IRQHandler |
||
| 218 | |||
| 219 | PUBWEAK RCC_IRQHandler |
||
| 220 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 221 | RCC_IRQHandler |
||
| 222 | B RCC_IRQHandler |
||
| 223 | |||
| 224 | PUBWEAK EXTI0_IRQHandler |
||
| 225 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 226 | EXTI0_IRQHandler |
||
| 227 | B EXTI0_IRQHandler |
||
| 228 | |||
| 229 | PUBWEAK EXTI1_IRQHandler |
||
| 230 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 231 | EXTI1_IRQHandler |
||
| 232 | B EXTI1_IRQHandler |
||
| 233 | |||
| 234 | PUBWEAK EXTI2_IRQHandler |
||
| 235 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 236 | EXTI2_IRQHandler |
||
| 237 | B EXTI2_IRQHandler |
||
| 238 | |||
| 239 | PUBWEAK EXTI3_IRQHandler |
||
| 240 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 241 | EXTI3_IRQHandler |
||
| 242 | B EXTI3_IRQHandler |
||
| 243 | |||
| 244 | PUBWEAK EXTI4_IRQHandler |
||
| 245 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 246 | EXTI4_IRQHandler |
||
| 247 | B EXTI4_IRQHandler |
||
| 248 | |||
| 249 | PUBWEAK DMA1_Channel1_IRQHandler |
||
| 250 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 251 | DMA1_Channel1_IRQHandler |
||
| 252 | B DMA1_Channel1_IRQHandler |
||
| 253 | |||
| 254 | PUBWEAK DMA1_Channel2_IRQHandler |
||
| 255 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 256 | DMA1_Channel2_IRQHandler |
||
| 257 | B DMA1_Channel2_IRQHandler |
||
| 258 | |||
| 259 | PUBWEAK DMA1_Channel3_IRQHandler |
||
| 260 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 261 | DMA1_Channel3_IRQHandler |
||
| 262 | B DMA1_Channel3_IRQHandler |
||
| 263 | |||
| 264 | PUBWEAK DMA1_Channel4_IRQHandler |
||
| 265 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 266 | DMA1_Channel4_IRQHandler |
||
| 267 | B DMA1_Channel4_IRQHandler |
||
| 268 | |||
| 269 | PUBWEAK DMA1_Channel5_IRQHandler |
||
| 270 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 271 | DMA1_Channel5_IRQHandler |
||
| 272 | B DMA1_Channel5_IRQHandler |
||
| 273 | |||
| 274 | PUBWEAK DMA1_Channel6_IRQHandler |
||
| 275 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 276 | DMA1_Channel6_IRQHandler |
||
| 277 | B DMA1_Channel6_IRQHandler |
||
| 278 | |||
| 279 | PUBWEAK DMA1_Channel7_IRQHandler |
||
| 280 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 281 | DMA1_Channel7_IRQHandler |
||
| 282 | B DMA1_Channel7_IRQHandler |
||
| 283 | |||
| 284 | PUBWEAK ADC1_IRQHandler |
||
| 285 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 286 | ADC1_IRQHandler |
||
| 287 | B ADC1_IRQHandler |
||
| 288 | |||
| 289 | PUBWEAK EXTI9_5_IRQHandler |
||
| 290 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 291 | EXTI9_5_IRQHandler |
||
| 292 | B EXTI9_5_IRQHandler |
||
| 293 | |||
| 294 | PUBWEAK TIM2_IRQHandler |
||
| 295 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 296 | TIM2_IRQHandler |
||
| 297 | B TIM2_IRQHandler |
||
| 298 | |||
| 299 | PUBWEAK TIM3_IRQHandler |
||
| 300 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 301 | TIM3_IRQHandler |
||
| 302 | B TIM3_IRQHandler |
||
| 303 | |||
| 304 | PUBWEAK I2C1_EV_IRQHandler |
||
| 305 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 306 | I2C1_EV_IRQHandler |
||
| 307 | B I2C1_EV_IRQHandler |
||
| 308 | |||
| 309 | PUBWEAK I2C1_ER_IRQHandler |
||
| 310 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 311 | I2C1_ER_IRQHandler |
||
| 312 | B I2C1_ER_IRQHandler |
||
| 313 | |||
| 314 | PUBWEAK SPI1_IRQHandler |
||
| 315 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 316 | SPI1_IRQHandler |
||
| 317 | B SPI1_IRQHandler |
||
| 318 | |||
| 319 | PUBWEAK USART1_IRQHandler |
||
| 320 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 321 | USART1_IRQHandler |
||
| 322 | B USART1_IRQHandler |
||
| 323 | |||
| 324 | PUBWEAK USART2_IRQHandler |
||
| 325 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 326 | USART2_IRQHandler |
||
| 327 | B USART2_IRQHandler |
||
| 328 | |||
| 329 | PUBWEAK EXTI15_10_IRQHandler |
||
| 330 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 331 | EXTI15_10_IRQHandler |
||
| 332 | B EXTI15_10_IRQHandler |
||
| 333 | |||
| 334 | PUBWEAK RTC_Alarm_IRQHandler |
||
| 335 | SECTION .text:CODE:REORDER:NOROOT(1) |
||
| 336 | RTC_Alarm_IRQHandler |
||
| 337 | B RTC_Alarm_IRQHandler |
||
| 338 | |||
| 339 | END |
||
| 340 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |