]> git.gir.st - tmk_keyboard.git/blob - tool/mbed/mbed-sdk/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32F3/TARGET_NUCLEO_F302R8/TOOLCHAIN_ARM_MICRO/startup_stm32f302x8.s
Squashed 'tmk_core/' changes from 7967731..b9e0ea0
[tmk_keyboard.git] / tool / mbed / mbed-sdk / libraries / mbed / targets / cmsis / TARGET_STM / TARGET_STM32F3 / TARGET_NUCLEO_F302R8 / TOOLCHAIN_ARM_MICRO / startup_stm32f302x8.s
1 ;******************** (C) COPYRIGHT 2014 STMicroelectronics ********************
2 ;* File Name : startup_stm32f302x8.s
3 ; STM32F302x8 Devices vector table for MDK ARM_MICRO toolchain
4 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
5 ; Copyright (c) 2014, STMicroelectronics
6 ; All rights reserved.
7 ;
8 ; Redistribution and use in source and binary forms, with or without
9 ; modification, are permitted provided that the following conditions are met:
10 ;
11 ; 1. Redistributions of source code must retain the above copyright notice,
12 ; this list of conditions and the following disclaimer.
13 ; 2. Redistributions in binary form must reproduce the above copyright notice,
14 ; this list of conditions and the following disclaimer in the documentation
15 ; and/or other materials provided with the distribution.
16 ; 3. Neither the name of STMicroelectronics nor the names of its contributors
17 ; may be used to endorse or promote products derived from this software
18 ; without specific prior written permission.
19 ;
20 ; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 ; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 ; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 ; DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24 ; FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 ; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26 ; SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27 ; CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28 ; OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 ; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
31
32 ; Amount of memory (in bytes) allocated for Stack
33 ; Tailor this value to your application needs
34 ; <h> Stack Configuration
35 ; <o> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
36 ; </h>
37
38 Stack_Size EQU 0x00000400
39
40 AREA STACK, NOINIT, READWRITE, ALIGN=3
41 EXPORT __initial_sp
42
43 Stack_Mem SPACE Stack_Size
44 __initial_sp EQU 0x20004000 ; Top of RAM
45
46
47 ; <h> Heap Configuration
48 ; <o> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
49 ; </h>
50
51 Heap_Size EQU 0x00000400
52
53 AREA HEAP, NOINIT, READWRITE, ALIGN=3
54 EXPORT __heap_base
55 EXPORT __heap_limit
56
57 __heap_base
58 Heap_Mem SPACE Heap_Size
59 __heap_limit EQU (__initial_sp - Stack_Size)
60
61 PRESERVE8
62 THUMB
63
64
65 ; Vector Table Mapped to Address 0 at Reset
66 AREA RESET, DATA, READONLY
67 EXPORT __Vectors
68 EXPORT __Vectors_End
69 EXPORT __Vectors_Size
70
71 __Vectors DCD __initial_sp ; Top of Stack
72 DCD Reset_Handler ; Reset Handler
73 DCD NMI_Handler ; NMI Handler
74 DCD HardFault_Handler ; Hard Fault Handler
75 DCD MemManage_Handler ; MPU Fault Handler
76 DCD BusFault_Handler ; Bus Fault Handler
77 DCD UsageFault_Handler ; Usage Fault Handler
78 DCD 0 ; Reserved
79 DCD 0 ; Reserved
80 DCD 0 ; Reserved
81 DCD 0 ; Reserved
82 DCD SVC_Handler ; SVCall Handler
83 DCD DebugMon_Handler ; Debug Monitor Handler
84 DCD 0 ; Reserved
85 DCD PendSV_Handler ; PendSV Handler
86 DCD SysTick_Handler ; SysTick Handler
87
88 ; External Interrupts
89 DCD WWDG_IRQHandler ; Window WatchDog
90 DCD PVD_IRQHandler ; PVD through EXTI Line detection
91 DCD TAMP_STAMP_IRQHandler ; Tamper and TimeStamps through the EXTI line
92 DCD RTC_WKUP_IRQHandler ; RTC Wakeup through the EXTI line
93 DCD FLASH_IRQHandler ; FLASH
94 DCD RCC_IRQHandler ; RCC
95 DCD EXTI0_IRQHandler ; EXTI Line0
96 DCD EXTI1_IRQHandler ; EXTI Line1
97 DCD EXTI2_TSC_IRQHandler ; EXTI Line2 and Touch Sense controller
98 DCD EXTI3_IRQHandler ; EXTI Line3
99 DCD EXTI4_IRQHandler ; EXTI Line4
100 DCD DMA1_Channel1_IRQHandler ; DMA1 Channel 1
101 DCD DMA1_Channel2_IRQHandler ; DMA1 Channel 2
102 DCD DMA1_Channel3_IRQHandler ; DMA1 Channel 3
103 DCD DMA1_Channel4_IRQHandler ; DMA1 Channel 4
104 DCD DMA1_Channel5_IRQHandler ; DMA1 Channel 5
105 DCD DMA1_Channel6_IRQHandler ; DMA1 Channel 6
106 DCD DMA1_Channel7_IRQHandler ; DMA1 Channel 7
107 DCD ADC1_IRQHandler ; ADC1
108 DCD USB_HP_CAN_TX_IRQHandler ; USB Device High Priority or CAN TX
109 DCD USB_LP_CAN_RX0_IRQHandler ; USB Device Low Priority or CAN RX0
110 DCD CAN_RX1_IRQHandler ; CAN RX1
111 DCD CAN_SCE_IRQHandler ; CAN SCE
112 DCD EXTI9_5_IRQHandler ; External Line[9:5]s
113 DCD TIM1_BRK_TIM15_IRQHandler ; TIM1 Break and TIM15
114 DCD TIM1_UP_TIM16_IRQHandler ; TIM1 Update and TIM16
115 DCD TIM1_TRG_COM_TIM17_IRQHandler ; TIM1 Trigger and Commutation and TIM17
116 DCD TIM1_CC_IRQHandler ; TIM1 Capture Compare
117 DCD TIM2_IRQHandler ; TIM2
118 DCD 0 ; Reserved
119 DCD 0 ; Reserved
120 DCD I2C1_EV_IRQHandler ; I2C1 Event
121 DCD I2C1_ER_IRQHandler ; I2C1 Error
122 DCD I2C2_EV_IRQHandler ; I2C2 Event
123 DCD I2C2_ER_IRQHandler ; I2C2 Error
124 DCD 0 ; Reserved
125 DCD SPI2_IRQHandler ; SPI2
126 DCD USART1_IRQHandler ; USART1
127 DCD USART2_IRQHandler ; USART2
128 DCD USART3_IRQHandler ; USART3
129 DCD EXTI15_10_IRQHandler ; External Line[15:10]s
130 DCD RTC_Alarm_IRQHandler ; RTC Alarm (A and B) through EXTI Line
131 DCD USBWakeUp_IRQHandler ; USB Wakeup through EXTI line
132 DCD 0 ; Reserved
133 DCD 0 ; Reserved
134 DCD 0 ; Reserved
135 DCD 0 ; Reserved
136 DCD 0 ; Reserved
137 DCD 0 ; Reserved
138 DCD 0 ; Reserved
139 DCD 0 ; Reserved
140 DCD SPI3_IRQHandler ; SPI3
141 DCD 0 ; Reserved
142 DCD 0 ; Reserved
143 DCD TIM6_DAC_IRQHandler ; TIM6 and DAC1&2 underrun errors
144 DCD 0 ; Reserved
145 DCD 0 ; Reserved
146 DCD 0 ; Reserved
147 DCD 0 ; Reserved
148 DCD 0 ; Reserved
149 DCD 0 ; Reserved
150 DCD 0 ; Reserved
151 DCD 0 ; Reserved
152 DCD 0 ; Reserved
153 DCD COMP2_IRQHandler ; COMP2
154 DCD COMP4_6_IRQHandler ; COMP4 and COMP6
155 DCD 0 ; Reserved
156 DCD 0 ; Reserved
157 DCD 0 ; Reserved
158 DCD 0 ; Reserved
159 DCD 0 ; Reserved
160 DCD 0 ; Reserved
161 DCD I2C3_EV_IRQHandler ; I2C3 Event
162 DCD I2C3_ER_IRQHandler ; I2C3 Error
163 DCD USB_HP_IRQHandler ; USB High Priority remap
164 DCD USB_LP_IRQHandler ; USB Low Priority remap
165 DCD USBWakeUp_RMP_IRQHandler ; USB Wakeup remap through EXTI
166 DCD 0 ; Reserved
167 DCD 0 ; Reserved
168 DCD 0 ; Reserved
169 DCD 0 ; Reserved
170 DCD FPU_IRQHandler ; FPU
171
172 __Vectors_End
173
174 __Vectors_Size EQU __Vectors_End - __Vectors
175
176 AREA |.text|, CODE, READONLY
177
178 ; Reset handler
179 Reset_Handler PROC
180 EXPORT Reset_Handler [WEAK]
181 IMPORT SystemInit
182 IMPORT __main
183
184 LDR R0, =SystemInit
185 BLX R0
186 LDR R0, =__main
187 BX R0
188 ENDP
189
190 ; Dummy Exception Handlers (infinite loops which can be modified)
191
192 NMI_Handler PROC
193 EXPORT NMI_Handler [WEAK]
194 B .
195 ENDP
196 HardFault_Handler\
197 PROC
198 EXPORT HardFault_Handler [WEAK]
199 B .
200 ENDP
201 MemManage_Handler\
202 PROC
203 EXPORT MemManage_Handler [WEAK]
204 B .
205 ENDP
206 BusFault_Handler\
207 PROC
208 EXPORT BusFault_Handler [WEAK]
209 B .
210 ENDP
211 UsageFault_Handler\
212 PROC
213 EXPORT UsageFault_Handler [WEAK]
214 B .
215 ENDP
216 SVC_Handler PROC
217 EXPORT SVC_Handler [WEAK]
218 B .
219 ENDP
220 DebugMon_Handler\
221 PROC
222 EXPORT DebugMon_Handler [WEAK]
223 B .
224 ENDP
225 PendSV_Handler PROC
226 EXPORT PendSV_Handler [WEAK]
227 B .
228 ENDP
229 SysTick_Handler PROC
230 EXPORT SysTick_Handler [WEAK]
231 B .
232 ENDP
233
234 Default_Handler PROC
235
236 EXPORT WWDG_IRQHandler [WEAK]
237 EXPORT PVD_IRQHandler [WEAK]
238 EXPORT TAMP_STAMP_IRQHandler [WEAK]
239 EXPORT RTC_WKUP_IRQHandler [WEAK]
240 EXPORT FLASH_IRQHandler [WEAK]
241 EXPORT RCC_IRQHandler [WEAK]
242 EXPORT EXTI0_IRQHandler [WEAK]
243 EXPORT EXTI1_IRQHandler [WEAK]
244 EXPORT EXTI2_TSC_IRQHandler [WEAK]
245 EXPORT EXTI3_IRQHandler [WEAK]
246 EXPORT EXTI4_IRQHandler [WEAK]
247 EXPORT DMA1_Channel1_IRQHandler [WEAK]
248 EXPORT DMA1_Channel2_IRQHandler [WEAK]
249 EXPORT DMA1_Channel3_IRQHandler [WEAK]
250 EXPORT DMA1_Channel4_IRQHandler [WEAK]
251 EXPORT DMA1_Channel5_IRQHandler [WEAK]
252 EXPORT DMA1_Channel6_IRQHandler [WEAK]
253 EXPORT DMA1_Channel7_IRQHandler [WEAK]
254 EXPORT ADC1_IRQHandler [WEAK]
255 EXPORT USB_HP_CAN_TX_IRQHandler [WEAK]
256 EXPORT USB_LP_CAN_RX0_IRQHandler [WEAK]
257 EXPORT CAN_RX1_IRQHandler [WEAK]
258 EXPORT CAN_SCE_IRQHandler [WEAK]
259 EXPORT EXTI9_5_IRQHandler [WEAK]
260 EXPORT TIM1_BRK_TIM15_IRQHandler [WEAK]
261 EXPORT TIM1_UP_TIM16_IRQHandler [WEAK]
262 EXPORT TIM1_TRG_COM_TIM17_IRQHandler [WEAK]
263 EXPORT TIM1_CC_IRQHandler [WEAK]
264 EXPORT TIM2_IRQHandler [WEAK]
265 EXPORT I2C1_EV_IRQHandler [WEAK]
266 EXPORT I2C1_ER_IRQHandler [WEAK]
267 EXPORT I2C2_EV_IRQHandler [WEAK]
268 EXPORT I2C2_ER_IRQHandler [WEAK]
269 EXPORT SPI2_IRQHandler [WEAK]
270 EXPORT USART1_IRQHandler [WEAK]
271 EXPORT USART2_IRQHandler [WEAK]
272 EXPORT USART3_IRQHandler [WEAK]
273 EXPORT EXTI15_10_IRQHandler [WEAK]
274 EXPORT RTC_Alarm_IRQHandler [WEAK]
275 EXPORT USBWakeUp_IRQHandler [WEAK]
276 EXPORT SPI3_IRQHandler [WEAK]
277 EXPORT TIM6_DAC_IRQHandler [WEAK]
278 EXPORT COMP2_IRQHandler [WEAK]
279 EXPORT COMP4_6_IRQHandler [WEAK]
280 EXPORT I2C3_EV_IRQHandler [WEAK]
281 EXPORT I2C3_ER_IRQHandler [WEAK]
282 EXPORT USB_HP_IRQHandler [WEAK]
283 EXPORT USB_LP_IRQHandler [WEAK]
284 EXPORT USBWakeUp_RMP_IRQHandler [WEAK]
285 EXPORT FPU_IRQHandler [WEAK]
286
287 WWDG_IRQHandler
288 PVD_IRQHandler
289 TAMP_STAMP_IRQHandler
290 RTC_WKUP_IRQHandler
291 FLASH_IRQHandler
292 RCC_IRQHandler
293 EXTI0_IRQHandler
294 EXTI1_IRQHandler
295 EXTI2_TSC_IRQHandler
296 EXTI3_IRQHandler
297 EXTI4_IRQHandler
298 DMA1_Channel1_IRQHandler
299 DMA1_Channel2_IRQHandler
300 DMA1_Channel3_IRQHandler
301 DMA1_Channel4_IRQHandler
302 DMA1_Channel5_IRQHandler
303 DMA1_Channel6_IRQHandler
304 DMA1_Channel7_IRQHandler
305 ADC1_IRQHandler
306 USB_HP_CAN_TX_IRQHandler
307 USB_LP_CAN_RX0_IRQHandler
308 CAN_RX1_IRQHandler
309 CAN_SCE_IRQHandler
310 EXTI9_5_IRQHandler
311 TIM1_BRK_TIM15_IRQHandler
312 TIM1_UP_TIM16_IRQHandler
313 TIM1_TRG_COM_TIM17_IRQHandler
314 TIM1_CC_IRQHandler
315 TIM2_IRQHandler
316 I2C1_EV_IRQHandler
317 I2C1_ER_IRQHandler
318 I2C2_EV_IRQHandler
319 I2C2_ER_IRQHandler
320 SPI2_IRQHandler
321 USART1_IRQHandler
322 USART2_IRQHandler
323 USART3_IRQHandler
324 EXTI15_10_IRQHandler
325 RTC_Alarm_IRQHandler
326 USBWakeUp_IRQHandler
327 SPI3_IRQHandler
328 TIM6_DAC_IRQHandler
329 COMP2_IRQHandler
330 COMP4_6_IRQHandler
331 I2C3_EV_IRQHandler
332 I2C3_ER_IRQHandler
333 USB_HP_IRQHandler
334 USB_LP_IRQHandler
335 USBWakeUp_RMP_IRQHandler
336 FPU_IRQHandler
337
338 B .
339
340 ENDP
341
342 ALIGN
343 END
Imprint / Impressum