comparison Common/Drivers/STM32F4xx/Source/Templates/arm/startup_stm32f446xx.s @ 160:e3ca52b8e7fa

Merge with FlipDisplay
author heinrichsweikamp
date Thu, 07 Mar 2019 15:06:43 +0100
parents c78bcbd5deda
children
comparison
equal deleted inserted replaced
80:cc2bb7bb8456 160:e3ca52b8e7fa
1 ;******************** (C) COPYRIGHT 2017 STMicroelectronics ********************
2 ;* File Name : startup_stm32f446xx.s
3 ;* Author : MCD Application Team
4 ;* Description : STM32F446x devices vector table for MDK-ARM toolchain.
5 ;* This module performs:
6 ;* - Set the initial SP
7 ;* - Set the initial PC == Reset_Handler
8 ;* - Set the vector table entries with the exceptions ISR address
9 ;* After Reset the CortexM4 processor is in Thread mode,
10 ;* priority is Privileged, and the Stack is set to Main.
11 ;* <<< Use Configuration Wizard in Context Menu >>>
12 ;*******************************************************************************
13 ;
14 ;* Redistribution and use in source and binary forms, with or without modification,
15 ;* are permitted provided that the following conditions are met:
16 ;* 1. Redistributions of source code must retain the above copyright notice,
17 ;* this list of conditions and the following disclaimer.
18 ;* 2. Redistributions in binary form must reproduce the above copyright notice,
19 ;* this list of conditions and the following disclaimer in the documentation
20 ;* and/or other materials provided with the distribution.
21 ;* 3. Neither the name of STMicroelectronics nor the names of its contributors
22 ;* may be used to endorse or promote products derived from this software
23 ;* without specific prior written permission.
24 ;*
25 ;* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
26 ;* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27 ;* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
28 ;* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
29 ;* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
30 ;* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
31 ;* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
32 ;* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
33 ;* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
34 ;* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35 ;
36 ;*******************************************************************************
37
38 ; Amount of memory (in bytes) allocated for Stack
39 ; Tailor this value to your application needs
40 ; <h> Stack Configuration
41 ; <o> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
42 ; </h>
43
44 Stack_Size EQU 0x00000400
45
46 AREA STACK, NOINIT, READWRITE, ALIGN=3
47 Stack_Mem SPACE Stack_Size
48 __initial_sp
49
50
51 ; <h> Heap Configuration
52 ; <o> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
53 ; </h>
54
55 Heap_Size EQU 0x00000200
56
57 AREA HEAP, NOINIT, READWRITE, ALIGN=3
58 __heap_base
59 Heap_Mem SPACE Heap_Size
60 __heap_limit
61
62 PRESERVE8
63 THUMB
64
65
66 ; Vector Table Mapped to Address 0 at Reset
67 AREA RESET, DATA, READONLY
68 EXPORT __Vectors
69 EXPORT __Vectors_End
70 EXPORT __Vectors_Size
71
72 __Vectors DCD __initial_sp ; Top of Stack
73 DCD Reset_Handler ; Reset Handler
74 DCD NMI_Handler ; NMI Handler
75 DCD HardFault_Handler ; Hard Fault Handler
76 DCD MemManage_Handler ; MPU Fault Handler
77 DCD BusFault_Handler ; Bus Fault Handler
78 DCD UsageFault_Handler ; Usage Fault Handler
79 DCD 0 ; Reserved
80 DCD 0 ; Reserved
81 DCD 0 ; Reserved
82 DCD 0 ; Reserved
83 DCD SVC_Handler ; SVCall Handler
84 DCD DebugMon_Handler ; Debug Monitor Handler
85 DCD 0 ; Reserved
86 DCD PendSV_Handler ; PendSV Handler
87 DCD SysTick_Handler ; SysTick Handler
88
89 ; External Interrupts
90 DCD WWDG_IRQHandler ; Window WatchDog
91 DCD PVD_IRQHandler ; PVD through EXTI Line detection
92 DCD TAMP_STAMP_IRQHandler ; Tamper and TimeStamps through the EXTI line
93 DCD RTC_WKUP_IRQHandler ; RTC Wakeup through the EXTI line
94 DCD FLASH_IRQHandler ; FLASH
95 DCD RCC_IRQHandler ; RCC
96 DCD EXTI0_IRQHandler ; EXTI Line0
97 DCD EXTI1_IRQHandler ; EXTI Line1
98 DCD EXTI2_IRQHandler ; EXTI Line2
99 DCD EXTI3_IRQHandler ; EXTI Line3
100 DCD EXTI4_IRQHandler ; EXTI Line4
101 DCD DMA1_Stream0_IRQHandler ; DMA1 Stream 0
102 DCD DMA1_Stream1_IRQHandler ; DMA1 Stream 1
103 DCD DMA1_Stream2_IRQHandler ; DMA1 Stream 2
104 DCD DMA1_Stream3_IRQHandler ; DMA1 Stream 3
105 DCD DMA1_Stream4_IRQHandler ; DMA1 Stream 4
106 DCD DMA1_Stream5_IRQHandler ; DMA1 Stream 5
107 DCD DMA1_Stream6_IRQHandler ; DMA1 Stream 6
108 DCD ADC_IRQHandler ; ADC1, ADC2 and ADC3s
109 DCD CAN1_TX_IRQHandler ; CAN1 TX
110 DCD CAN1_RX0_IRQHandler ; CAN1 RX0
111 DCD CAN1_RX1_IRQHandler ; CAN1 RX1
112 DCD CAN1_SCE_IRQHandler ; CAN1 SCE
113 DCD EXTI9_5_IRQHandler ; External Line[9:5]s
114 DCD TIM1_BRK_TIM9_IRQHandler ; TIM1 Break and TIM9
115 DCD TIM1_UP_TIM10_IRQHandler ; TIM1 Update and TIM10
116 DCD TIM1_TRG_COM_TIM11_IRQHandler ; TIM1 Trigger and Commutation and TIM11
117 DCD TIM1_CC_IRQHandler ; TIM1 Capture Compare
118 DCD TIM2_IRQHandler ; TIM2
119 DCD TIM3_IRQHandler ; TIM3
120 DCD TIM4_IRQHandler ; TIM4
121 DCD I2C1_EV_IRQHandler ; I2C1 Event
122 DCD I2C1_ER_IRQHandler ; I2C1 Error
123 DCD I2C2_EV_IRQHandler ; I2C2 Event
124 DCD I2C2_ER_IRQHandler ; I2C2 Error
125 DCD SPI1_IRQHandler ; SPI1
126 DCD SPI2_IRQHandler ; SPI2
127 DCD USART1_IRQHandler ; USART1
128 DCD USART2_IRQHandler ; USART2
129 DCD USART3_IRQHandler ; USART3
130 DCD EXTI15_10_IRQHandler ; External Line[15:10]s
131 DCD RTC_Alarm_IRQHandler ; RTC Alarm (A and B) through EXTI Line
132 DCD OTG_FS_WKUP_IRQHandler ; USB OTG FS Wakeup through EXTI line
133 DCD TIM8_BRK_TIM12_IRQHandler ; TIM8 Break and TIM12
134 DCD TIM8_UP_TIM13_IRQHandler ; TIM8 Update and TIM13
135 DCD TIM8_TRG_COM_TIM14_IRQHandler ; TIM8 Trigger and Commutation and TIM14
136 DCD TIM8_CC_IRQHandler ; TIM8 Capture Compare
137 DCD DMA1_Stream7_IRQHandler ; DMA1 Stream7
138 DCD FMC_IRQHandler ; FMC
139 DCD SDIO_IRQHandler ; SDIO
140 DCD TIM5_IRQHandler ; TIM5
141 DCD SPI3_IRQHandler ; SPI3
142 DCD UART4_IRQHandler ; UART4
143 DCD UART5_IRQHandler ; UART5
144 DCD TIM6_DAC_IRQHandler ; TIM6 and DAC1&2 underrun errors
145 DCD TIM7_IRQHandler ; TIM7
146 DCD DMA2_Stream0_IRQHandler ; DMA2 Stream 0
147 DCD DMA2_Stream1_IRQHandler ; DMA2 Stream 1
148 DCD DMA2_Stream2_IRQHandler ; DMA2 Stream 2
149 DCD DMA2_Stream3_IRQHandler ; DMA2 Stream 3
150 DCD DMA2_Stream4_IRQHandler ; DMA2 Stream 4
151 DCD 0 ; Reserved
152 DCD 0 ; Reserved
153 DCD CAN2_TX_IRQHandler ; CAN2 TX
154 DCD CAN2_RX0_IRQHandler ; CAN2 RX0
155 DCD CAN2_RX1_IRQHandler ; CAN2 RX1
156 DCD CAN2_SCE_IRQHandler ; CAN2 SCE
157 DCD OTG_FS_IRQHandler ; USB OTG FS
158 DCD DMA2_Stream5_IRQHandler ; DMA2 Stream 5
159 DCD DMA2_Stream6_IRQHandler ; DMA2 Stream 6
160 DCD DMA2_Stream7_IRQHandler ; DMA2 Stream 7
161 DCD USART6_IRQHandler ; USART6
162 DCD I2C3_EV_IRQHandler ; I2C3 event
163 DCD I2C3_ER_IRQHandler ; I2C3 error
164 DCD OTG_HS_EP1_OUT_IRQHandler ; USB OTG HS End Point 1 Out
165 DCD OTG_HS_EP1_IN_IRQHandler ; USB OTG HS End Point 1 In
166 DCD OTG_HS_WKUP_IRQHandler ; USB OTG HS Wakeup through EXTI
167 DCD OTG_HS_IRQHandler ; USB OTG HS
168 DCD DCMI_IRQHandler ; DCMI
169 DCD 0 ; Reserved
170 DCD 0 ; Reserved
171 DCD FPU_IRQHandler ; FPU
172 DCD 0 ; Reserved
173 DCD 0 ; Reserved
174 DCD SPI4_IRQHandler ; SPI4
175 DCD 0 ; Reserved
176 DCD 0 ; Reserved
177 DCD SAI1_IRQHandler ; SAI1
178 DCD 0 ; Reserved
179 DCD 0 ; Reserved
180 DCD 0 ; Reserved
181 DCD SAI2_IRQHandler ; SAI2
182 DCD QUADSPI_IRQHandler ; QuadSPI
183 DCD CEC_IRQHandler ; CEC
184 DCD SPDIF_RX_IRQHandler ; SPDIF RX
185 DCD I2C4_Event_IRQHandler ; I2C 4 Event
186 DCD I2C4_Error_IRQHandler ; I2C 4 Error
187 __Vectors_End
188
189 __Vectors_Size EQU __Vectors_End - __Vectors
190
191 AREA |.text|, CODE, READONLY
192
193 ; Reset handler
194 Reset_Handler PROC
195 EXPORT Reset_Handler [WEAK]
196 IMPORT SystemInit
197 IMPORT __main
198
199 LDR R0, =SystemInit
200 BLX R0
201 LDR R0, =__main
202 BX R0
203 ENDP
204
205 ; Dummy Exception Handlers (infinite loops which can be modified)
206
207 NMI_Handler PROC
208 EXPORT NMI_Handler [WEAK]
209 B .
210 ENDP
211 HardFault_Handler\
212 PROC
213 EXPORT HardFault_Handler [WEAK]
214 B .
215 ENDP
216 MemManage_Handler\
217 PROC
218 EXPORT MemManage_Handler [WEAK]
219 B .
220 ENDP
221 BusFault_Handler\
222 PROC
223 EXPORT BusFault_Handler [WEAK]
224 B .
225 ENDP
226 UsageFault_Handler\
227 PROC
228 EXPORT UsageFault_Handler [WEAK]
229 B .
230 ENDP
231 SVC_Handler PROC
232 EXPORT SVC_Handler [WEAK]
233 B .
234 ENDP
235 DebugMon_Handler\
236 PROC
237 EXPORT DebugMon_Handler [WEAK]
238 B .
239 ENDP
240 PendSV_Handler PROC
241 EXPORT PendSV_Handler [WEAK]
242 B .
243 ENDP
244 SysTick_Handler PROC
245 EXPORT SysTick_Handler [WEAK]
246 B .
247 ENDP
248
249 Default_Handler PROC
250
251 EXPORT WWDG_IRQHandler [WEAK]
252 EXPORT PVD_IRQHandler [WEAK]
253 EXPORT TAMP_STAMP_IRQHandler [WEAK]
254 EXPORT RTC_WKUP_IRQHandler [WEAK]
255 EXPORT FLASH_IRQHandler [WEAK]
256 EXPORT RCC_IRQHandler [WEAK]
257 EXPORT EXTI0_IRQHandler [WEAK]
258 EXPORT EXTI1_IRQHandler [WEAK]
259 EXPORT EXTI2_IRQHandler [WEAK]
260 EXPORT EXTI3_IRQHandler [WEAK]
261 EXPORT EXTI4_IRQHandler [WEAK]
262 EXPORT DMA1_Stream0_IRQHandler [WEAK]
263 EXPORT DMA1_Stream1_IRQHandler [WEAK]
264 EXPORT DMA1_Stream2_IRQHandler [WEAK]
265 EXPORT DMA1_Stream3_IRQHandler [WEAK]
266 EXPORT DMA1_Stream4_IRQHandler [WEAK]
267 EXPORT DMA1_Stream5_IRQHandler [WEAK]
268 EXPORT DMA1_Stream6_IRQHandler [WEAK]
269 EXPORT ADC_IRQHandler [WEAK]
270 EXPORT CAN1_TX_IRQHandler [WEAK]
271 EXPORT CAN1_RX0_IRQHandler [WEAK]
272 EXPORT CAN1_RX1_IRQHandler [WEAK]
273 EXPORT CAN1_SCE_IRQHandler [WEAK]
274 EXPORT EXTI9_5_IRQHandler [WEAK]
275 EXPORT TIM1_BRK_TIM9_IRQHandler [WEAK]
276 EXPORT TIM1_UP_TIM10_IRQHandler [WEAK]
277 EXPORT TIM1_TRG_COM_TIM11_IRQHandler [WEAK]
278 EXPORT TIM1_CC_IRQHandler [WEAK]
279 EXPORT TIM2_IRQHandler [WEAK]
280 EXPORT TIM3_IRQHandler [WEAK]
281 EXPORT TIM4_IRQHandler [WEAK]
282 EXPORT I2C1_EV_IRQHandler [WEAK]
283 EXPORT I2C1_ER_IRQHandler [WEAK]
284 EXPORT I2C2_EV_IRQHandler [WEAK]
285 EXPORT I2C2_ER_IRQHandler [WEAK]
286 EXPORT SPI1_IRQHandler [WEAK]
287 EXPORT SPI2_IRQHandler [WEAK]
288 EXPORT USART1_IRQHandler [WEAK]
289 EXPORT USART2_IRQHandler [WEAK]
290 EXPORT USART3_IRQHandler [WEAK]
291 EXPORT EXTI15_10_IRQHandler [WEAK]
292 EXPORT RTC_Alarm_IRQHandler [WEAK]
293 EXPORT OTG_FS_WKUP_IRQHandler [WEAK]
294 EXPORT TIM8_BRK_TIM12_IRQHandler [WEAK]
295 EXPORT TIM8_UP_TIM13_IRQHandler [WEAK]
296 EXPORT TIM8_TRG_COM_TIM14_IRQHandler [WEAK]
297 EXPORT TIM8_CC_IRQHandler [WEAK]
298 EXPORT DMA1_Stream7_IRQHandler [WEAK]
299 EXPORT FMC_IRQHandler [WEAK]
300 EXPORT SDIO_IRQHandler [WEAK]
301 EXPORT TIM5_IRQHandler [WEAK]
302 EXPORT SPI3_IRQHandler [WEAK]
303 EXPORT UART4_IRQHandler [WEAK]
304 EXPORT UART5_IRQHandler [WEAK]
305 EXPORT TIM6_DAC_IRQHandler [WEAK]
306 EXPORT TIM7_IRQHandler [WEAK]
307 EXPORT DMA2_Stream0_IRQHandler [WEAK]
308 EXPORT DMA2_Stream1_IRQHandler [WEAK]
309 EXPORT DMA2_Stream2_IRQHandler [WEAK]
310 EXPORT DMA2_Stream3_IRQHandler [WEAK]
311 EXPORT DMA2_Stream4_IRQHandler [WEAK]
312 EXPORT CAN2_TX_IRQHandler [WEAK]
313 EXPORT CAN2_RX0_IRQHandler [WEAK]
314 EXPORT CAN2_RX1_IRQHandler [WEAK]
315 EXPORT CAN2_SCE_IRQHandler [WEAK]
316 EXPORT OTG_FS_IRQHandler [WEAK]
317 EXPORT DMA2_Stream5_IRQHandler [WEAK]
318 EXPORT DMA2_Stream6_IRQHandler [WEAK]
319 EXPORT DMA2_Stream7_IRQHandler [WEAK]
320 EXPORT USART6_IRQHandler [WEAK]
321 EXPORT I2C3_EV_IRQHandler [WEAK]
322 EXPORT I2C3_ER_IRQHandler [WEAK]
323 EXPORT OTG_HS_EP1_OUT_IRQHandler [WEAK]
324 EXPORT OTG_HS_EP1_IN_IRQHandler [WEAK]
325 EXPORT OTG_HS_WKUP_IRQHandler [WEAK]
326 EXPORT OTG_HS_IRQHandler [WEAK]
327 EXPORT DCMI_IRQHandler [WEAK]
328 EXPORT FPU_IRQHandler [WEAK]
329 EXPORT SPI4_IRQHandler [WEAK]
330 EXPORT SAI1_IRQHandler [WEAK]
331 EXPORT SPI4_IRQHandler [WEAK]
332 EXPORT SAI1_IRQHandler [WEAK]
333 EXPORT SAI2_IRQHandler [WEAK]
334 EXPORT QUADSPI_IRQHandler [WEAK]
335 EXPORT CEC_IRQHandler [WEAK]
336 EXPORT SPDIF_RX_IRQHandler [WEAK]
337 EXPORT I2C4_Event_IRQHandler [WEAK]
338 EXPORT I2C4_Error_IRQHandler [WEAK]
339
340 WWDG_IRQHandler
341 PVD_IRQHandler
342 TAMP_STAMP_IRQHandler
343 RTC_WKUP_IRQHandler
344 FLASH_IRQHandler
345 RCC_IRQHandler
346 EXTI0_IRQHandler
347 EXTI1_IRQHandler
348 EXTI2_IRQHandler
349 EXTI3_IRQHandler
350 EXTI4_IRQHandler
351 DMA1_Stream0_IRQHandler
352 DMA1_Stream1_IRQHandler
353 DMA1_Stream2_IRQHandler
354 DMA1_Stream3_IRQHandler
355 DMA1_Stream4_IRQHandler
356 DMA1_Stream5_IRQHandler
357 DMA1_Stream6_IRQHandler
358 ADC_IRQHandler
359 CAN1_TX_IRQHandler
360 CAN1_RX0_IRQHandler
361 CAN1_RX1_IRQHandler
362 CAN1_SCE_IRQHandler
363 EXTI9_5_IRQHandler
364 TIM1_BRK_TIM9_IRQHandler
365 TIM1_UP_TIM10_IRQHandler
366 TIM1_TRG_COM_TIM11_IRQHandler
367 TIM1_CC_IRQHandler
368 TIM2_IRQHandler
369 TIM3_IRQHandler
370 TIM4_IRQHandler
371 I2C1_EV_IRQHandler
372 I2C1_ER_IRQHandler
373 I2C2_EV_IRQHandler
374 I2C2_ER_IRQHandler
375 SPI1_IRQHandler
376 SPI2_IRQHandler
377 USART1_IRQHandler
378 USART2_IRQHandler
379 USART3_IRQHandler
380 EXTI15_10_IRQHandler
381 RTC_Alarm_IRQHandler
382 OTG_FS_WKUP_IRQHandler
383 TIM8_BRK_TIM12_IRQHandler
384 TIM8_UP_TIM13_IRQHandler
385 TIM8_TRG_COM_TIM14_IRQHandler
386 TIM8_CC_IRQHandler
387 DMA1_Stream7_IRQHandler
388 FMC_IRQHandler
389 SDIO_IRQHandler
390 TIM5_IRQHandler
391 SPI3_IRQHandler
392 UART4_IRQHandler
393 UART5_IRQHandler
394 TIM6_DAC_IRQHandler
395 TIM7_IRQHandler
396 DMA2_Stream0_IRQHandler
397 DMA2_Stream1_IRQHandler
398 DMA2_Stream2_IRQHandler
399 DMA2_Stream3_IRQHandler
400 DMA2_Stream4_IRQHandler
401 CAN2_TX_IRQHandler
402 CAN2_RX0_IRQHandler
403 CAN2_RX1_IRQHandler
404 CAN2_SCE_IRQHandler
405 OTG_FS_IRQHandler
406 DMA2_Stream5_IRQHandler
407 DMA2_Stream6_IRQHandler
408 DMA2_Stream7_IRQHandler
409 USART6_IRQHandler
410 I2C3_EV_IRQHandler
411 I2C3_ER_IRQHandler
412 OTG_HS_EP1_OUT_IRQHandler
413 OTG_HS_EP1_IN_IRQHandler
414 OTG_HS_WKUP_IRQHandler
415 OTG_HS_IRQHandler
416 DCMI_IRQHandler
417 FPU_IRQHandler
418 SPI4_IRQHandler
419 SAI1_IRQHandler
420 SAI2_IRQHandler
421 QUADSPI_IRQHandler
422 CEC_IRQHandler
423 SPDIF_RX_IRQHandler
424 I2C4_Event_IRQHandler
425 I2C4_Error_IRQHandler
426 B .
427
428 ENDP
429
430 ALIGN
431
432 ;*******************************************************************************
433 ; User Stack and Heap initialization
434 ;*******************************************************************************
435 IF :DEF:__MICROLIB
436
437 EXPORT __initial_sp
438 EXPORT __heap_base
439 EXPORT __heap_limit
440
441 ELSE
442
443 IMPORT __use_two_region_memory
444 EXPORT __user_initial_stackheap
445
446 __user_initial_stackheap
447
448 LDR R0, = Heap_Mem
449 LDR R1, =(Stack_Mem + Stack_Size)
450 LDR R2, = (Heap_Mem + Heap_Size)
451 LDR R3, = Stack_Mem
452 BX LR
453
454 ALIGN
455
456 ENDIF
457
458 END
459
460 ;************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE*****