1 ;/******************** (C) COPYRIGHT 2012 STMicroelectronics ********************
2 ;* File Name : startup_stm32f0xx.s
3 ;* Author : MCD Application Team
5 ;* Date : 27-January-2012
6 ;* Description : STM32F0xx Devices vector table for EWARM toolchain.
7 ;* This module performs:
8 ;* - Set the initial SP
9 ;* - Set the initial PC == __iar_program_start,
10 ;* - Set the vector table entries with the exceptions ISR
12 ;* After Reset the Cortex-M0 processor is in Thread mode,
13 ;* priority is Privileged, and the Stack is set to Main.
14 ;********************************************************************************
15 ;* THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
16 ;* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
17 ;* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
18 ;* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
19 ;* CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
20 ;* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
21 ;* FOR MORE INFORMATION PLEASE READ CAREFULLY THE LICENSE AGREEMENT FILE
22 ;* LOCATED IN THE ROOT DIRECTORY OF THIS FIRMWARE PACKAGE.
23 ;*******************************************************************************/
26 ; The modules in this file are included in the libraries, and may be replaced
27 ; by any user-defined modules that define the PUBLIC symbol _program_start or
28 ; a user defined start symbol.
29 ; To override the cstartup defined in the library, simply add your modified
30 ; version to the workbench project.
32 ; The vector table is normally located at address 0.
33 ; When debugging in RAM, it can be located in RAM, aligned to at least 2^6.
34 ; The name "__vector_table" has special meaning for C-SPY:
35 ; it is where the SP start value is found, and the NVIC vector
36 ; table register (VTOR) is initialized to this address if != 0.
43 ;; Forward declaration of sections.
44 SECTION CSTACK:DATA:NOROOT(3)
46 SECTION .intvec:CODE:NOROOT(2)
48 EXTERN __iar_program_start
55 DCD Reset_Handler ; Reset Handler
57 DCD NMI_Handler ; NMI Handler
58 DCD HardFault_Handler ; Hard Fault Handler
66 DCD SVC_Handler ; SVCall Handler
69 DCD PendSV_Handler ; PendSV Handler
70 DCD SysTick_Handler ; SysTick Handler
73 DCD WWDG_IRQHandler ; Window Watchdog
74 DCD PVD_IRQHandler ; PVD through EXTI Line detect
75 DCD RTC_IRQHandler ; RTC through EXTI Line
76 DCD FLASH_IRQHandler ; FLASH
77 DCD RCC_IRQHandler ; RCC
78 DCD EXTI0_1_IRQHandler ; EXTI Line 0 and 1
79 DCD EXTI2_3_IRQHandler ; EXTI Line 2 and 3
80 DCD EXTI4_15_IRQHandler ; EXTI Line 4 to 15
81 DCD TS_IRQHandler ; TS
82 DCD DMA1_Channel1_IRQHandler ; DMA1 Channel 1
83 DCD DMA1_Channel2_3_IRQHandler ; DMA1 Channel 2 and Channel 3
84 DCD DMA1_Channel4_5_IRQHandler ; DMA1 Channel 4 and Channel 5
85 DCD ADC1_COMP_IRQHandler ; ADC1, COMP1 and COMP2
86 DCD TIM1_BRK_UP_TRG_COM_IRQHandler ; TIM1 Break, Update, Trigger and Commutation
87 DCD TIM1_CC_IRQHandler ; TIM1 Capture Compare
88 DCD TIM2_IRQHandler ; TIM2
89 DCD TIM3_IRQHandler ; TIM3
90 DCD TIM6_DAC_IRQHandler ; TIM6 and DAC
92 DCD TIM14_IRQHandler ; TIM14
93 DCD TIM15_IRQHandler ; TIM15
94 DCD TIM16_IRQHandler ; TIM16
95 DCD TIM17_IRQHandler ; TIM17
96 DCD I2C1_IRQHandler ; I2C1
97 DCD I2C2_IRQHandler ; I2C2
98 DCD SPI1_IRQHandler ; SPI1
99 DCD SPI2_IRQHandler ; SPI2
100 DCD USART1_IRQHandler ; USART1
101 DCD USART2_IRQHandler ; USART2
103 DCD CEC_IRQHandler ; CEC
106 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
108 ;; Default interrupt handlers.
112 EXTERN __ICFEDIT_region_RAM_start__
113 EXTERN __ICFEDIT_region_RAM_end__
114 SECTION `.text`:CODE:NOROOT(2)
117 DC32 __ICFEDIT_region_RAM_start__
119 DC32 __ICFEDIT_region_RAM_end__
124 SECTION .text:CODE:REORDER(2)
127 LDR R0,=??DataTable22
129 LDR R1,=??DataTable22_1
140 LDR R0, =__iar_program_start
145 SECTION .text:CODE:NOROOT:REORDER(1)
150 PUBWEAK HardFault_Handler
151 SECTION .text:CODE:NOROOT:REORDER(1)
157 SECTION .text:CODE:NOROOT:REORDER(1)
162 PUBWEAK PendSV_Handler
163 SECTION .text:CODE:NOROOT:REORDER(1)
168 PUBWEAK SysTick_Handler
169 SECTION .text:CODE:NOROOT:REORDER(1)
174 PUBWEAK WWDG_IRQHandler
175 SECTION .text:CODE:NOROOT:REORDER(1)
180 PUBWEAK PVD_IRQHandler
181 SECTION .text:CODE:NOROOT:REORDER(1)
186 PUBWEAK RTC_IRQHandler
187 SECTION .text:CODE:NOROOT:REORDER(1)
192 PUBWEAK FLASH_IRQHandler
193 SECTION .text:CODE:NOROOT:REORDER(1)
198 PUBWEAK RCC_IRQHandler
199 SECTION .text:CODE:NOROOT:REORDER(1)
204 PUBWEAK EXTI0_1_IRQHandler
205 SECTION .text:CODE:NOROOT:REORDER(1)
210 PUBWEAK EXTI2_3_IRQHandler
211 SECTION .text:CODE:NOROOT:REORDER(1)
216 PUBWEAK EXTI4_15_IRQHandler
217 SECTION .text:CODE:NOROOT:REORDER(1)
219 B EXTI4_15_IRQHandler
222 PUBWEAK TS_IRQHandler
223 SECTION .text:CODE:NOROOT:REORDER(1)
228 PUBWEAK DMA1_Channel1_IRQHandler
229 SECTION .text:CODE:NOROOT:REORDER(1)
230 DMA1_Channel1_IRQHandler
231 B DMA1_Channel1_IRQHandler
234 PUBWEAK DMA1_Channel2_3_IRQHandler
235 SECTION .text:CODE:NOROOT:REORDER(1)
236 DMA1_Channel2_3_IRQHandler
237 B DMA1_Channel2_3_IRQHandler
240 PUBWEAK DMA1_Channel4_5_IRQHandler
241 SECTION .text:CODE:NOROOT:REORDER(1)
242 DMA1_Channel4_5_IRQHandler
243 B DMA1_Channel4_5_IRQHandler
246 PUBWEAK ADC1_COMP_IRQHandler
247 SECTION .text:CODE:NOROOT:REORDER(1)
249 B ADC1_COMP_IRQHandler
252 PUBWEAK TIM1_BRK_UP_TRG_COM_IRQHandler
253 SECTION .text:CODE:NOROOT:REORDER(1)
254 TIM1_BRK_UP_TRG_COM_IRQHandler
255 B TIM1_BRK_UP_TRG_COM_IRQHandler
258 PUBWEAK TIM1_CC_IRQHandler
259 SECTION .text:CODE:NOROOT:REORDER(1)
264 PUBWEAK TIM2_IRQHandler
265 SECTION .text:CODE:NOROOT:REORDER(1)
270 PUBWEAK TIM3_IRQHandler
271 SECTION .text:CODE:NOROOT:REORDER(1)
276 PUBWEAK TIM6_DAC_IRQHandler
277 SECTION .text:CODE:NOROOT:REORDER(1)
279 B TIM6_DAC_IRQHandler
282 PUBWEAK TIM14_IRQHandler
283 SECTION .text:CODE:NOROOT:REORDER(1)
288 PUBWEAK TIM15_IRQHandler
289 SECTION .text:CODE:NOROOT:REORDER(1)
294 PUBWEAK TIM16_IRQHandler
295 SECTION .text:CODE:NOROOT:REORDER(1)
300 PUBWEAK TIM17_IRQHandler
301 SECTION .text:CODE:NOROOT:REORDER(1)
306 PUBWEAK I2C1_IRQHandler
307 SECTION .text:CODE:NOROOT:REORDER(1)
312 PUBWEAK I2C2_IRQHandler
313 SECTION .text:CODE:NOROOT:REORDER(1)
318 PUBWEAK SPI1_IRQHandler
319 SECTION .text:CODE:NOROOT:REORDER(1)
324 PUBWEAK SPI2_IRQHandler
325 SECTION .text:CODE:NOROOT:REORDER(1)
330 PUBWEAK USART1_IRQHandler
331 SECTION .text:CODE:NOROOT:REORDER(1)
336 PUBWEAK USART2_IRQHandler
337 SECTION .text:CODE:NOROOT:REORDER(1)
342 PUBWEAK CEC_IRQHandler
343 SECTION .text:CODE:NOROOT:REORDER(1)
348 /******************* (C) COPYRIGHT 2012 STMicroelectronics *****END OF FILE****/