]> git.donarmstrong.com Git - qmk_firmware.git/blob - tool/mbed/mbed-sdk/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32L0/TARGET_DISCO_L053C8/TOOLCHAIN_IAR/startup_stm32l053xx.s
Squashed 'tmk_core/' changes from 7967731..b9e0ea0
[qmk_firmware.git] / tool / mbed / mbed-sdk / libraries / mbed / targets / cmsis / TARGET_STM / TARGET_STM32L0 / TARGET_DISCO_L053C8 / TOOLCHAIN_IAR / startup_stm32l053xx.s
1 ;/******************** (C) COPYRIGHT 2014 STMicroelectronics ********************
2 ;* File Name          : startup_stm32l053xx.s
3 ;* Author             : MCD Application Team
4 ;* Version            : V1.1.0
5 ;* Date               : 18-June-2014
6 ;* Description        : STM32L053xx Ultra Low Power Devices vector 
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 
11 ;*                        address.
12 ;*                      - Configure the system clock
13 ;*                      - Branches to main in the C library (which eventually
14 ;*                        calls main()).
15 ;*                      After Reset the Cortex-M0+ processor is in Thread mode,
16 ;*                      priority is Privileged, and the Stack is set to Main.
17 ;********************************************************************************
18 ;* 
19 ;* Redistribution and use in source and binary forms, with or without modification,
20 ;* are permitted provided that the following conditions are met:
21 ;*   1. Redistributions of source code must retain the above copyright notice,
22 ;*      this list of conditions and the following disclaimer.
23 ;*   2. Redistributions in binary form must reproduce the above copyright notice,
24 ;*      this list of conditions and the following disclaimer in the documentation
25 ;*      and/or other materials provided with the distribution.
26 ;*   3. Neither the name of STMicroelectronics nor the names of its contributors
27 ;*      may be used to endorse or promote products derived from this software
28 ;*      without specific prior written permission.
29 ;*
30 ;* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
31 ;* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
32 ;* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
33 ;* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
34 ;* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
35 ;* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
36 ;* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
37 ;* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
38 ;* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
39 ;* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
40 ;*
41 ;*******************************************************************************/
42 ;
43 ;
44 ; The modules in this file are included in the libraries, and may be replaced
45 ; by any user-defined modules that define the PUBLIC symbol _program_start or
46 ; a user defined start symbol.
47 ; To override the cstartup defined in the library, simply add your modified
48 ; version to the workbench project.
49 ;
50 ; The vector table is normally located at address 0.
51 ; When debugging in RAM, it can be located in RAM, aligned to at least 2^6.
52 ; The name "__vector_table" has special meaning for C-SPY:
53 ; it is where the SP start value is found, and the NVIC vector
54 ; table register (VTOR) is initialized to this address if != 0.
55 ;
56 ; Cortex-M version
57 ;
58
59         MODULE  ?cstartup
60
61         ;; Forward declaration of sections.
62         SECTION CSTACK:DATA:NOROOT(3)
63
64         SECTION .intvec:CODE:NOROOT(2)
65
66         EXTERN  __iar_program_start
67         EXTERN  SystemInit        
68         PUBLIC  __vector_table
69
70         DATA
71 __vector_table
72         DCD     sfe(CSTACK)
73         DCD     Reset_Handler             ; Reset Handler
74
75         DCD     NMI_Handler               ; NMI Handler
76         DCD     HardFault_Handler         ; Hard Fault Handler
77         DCD     0                         ; Reserved
78         DCD     0                         ; Reserved
79         DCD     0                         ; Reserved
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     RTC_IRQHandler                 ; RTC through EXTI Line
94                 DCD     FLASH_IRQHandler               ; FLASH
95                 DCD     RCC_CRS_IRQHandler             ; RCC_CRS
96                 DCD     EXTI0_1_IRQHandler             ; EXTI Line 0 and 1
97                 DCD     EXTI2_3_IRQHandler             ; EXTI Line 2 and 3
98                 DCD     EXTI4_15_IRQHandler            ; EXTI Line 4 to 15
99                 DCD     TSC_IRQHandler                 ; TSC
100                 DCD     DMA1_Channel1_IRQHandler       ; DMA1 Channel 1
101                 DCD     DMA1_Channel2_3_IRQHandler     ; DMA1 Channel 2 and Channel 3
102                 DCD     DMA1_Channel4_5_6_7_IRQHandler ; DMA1 Channel 4, Channel 5, Channel 6 and Channel 7
103                 DCD     ADC1_COMP_IRQHandler           ; ADC1, COMP1 and COMP2 
104                 DCD     LPTIM1_IRQHandler              ; LPTIM1
105                 DCD     0                              ; Reserved
106                 DCD     TIM2_IRQHandler                ; TIM2
107                 DCD     0                              ; Reserved
108                 DCD     TIM6_DAC_IRQHandler            ; TIM6 and DAC
109                 DCD     0                              ; Reserved
110                 DCD     0                              ; Reserved
111                 DCD     TIM21_IRQHandler                ; TIM21
112                 DCD     0                              ; Reserved
113                 DCD     TIM22_IRQHandler               ; TIM22
114                 DCD     I2C1_IRQHandler                ; I2C1
115                 DCD     I2C2_IRQHandler                ; I2C2
116                 DCD     SPI1_IRQHandler                ; SPI1
117                 DCD     SPI2_IRQHandler                ; SPI2
118                 DCD     USART1_IRQHandler              ; USART1
119                 DCD     USART2_IRQHandler              ; USART2
120                 DCD     RNG_LPUART1_IRQHandler         ; RNG and LPUART1
121                 DCD     LCD_IRQHandler                 ; LCD
122                 DCD     USB_IRQHandler                 ; USB
123                 
124 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
125 ;;
126 ;; Default interrupt handlers.
127 ;;
128         THUMB
129         PUBWEAK Reset_Handler
130         SECTION .text:CODE:NOROOT:REORDER(2)
131 Reset_Handler
132         LDR     R0, =SystemInit
133         BLX     R0
134         LDR     R0, =__iar_program_start
135         BX      R0
136         
137         PUBWEAK NMI_Handler
138         SECTION .text:CODE:NOROOT:REORDER(1)
139 NMI_Handler
140         B NMI_Handler
141         
142         
143         PUBWEAK HardFault_Handler
144         SECTION .text:CODE:NOROOT:REORDER(1)
145 HardFault_Handler
146         B HardFault_Handler
147        
148         
149         PUBWEAK SVC_Handler
150         SECTION .text:CODE:NOROOT:REORDER(1)
151 SVC_Handler
152         B SVC_Handler
153         
154         
155         PUBWEAK DebugMon_Handler
156         SECTION .text:CODE:NOROOT:REORDER(1)
157 DebugMon_Handler
158         B DebugMon_Handler
159         
160         
161         PUBWEAK PendSV_Handler
162         SECTION .text:CODE:NOROOT:REORDER(1)
163 PendSV_Handler
164         B PendSV_Handler
165         
166         
167         PUBWEAK SysTick_Handler
168         SECTION .text:CODE:NOROOT:REORDER(1)
169 SysTick_Handler
170         B SysTick_Handler
171         
172         
173         PUBWEAK WWDG_IRQHandler
174         SECTION .text:CODE:NOROOT:REORDER(1)
175 WWDG_IRQHandler
176         B WWDG_IRQHandler
177         
178                 
179         PUBWEAK PVD_IRQHandler
180         SECTION .text:CODE:NOROOT:REORDER(1)
181 PVD_IRQHandler
182         B PVD_IRQHandler
183         
184                 
185         PUBWEAK RTC_IRQHandler
186         SECTION .text:CODE:NOROOT:REORDER(1)
187 RTC_IRQHandler
188         B RTC_IRQHandler
189         
190                 
191         PUBWEAK FLASH_IRQHandler
192         SECTION .text:CODE:NOROOT:REORDER(1)
193 FLASH_IRQHandler
194         B FLASH_IRQHandler
195         
196                 
197         PUBWEAK RCC_CRS_IRQHandler
198         SECTION .text:CODE:NOROOT:REORDER(1)
199 RCC_CRS_IRQHandler
200         B RCC_CRS_IRQHandler
201         
202                 
203         PUBWEAK EXTI0_1_IRQHandler
204         SECTION .text:CODE:NOROOT:REORDER(1)
205 EXTI0_1_IRQHandler
206         B EXTI0_1_IRQHandler
207         
208                 
209         PUBWEAK EXTI2_3_IRQHandler
210         SECTION .text:CODE:NOROOT:REORDER(1)
211 EXTI2_3_IRQHandler
212         B EXTI2_3_IRQHandler
213         
214                 
215         PUBWEAK EXTI4_15_IRQHandler
216         SECTION .text:CODE:NOROOT:REORDER(1)
217 EXTI4_15_IRQHandler
218         B EXTI4_15_IRQHandler
219         
220                 
221         PUBWEAK TSC_IRQHandler
222         SECTION .text:CODE:NOROOT:REORDER(1)
223 TSC_IRQHandler
224         B TSC_IRQHandler
225         
226                 
227         PUBWEAK DMA1_Channel1_IRQHandler
228         SECTION .text:CODE:NOROOT:REORDER(1)
229 DMA1_Channel1_IRQHandler
230         B DMA1_Channel1_IRQHandler
231         
232                 
233         PUBWEAK DMA1_Channel2_3_IRQHandler
234         SECTION .text:CODE:NOROOT:REORDER(1)
235 DMA1_Channel2_3_IRQHandler
236         B DMA1_Channel2_3_IRQHandler
237         
238                 
239         PUBWEAK DMA1_Channel4_5_6_7_IRQHandler
240         SECTION .text:CODE:NOROOT:REORDER(1)
241 DMA1_Channel4_5_6_7_IRQHandler
242         B DMA1_Channel4_5_6_7_IRQHandler
243         
244                 
245         PUBWEAK ADC1_COMP_IRQHandler
246         SECTION .text:CODE:NOROOT:REORDER(1)
247 ADC1_COMP_IRQHandler
248         B ADC1_COMP_IRQHandler
249         
250                  
251         PUBWEAK LPTIM1_IRQHandler
252         SECTION .text:CODE:NOROOT:REORDER(1)
253 LPTIM1_IRQHandler
254         B LPTIM1_IRQHandler
255         
256                 
257         PUBWEAK TIM2_IRQHandler
258         SECTION .text:CODE:NOROOT:REORDER(1)
259 TIM2_IRQHandler
260         B TIM2_IRQHandler
261         
262                 
263         PUBWEAK TIM6_DAC_IRQHandler
264         SECTION .text:CODE:NOROOT:REORDER(1)
265 TIM6_DAC_IRQHandler
266         B TIM6_DAC_IRQHandler
267         
268         PUBWEAK TIM21_IRQHandler
269         SECTION .text:CODE:NOROOT:REORDER(1)
270 TIM21_IRQHandler
271         B TIM21_IRQHandler
272
273         PUBWEAK TIM22_IRQHandler
274         SECTION .text:CODE:NOROOT:REORDER(1)
275 TIM22_IRQHandler
276         B TIM22_IRQHandler
277         
278
279         PUBWEAK I2C1_IRQHandler
280         SECTION .text:CODE:NOROOT:REORDER(1)
281 I2C1_IRQHandler
282         B I2C1_IRQHandler
283         
284                 
285         PUBWEAK I2C2_IRQHandler
286         SECTION .text:CODE:NOROOT:REORDER(1)
287 I2C2_IRQHandler
288         B I2C2_IRQHandler
289         
290                 
291         PUBWEAK SPI1_IRQHandler
292         SECTION .text:CODE:NOROOT:REORDER(1)
293 SPI1_IRQHandler
294         B SPI1_IRQHandler
295         
296                 
297         PUBWEAK SPI2_IRQHandler
298         SECTION .text:CODE:NOROOT:REORDER(1)
299 SPI2_IRQHandler
300         B SPI2_IRQHandler
301         
302                 
303         PUBWEAK USART1_IRQHandler
304         SECTION .text:CODE:NOROOT:REORDER(1)
305 USART1_IRQHandler
306         B USART1_IRQHandler
307         
308                 
309         PUBWEAK USART2_IRQHandler
310         SECTION .text:CODE:NOROOT:REORDER(1)
311 USART2_IRQHandler
312         B USART2_IRQHandler
313         
314
315         PUBWEAK RNG_LPUART1_IRQHandler
316         SECTION .text:CODE:NOROOT:REORDER(1)
317 RNG_LPUART1_IRQHandler
318         B RNG_LPUART1_IRQHandler
319         
320         
321         PUBWEAK LCD_IRQHandler
322         SECTION .text:CODE:NOROOT:REORDER(1)
323 LCD_IRQHandler
324         B LCD_IRQHandler
325
326         PUBWEAK USB_IRQHandler
327         SECTION .text:CODE:NOROOT:REORDER(1)
328 USB_IRQHandler
329         B USB_IRQHandler
330         
331         END
332 ;************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE*****