1/* ------------------------------------------------------------------------- */
2/*  @file:    startup_MK28FA15.s                                             */
3/*  @purpose: CMSIS Cortex-M4 Core Device Startup File                       */
4/*            MK28FA15                                                       */
5/*  @version: 1.3                                                            */
6/*  @date:    2018-1-9                                                       */
7/*  @build:   b190918                                                        */
8/* ------------------------------------------------------------------------- */
9/*                                                                           */
10/* Copyright 1997-2016 Freescale Semiconductor, Inc.                         */
11/* Copyright 2016-2019 NXP                                                   */
12/* All rights reserved.                                                      */
13/*                                                                           */
14/* SPDX-License-Identifier: BSD-3-Clause                                     */
15/*****************************************************************************/
16/* Version: GCC for ARM Embedded Processors                                  */
17/*****************************************************************************/
18    .syntax unified
19    .arch armv7-m
20
21    .section .isr_vector, "a"
22    .align 2
23    .globl __isr_vector
24__isr_vector:
25    .long   __StackTop                                      /* Top of Stack */
26    .long   Reset_Handler                                   /* Reset Handler */
27    .long   NMI_Handler                                     /* NMI Handler*/
28    .long   HardFault_Handler                               /* Hard Fault Handler*/
29    .long   MemManage_Handler                               /* MPU Fault Handler*/
30    .long   BusFault_Handler                                /* Bus Fault Handler*/
31    .long   UsageFault_Handler                              /* Usage Fault Handler*/
32    .long   0                                               /* Reserved*/
33    .long   0                                               /* Reserved*/
34    .long   0                                               /* Reserved*/
35    .long   0                                               /* Reserved*/
36    .long   SVC_Handler                                     /* SVCall Handler*/
37    .long   DebugMon_Handler                                /* Debug Monitor Handler*/
38    .long   0                                               /* Reserved*/
39    .long   PendSV_Handler                                  /* PendSV Handler*/
40    .long   SysTick_Handler                                 /* SysTick Handler*/
41
42                                                            /* External Interrupts*/
43    .long   DMA0_DMA16_IRQHandler                           /* DMA channel 0,16 transfer complete*/
44    .long   DMA1_DMA17_IRQHandler                           /* DMA channel 1,17 transfer complete*/
45    .long   DMA2_DMA18_IRQHandler                           /* DMA channel 2,18 transfer complete*/
46    .long   DMA3_DMA19_IRQHandler                           /* DMA channel 3,19 transfer complete*/
47    .long   DMA4_DMA20_IRQHandler                           /* DMA channel 4,20 transfer complete*/
48    .long   DMA5_DMA21_IRQHandler                           /* DMA channel 5,21 transfer complete*/
49    .long   DMA6_DMA22_IRQHandler                           /* DMA channel 6,22 transfer complete*/
50    .long   DMA7_DMA23_IRQHandler                           /* DMA channel 7,23 transfer complete*/
51    .long   DMA8_DMA24_IRQHandler                           /* DMA channel 8,24 transfer complete*/
52    .long   DMA9_DMA25_IRQHandler                           /* DMA channel 9,25 transfer complete*/
53    .long   DMA10_DMA26_IRQHandler                          /* DMA channel 10,26 transfer complete*/
54    .long   DMA11_DMA27_IRQHandler                          /* DMA channel 11,27 transfer complete*/
55    .long   DMA12_DMA28_IRQHandler                          /* DMA channel 12,28 transfer complete*/
56    .long   DMA13_DMA29_IRQHandler                          /* DMA channel 13,29 transfer complete*/
57    .long   DMA14_DMA30_IRQHandler                          /* DMA channel 14,30 transfer complete*/
58    .long   DMA15_DMA31_IRQHandler                          /* DMA channel 15,31 transfer complete*/
59    .long   DMA_Error_IRQHandler                            /* DMA channel 0 - 31 error*/
60    .long   MCM_IRQHandler                                  /* MCM normal interrupt*/
61    .long   FTFE_IRQHandler                                 /* FTFE command complete*/
62    .long   Read_Collision_IRQHandler                       /* FTFE read collision*/
63    .long   LVD_LVW_IRQHandler                              /* PMC controller low-voltage detect, low-voltage warning*/
64    .long   LLWU_IRQHandler                                 /* Low leakage wakeup unit*/
65    .long   WDOG_EWM_IRQHandler                             /* Single interrupt vector for  WDOG and EWM*/
66    .long   TRNG0_IRQHandler                                /* True randon number generator*/
67    .long   I2C0_IRQHandler                                 /* Inter-integrated circuit 0*/
68    .long   I2C1_IRQHandler                                 /* Inter-integrated circuit 1*/
69    .long   SPI0_IRQHandler                                 /* Serial peripheral Interface 0*/
70    .long   SPI1_IRQHandler                                 /* Serial peripheral Interface 1*/
71    .long   I2S0_Tx_IRQHandler                              /* Integrated interchip sound 0 transmit interrupt*/
72    .long   I2S0_Rx_IRQHandler                              /* Integrated interchip sound 0 receive interrupt*/
73    .long   LPUART0_IRQHandler                              /* LPUART0 receive/transmit/error interrupt*/
74    .long   LPUART1_IRQHandler                              /* LPUART1 receive/transmit/error interrupt*/
75    .long   LPUART2_IRQHandler                              /* LPUART2 receive/transmit/error interrupt*/
76    .long   LPUART3_IRQHandler                              /* LPUART3 receive/transmit/error interrupt*/
77    .long   LPUART4_IRQHandler                              /* LPUART4 receive/transmit/error interrupt*/
78    .long   Reserved51_IRQHandler                           /* Reserved interrupt*/
79    .long   Reserved52_IRQHandler                           /* Reserved interrupt*/
80    .long   Reserved53_IRQHandler                           /* Reserved interrupt*/
81    .long   Reserved54_IRQHandler                           /* Reserved interrupt*/
82    .long   ADC0_IRQHandler                                 /* Analog-to-digital converter 0*/
83    .long   CMP0_IRQHandler                                 /* Comparator 0*/
84    .long   CMP1_IRQHandler                                 /* Comparator 1*/
85    .long   FTM0_IRQHandler                                 /* FlexTimer module 0 fault, overflow and channels interrupt*/
86    .long   FTM1_IRQHandler                                 /* FlexTimer module 1 fault, overflow and channels interrupt*/
87    .long   FTM2_IRQHandler                                 /* FlexTimer module 2 fault, overflow and channels interrupt*/
88    .long   CMT_IRQHandler                                  /* Carrier modulator transmitter*/
89    .long   RTC_IRQHandler                                  /* Real time clock*/
90    .long   RTC_Seconds_IRQHandler                          /* Real time clock seconds*/
91    .long   PIT0CH0_IRQHandler                              /* Periodic interrupt timer 0 channel 0*/
92    .long   PIT0CH1_IRQHandler                              /* Periodic interrupt timer 0 channel 1*/
93    .long   PIT0CH2_IRQHandler                              /* Periodic interrupt timer 0 channel 2*/
94    .long   PIT0CH3_IRQHandler                              /* Periodic interrupt timer 0 channel 3*/
95    .long   PDB0_IRQHandler                                 /* Programmable delay block*/
96    .long   USB0_IRQHandler                                 /* USB OTG interrupt*/
97    .long   USBDCD_IRQHandler                               /* USB charger detect*/
98    .long   Reserved71_IRQHandler                           /* Reserved interrupt*/
99    .long   DAC0_IRQHandler                                 /* Digital-to-analog converter 0*/
100    .long   MCG_IRQHandler                                  /* Multipurpose clock generator*/
101    .long   LPTMR0_LPTMR1_IRQHandler                        /* Single interrupt vector for  Low Power Timer 0 and 1*/
102    .long   PORTA_IRQHandler                                /* Port A pin detect interrupt*/
103    .long   PORTB_IRQHandler                                /* Port B pin detect interrupt*/
104    .long   PORTC_IRQHandler                                /* Port C pin detect interrupt*/
105    .long   PORTD_IRQHandler                                /* Port D pin detect interrupt*/
106    .long   PORTE_IRQHandler                                /* Port E pin detect interrupt*/
107    .long   SWI_IRQHandler                                  /* Software interrupt*/
108    .long   SPI2_IRQHandler                                 /* Serial peripheral Interface 2*/
109    .long   SPI3_IRQHandler                                 /* Serial peripheral Interface 3*/
110    .long   Reserved83_IRQHandler                           /* Reserved interrupt*/
111    .long   I2S1_Tx_IRQHandler                              /* Integrated interchip sound 1 transmit interrupt*/
112    .long   I2S1_Rx_IRQHandler                              /* Integrated interchip sound 1 receive interrupt*/
113    .long   FLEXIO0_IRQHandler                              /* FLEXIO0*/
114    .long   FTM3_IRQHandler                                 /* FlexTimer module 3 fault, overflow and channels interrupt*/
115    .long   Reserved88_IRQHandler                           /* Reserved interrupt*/
116    .long   Reserved89_IRQHandler                           /* Reserved interrupt*/
117    .long   I2C2_IRQHandler                                 /* Inter-integrated circuit 2*/
118    .long   Reserved91_IRQHandler                           /* Reserved interrupt*/
119    .long   Reserved92_IRQHandler                           /* Reserved interrupt*/
120    .long   Reserved93_IRQHandler                           /* Reserved interrupt*/
121    .long   Reserved94_IRQHandler                           /* Reserved interrupt*/
122    .long   Reserved95_IRQHandler                           /* Reserved interrupt*/
123    .long   Reserved96_IRQHandler                           /* Reserved interrupt*/
124    .long   SDHC_IRQHandler                                 /* Secured digital host controller*/
125    .long   Reserved98_IRQHandler                           /* Reserved interrupt*/
126    .long   Reserved99_IRQHandler                           /* Reserved interrupt*/
127    .long   Reserved100_IRQHandler                          /* Reserved interrupt*/
128    .long   Reserved101_IRQHandler                          /* Reserved interrupt*/
129    .long   Reserved102_IRQHandler                          /* Reserved interrupt*/
130    .long   Reserved103_IRQHandler                          /* Reserved interrupt*/
131    .long   TPM1_IRQHandler                                 /* TPM1 single interrupt vector for all sources*/
132    .long   TPM2_IRQHandler                                 /* TPM2 single interrupt vector for all sources*/
133    .long   USBHSDCD_IRQHandler                             /* HS USB charger detect*/
134    .long   I2C3_IRQHandler                                 /* Inter-integrated circuit 3*/
135    .long   Reserved108_IRQHandler                          /* Reserved interrupt*/
136    .long   USBHS_IRQHandler                                /* USB HS interrupt*/
137    .long   Reserved110_IRQHandler                          /* Reserved interrupt*/
138    .long   Reserved111_IRQHandler                          /* Reserved interrupt*/
139    .long   Reserved112_IRQHandler                          /* Reserved interrupt*/
140    .long   Reserved113_IRQHandler                          /* Reserved interrupt*/
141    .long   Reserved114_IRQHandler                          /* Reserved interrupt*/
142    .long   Reserved115_IRQHandler                          /* Reserved interrupt*/
143    .long   QuadSPI0_IRQHandler                             /* qspi*/
144    .long   Reserved117_IRQHandler                          /* Reserved interrupt*/
145    .long   Reserved118_IRQHandler                          /* Reserved interrupt*/
146    .long   Reserved119_IRQHandler                          /* Reserved interrupt*/
147    .long   Reserved120_IRQHandler                          /* Reserved interrupt*/
148    .long   Reserved121_IRQHandler                          /* Reserved interrupt*/
149    .long   Reserved122_IRQHandler                          /* Reserved interrupt*/
150    .long   DefaultISR                                      /* 123*/
151    .long   DefaultISR                                      /* 124*/
152    .long   DefaultISR                                      /* 125*/
153    .long   DefaultISR                                      /* 126*/
154    .long   DefaultISR                                      /* 127*/
155    .long   DefaultISR                                      /* 128*/
156    .long   DefaultISR                                      /* 129*/
157    .long   DefaultISR                                      /* 130*/
158    .long   DefaultISR                                      /* 131*/
159    .long   DefaultISR                                      /* 132*/
160    .long   DefaultISR                                      /* 133*/
161    .long   DefaultISR                                      /* 134*/
162    .long   DefaultISR                                      /* 135*/
163    .long   DefaultISR                                      /* 136*/
164    .long   DefaultISR                                      /* 137*/
165    .long   DefaultISR                                      /* 138*/
166    .long   DefaultISR                                      /* 139*/
167    .long   DefaultISR                                      /* 140*/
168    .long   DefaultISR                                      /* 141*/
169    .long   DefaultISR                                      /* 142*/
170    .long   DefaultISR                                      /* 143*/
171    .long   DefaultISR                                      /* 144*/
172    .long   DefaultISR                                      /* 145*/
173    .long   DefaultISR                                      /* 146*/
174    .long   DefaultISR                                      /* 147*/
175    .long   DefaultISR                                      /* 148*/
176    .long   DefaultISR                                      /* 149*/
177    .long   DefaultISR                                      /* 150*/
178    .long   DefaultISR                                      /* 151*/
179    .long   DefaultISR                                      /* 152*/
180    .long   DefaultISR                                      /* 153*/
181    .long   DefaultISR                                      /* 154*/
182    .long   DefaultISR                                      /* 155*/
183    .long   DefaultISR                                      /* 156*/
184    .long   DefaultISR                                      /* 157*/
185    .long   DefaultISR                                      /* 158*/
186    .long   DefaultISR                                      /* 159*/
187    .long   DefaultISR                                      /* 160*/
188    .long   DefaultISR                                      /* 161*/
189    .long   DefaultISR                                      /* 162*/
190    .long   DefaultISR                                      /* 163*/
191    .long   DefaultISR                                      /* 164*/
192    .long   DefaultISR                                      /* 165*/
193    .long   DefaultISR                                      /* 166*/
194    .long   DefaultISR                                      /* 167*/
195    .long   DefaultISR                                      /* 168*/
196    .long   DefaultISR                                      /* 169*/
197    .long   DefaultISR                                      /* 170*/
198    .long   DefaultISR                                      /* 171*/
199    .long   DefaultISR                                      /* 172*/
200    .long   DefaultISR                                      /* 173*/
201    .long   DefaultISR                                      /* 174*/
202    .long   DefaultISR                                      /* 175*/
203    .long   DefaultISR                                      /* 176*/
204    .long   DefaultISR                                      /* 177*/
205    .long   DefaultISR                                      /* 178*/
206    .long   DefaultISR                                      /* 179*/
207    .long   DefaultISR                                      /* 180*/
208    .long   DefaultISR                                      /* 181*/
209    .long   DefaultISR                                      /* 182*/
210    .long   DefaultISR                                      /* 183*/
211    .long   DefaultISR                                      /* 184*/
212    .long   DefaultISR                                      /* 185*/
213    .long   DefaultISR                                      /* 186*/
214    .long   DefaultISR                                      /* 187*/
215    .long   DefaultISR                                      /* 188*/
216    .long   DefaultISR                                      /* 189*/
217    .long   DefaultISR                                      /* 190*/
218    .long   DefaultISR                                      /* 191*/
219    .long   DefaultISR                                      /* 192*/
220    .long   DefaultISR                                      /* 193*/
221    .long   DefaultISR                                      /* 194*/
222    .long   DefaultISR                                      /* 195*/
223    .long   DefaultISR                                      /* 196*/
224    .long   DefaultISR                                      /* 197*/
225    .long   DefaultISR                                      /* 198*/
226    .long   DefaultISR                                      /* 199*/
227    .long   DefaultISR                                      /* 200*/
228    .long   DefaultISR                                      /* 201*/
229    .long   DefaultISR                                      /* 202*/
230    .long   DefaultISR                                      /* 203*/
231    .long   DefaultISR                                      /* 204*/
232    .long   DefaultISR                                      /* 205*/
233    .long   DefaultISR                                      /* 206*/
234    .long   DefaultISR                                      /* 207*/
235    .long   DefaultISR                                      /* 208*/
236    .long   DefaultISR                                      /* 209*/
237    .long   DefaultISR                                      /* 210*/
238    .long   DefaultISR                                      /* 211*/
239    .long   DefaultISR                                      /* 212*/
240    .long   DefaultISR                                      /* 213*/
241    .long   DefaultISR                                      /* 214*/
242    .long   DefaultISR                                      /* 215*/
243    .long   DefaultISR                                      /* 216*/
244    .long   DefaultISR                                      /* 217*/
245    .long   DefaultISR                                      /* 218*/
246    .long   DefaultISR                                      /* 219*/
247    .long   DefaultISR                                      /* 220*/
248    .long   DefaultISR                                      /* 221*/
249    .long   DefaultISR                                      /* 222*/
250    .long   DefaultISR                                      /* 223*/
251    .long   DefaultISR                                      /* 224*/
252    .long   DefaultISR                                      /* 225*/
253    .long   DefaultISR                                      /* 226*/
254    .long   DefaultISR                                      /* 227*/
255    .long   DefaultISR                                      /* 228*/
256    .long   DefaultISR                                      /* 229*/
257    .long   DefaultISR                                      /* 230*/
258    .long   DefaultISR                                      /* 231*/
259    .long   DefaultISR                                      /* 232*/
260    .long   DefaultISR                                      /* 233*/
261    .long   DefaultISR                                      /* 234*/
262    .long   DefaultISR                                      /* 235*/
263    .long   DefaultISR                                      /* 236*/
264    .long   DefaultISR                                      /* 237*/
265    .long   DefaultISR                                      /* 238*/
266    .long   DefaultISR                                      /* 239*/
267
268    .size    __isr_vector, . - __isr_vector
269
270/* Flash Configuration */
271    .section .FlashConfig, "a"
272    .long 0xFFFFFFFF
273    .long 0xFFFFFFFF
274    .long 0xFFFFFFFF
275    .long 0xFFFF3DFE
276
277    .text
278    .thumb
279
280/* Reset Handler */
281
282    .thumb_func
283    .align 2
284    .globl   Reset_Handler
285    .weak    Reset_Handler
286    .type    Reset_Handler, %function
287Reset_Handler:
288    cpsid   i               /* Mask interrupts */
289    .equ    VTOR, 0xE000ED08
290    ldr     r0, =VTOR
291    ldr     r1, =__isr_vector
292    str     r1, [r0]
293    ldr     r2, [r1]
294    msr     msp, r2
295#ifndef __NO_SYSTEM_INIT
296    ldr   r0,=SystemInit
297    blx   r0
298#endif
299/*     Loop to copy data from read only memory to RAM. The ranges
300 *      of copy from/to are specified by following symbols evaluated in
301 *      linker script.
302 *      __etext: End of code section, i.e., begin of data sections to copy from.
303 *      __data_start__/__data_end__: RAM address range that data should be
304 *      __noncachedata_start__/__noncachedata_end__ : none cachable region
305 *      copied to. Both must be aligned to 4 bytes boundary.  */
306
307    ldr    r1, =__etext
308    ldr    r2, =__data_start__
309    ldr    r3, =__data_end__
310
311#ifdef __PERFORMANCE_IMPLEMENTATION
312/* Here are two copies of loop implementations. First one favors performance
313 * and the second one favors code size. Default uses the second one.
314 * Define macro "__PERFORMANCE_IMPLEMENTATION" in project to use the first one */
315    subs    r3, r2
316    ble    .LC1
317.LC0:
318    subs    r3, #4
319    ldr    r0, [r1, r3]
320    str    r0, [r2, r3]
321    bgt    .LC0
322.LC1:
323#else  /* code size implemenation */
324.LC0:
325    cmp     r2, r3
326    ittt    lt
327    ldrlt   r0, [r1], #4
328    strlt   r0, [r2], #4
329    blt    .LC0
330#endif
331#ifdef __STARTUP_INITIALIZE_NONCACHEDATA
332    ldr    r2, =__noncachedata_start__
333    ldr    r3, =__noncachedata_init_end__
334#ifdef __PERFORMANCE_IMPLEMENTATION
335/* Here are two copies of loop implementations. First one favors performance
336 * and the second one favors code size. Default uses the second one.
337 * Define macro "__PERFORMANCE_IMPLEMENTATION" in project to use the first one */
338    subs    r3, r2
339    ble    .LC3
340.LC2:
341    subs    r3, #4
342    ldr    r0, [r1, r3]
343    str    r0, [r2, r3]
344    bgt    .LC2
345.LC3:
346#else  /* code size implemenation */
347.LC2:
348    cmp     r2, r3
349    ittt    lt
350    ldrlt   r0, [r1], #4
351    strlt   r0, [r2], #4
352    blt    .LC2
353#endif
354/* zero inited ncache section initialization */
355    ldr r3, =__noncachedata_end__
356    movs    r0,0
357.LC4:
358    cmp    r2,r3
359    itt    lt
360    strlt   r0,[r2],#4
361    blt    .LC4
362#endif /* __STARTUP_INITIALIZE_NONCACHEDATA */
363
364#ifdef __STARTUP_CLEAR_BSS
365/*     This part of work usually is done in C library startup code. Otherwise,
366 *     define this macro to enable it in this startup.
367 *
368 *     Loop to zero out BSS section, which uses following symbols
369 *     in linker script:
370 *      __bss_start__: start of BSS section. Must align to 4
371 *      __bss_end__: end of BSS section. Must align to 4
372 */
373    ldr r1, =__bss_start__
374    ldr r2, =__bss_end__
375
376    movs    r0, 0
377.LC5:
378    cmp     r1, r2
379    itt    lt
380    strlt   r0, [r1], #4
381    blt    .LC5
382#endif /* __STARTUP_CLEAR_BSS */
383
384    cpsie   i               /* Unmask interrupts */
385#ifndef __START
386#define __START _start
387#endif
388#ifndef __ATOLLIC__
389    ldr   r0,=__START
390    blx   r0
391#else
392    ldr   r0,=__libc_init_array
393    blx   r0
394    ldr   r0,=main
395    bx    r0
396#endif
397    .pool
398    .size Reset_Handler, . - Reset_Handler
399
400    .align  1
401    .thumb_func
402    .weak DefaultISR
403    .type DefaultISR, %function
404DefaultISR:
405    b DefaultISR
406    .size DefaultISR, . - DefaultISR
407
408    .align 1
409    .thumb_func
410    .weak NMI_Handler
411    .type NMI_Handler, %function
412NMI_Handler:
413    ldr   r0,=NMI_Handler
414    bx    r0
415    .size NMI_Handler, . - NMI_Handler
416
417    .align 1
418    .thumb_func
419    .weak HardFault_Handler
420    .type HardFault_Handler, %function
421HardFault_Handler:
422    ldr   r0,=HardFault_Handler
423    bx    r0
424    .size HardFault_Handler, . - HardFault_Handler
425
426    .align 1
427    .thumb_func
428    .weak SVC_Handler
429    .type SVC_Handler, %function
430SVC_Handler:
431    ldr   r0,=SVC_Handler
432    bx    r0
433    .size SVC_Handler, . - SVC_Handler
434
435    .align 1
436    .thumb_func
437    .weak PendSV_Handler
438    .type PendSV_Handler, %function
439PendSV_Handler:
440    ldr   r0,=PendSV_Handler
441    bx    r0
442    .size PendSV_Handler, . - PendSV_Handler
443
444    .align 1
445    .thumb_func
446    .weak SysTick_Handler
447    .type SysTick_Handler, %function
448SysTick_Handler:
449    ldr   r0,=SysTick_Handler
450    bx    r0
451    .size SysTick_Handler, . - SysTick_Handler
452
453    .align 1
454    .thumb_func
455    .weak DMA0_DMA16_IRQHandler
456    .type DMA0_DMA16_IRQHandler, %function
457DMA0_DMA16_IRQHandler:
458    ldr   r0,=DMA0_DMA16_DriverIRQHandler
459    bx    r0
460    .size DMA0_DMA16_IRQHandler, . - DMA0_DMA16_IRQHandler
461
462    .align 1
463    .thumb_func
464    .weak DMA1_DMA17_IRQHandler
465    .type DMA1_DMA17_IRQHandler, %function
466DMA1_DMA17_IRQHandler:
467    ldr   r0,=DMA1_DMA17_DriverIRQHandler
468    bx    r0
469    .size DMA1_DMA17_IRQHandler, . - DMA1_DMA17_IRQHandler
470
471    .align 1
472    .thumb_func
473    .weak DMA2_DMA18_IRQHandler
474    .type DMA2_DMA18_IRQHandler, %function
475DMA2_DMA18_IRQHandler:
476    ldr   r0,=DMA2_DMA18_DriverIRQHandler
477    bx    r0
478    .size DMA2_DMA18_IRQHandler, . - DMA2_DMA18_IRQHandler
479
480    .align 1
481    .thumb_func
482    .weak DMA3_DMA19_IRQHandler
483    .type DMA3_DMA19_IRQHandler, %function
484DMA3_DMA19_IRQHandler:
485    ldr   r0,=DMA3_DMA19_DriverIRQHandler
486    bx    r0
487    .size DMA3_DMA19_IRQHandler, . - DMA3_DMA19_IRQHandler
488
489    .align 1
490    .thumb_func
491    .weak DMA4_DMA20_IRQHandler
492    .type DMA4_DMA20_IRQHandler, %function
493DMA4_DMA20_IRQHandler:
494    ldr   r0,=DMA4_DMA20_DriverIRQHandler
495    bx    r0
496    .size DMA4_DMA20_IRQHandler, . - DMA4_DMA20_IRQHandler
497
498    .align 1
499    .thumb_func
500    .weak DMA5_DMA21_IRQHandler
501    .type DMA5_DMA21_IRQHandler, %function
502DMA5_DMA21_IRQHandler:
503    ldr   r0,=DMA5_DMA21_DriverIRQHandler
504    bx    r0
505    .size DMA5_DMA21_IRQHandler, . - DMA5_DMA21_IRQHandler
506
507    .align 1
508    .thumb_func
509    .weak DMA6_DMA22_IRQHandler
510    .type DMA6_DMA22_IRQHandler, %function
511DMA6_DMA22_IRQHandler:
512    ldr   r0,=DMA6_DMA22_DriverIRQHandler
513    bx    r0
514    .size DMA6_DMA22_IRQHandler, . - DMA6_DMA22_IRQHandler
515
516    .align 1
517    .thumb_func
518    .weak DMA7_DMA23_IRQHandler
519    .type DMA7_DMA23_IRQHandler, %function
520DMA7_DMA23_IRQHandler:
521    ldr   r0,=DMA7_DMA23_DriverIRQHandler
522    bx    r0
523    .size DMA7_DMA23_IRQHandler, . - DMA7_DMA23_IRQHandler
524
525    .align 1
526    .thumb_func
527    .weak DMA8_DMA24_IRQHandler
528    .type DMA8_DMA24_IRQHandler, %function
529DMA8_DMA24_IRQHandler:
530    ldr   r0,=DMA8_DMA24_DriverIRQHandler
531    bx    r0
532    .size DMA8_DMA24_IRQHandler, . - DMA8_DMA24_IRQHandler
533
534    .align 1
535    .thumb_func
536    .weak DMA9_DMA25_IRQHandler
537    .type DMA9_DMA25_IRQHandler, %function
538DMA9_DMA25_IRQHandler:
539    ldr   r0,=DMA9_DMA25_DriverIRQHandler
540    bx    r0
541    .size DMA9_DMA25_IRQHandler, . - DMA9_DMA25_IRQHandler
542
543    .align 1
544    .thumb_func
545    .weak DMA10_DMA26_IRQHandler
546    .type DMA10_DMA26_IRQHandler, %function
547DMA10_DMA26_IRQHandler:
548    ldr   r0,=DMA10_DMA26_DriverIRQHandler
549    bx    r0
550    .size DMA10_DMA26_IRQHandler, . - DMA10_DMA26_IRQHandler
551
552    .align 1
553    .thumb_func
554    .weak DMA11_DMA27_IRQHandler
555    .type DMA11_DMA27_IRQHandler, %function
556DMA11_DMA27_IRQHandler:
557    ldr   r0,=DMA11_DMA27_DriverIRQHandler
558    bx    r0
559    .size DMA11_DMA27_IRQHandler, . - DMA11_DMA27_IRQHandler
560
561    .align 1
562    .thumb_func
563    .weak DMA12_DMA28_IRQHandler
564    .type DMA12_DMA28_IRQHandler, %function
565DMA12_DMA28_IRQHandler:
566    ldr   r0,=DMA12_DMA28_DriverIRQHandler
567    bx    r0
568    .size DMA12_DMA28_IRQHandler, . - DMA12_DMA28_IRQHandler
569
570    .align 1
571    .thumb_func
572    .weak DMA13_DMA29_IRQHandler
573    .type DMA13_DMA29_IRQHandler, %function
574DMA13_DMA29_IRQHandler:
575    ldr   r0,=DMA13_DMA29_DriverIRQHandler
576    bx    r0
577    .size DMA13_DMA29_IRQHandler, . - DMA13_DMA29_IRQHandler
578
579    .align 1
580    .thumb_func
581    .weak DMA14_DMA30_IRQHandler
582    .type DMA14_DMA30_IRQHandler, %function
583DMA14_DMA30_IRQHandler:
584    ldr   r0,=DMA14_DMA30_DriverIRQHandler
585    bx    r0
586    .size DMA14_DMA30_IRQHandler, . - DMA14_DMA30_IRQHandler
587
588    .align 1
589    .thumb_func
590    .weak DMA15_DMA31_IRQHandler
591    .type DMA15_DMA31_IRQHandler, %function
592DMA15_DMA31_IRQHandler:
593    ldr   r0,=DMA15_DMA31_DriverIRQHandler
594    bx    r0
595    .size DMA15_DMA31_IRQHandler, . - DMA15_DMA31_IRQHandler
596
597    .align 1
598    .thumb_func
599    .weak DMA_Error_IRQHandler
600    .type DMA_Error_IRQHandler, %function
601DMA_Error_IRQHandler:
602    ldr   r0,=DMA_Error_DriverIRQHandler
603    bx    r0
604    .size DMA_Error_IRQHandler, . - DMA_Error_IRQHandler
605
606    .align 1
607    .thumb_func
608    .weak I2C0_IRQHandler
609    .type I2C0_IRQHandler, %function
610I2C0_IRQHandler:
611    ldr   r0,=I2C0_DriverIRQHandler
612    bx    r0
613    .size I2C0_IRQHandler, . - I2C0_IRQHandler
614
615    .align 1
616    .thumb_func
617    .weak I2C1_IRQHandler
618    .type I2C1_IRQHandler, %function
619I2C1_IRQHandler:
620    ldr   r0,=I2C1_DriverIRQHandler
621    bx    r0
622    .size I2C1_IRQHandler, . - I2C1_IRQHandler
623
624    .align 1
625    .thumb_func
626    .weak SPI0_IRQHandler
627    .type SPI0_IRQHandler, %function
628SPI0_IRQHandler:
629    ldr   r0,=SPI0_DriverIRQHandler
630    bx    r0
631    .size SPI0_IRQHandler, . - SPI0_IRQHandler
632
633    .align 1
634    .thumb_func
635    .weak SPI1_IRQHandler
636    .type SPI1_IRQHandler, %function
637SPI1_IRQHandler:
638    ldr   r0,=SPI1_DriverIRQHandler
639    bx    r0
640    .size SPI1_IRQHandler, . - SPI1_IRQHandler
641
642    .align 1
643    .thumb_func
644    .weak I2S0_Tx_IRQHandler
645    .type I2S0_Tx_IRQHandler, %function
646I2S0_Tx_IRQHandler:
647    ldr   r0,=I2S0_Tx_DriverIRQHandler
648    bx    r0
649    .size I2S0_Tx_IRQHandler, . - I2S0_Tx_IRQHandler
650
651    .align 1
652    .thumb_func
653    .weak I2S0_Rx_IRQHandler
654    .type I2S0_Rx_IRQHandler, %function
655I2S0_Rx_IRQHandler:
656    ldr   r0,=I2S0_Rx_DriverIRQHandler
657    bx    r0
658    .size I2S0_Rx_IRQHandler, . - I2S0_Rx_IRQHandler
659
660    .align 1
661    .thumb_func
662    .weak LPUART0_IRQHandler
663    .type LPUART0_IRQHandler, %function
664LPUART0_IRQHandler:
665    ldr   r0,=LPUART0_DriverIRQHandler
666    bx    r0
667    .size LPUART0_IRQHandler, . - LPUART0_IRQHandler
668
669    .align 1
670    .thumb_func
671    .weak LPUART1_IRQHandler
672    .type LPUART1_IRQHandler, %function
673LPUART1_IRQHandler:
674    ldr   r0,=LPUART1_DriverIRQHandler
675    bx    r0
676    .size LPUART1_IRQHandler, . - LPUART1_IRQHandler
677
678    .align 1
679    .thumb_func
680    .weak LPUART2_IRQHandler
681    .type LPUART2_IRQHandler, %function
682LPUART2_IRQHandler:
683    ldr   r0,=LPUART2_DriverIRQHandler
684    bx    r0
685    .size LPUART2_IRQHandler, . - LPUART2_IRQHandler
686
687    .align 1
688    .thumb_func
689    .weak LPUART3_IRQHandler
690    .type LPUART3_IRQHandler, %function
691LPUART3_IRQHandler:
692    ldr   r0,=LPUART3_DriverIRQHandler
693    bx    r0
694    .size LPUART3_IRQHandler, . - LPUART3_IRQHandler
695
696    .align 1
697    .thumb_func
698    .weak LPUART4_IRQHandler
699    .type LPUART4_IRQHandler, %function
700LPUART4_IRQHandler:
701    ldr   r0,=LPUART4_DriverIRQHandler
702    bx    r0
703    .size LPUART4_IRQHandler, . - LPUART4_IRQHandler
704
705    .align 1
706    .thumb_func
707    .weak SPI2_IRQHandler
708    .type SPI2_IRQHandler, %function
709SPI2_IRQHandler:
710    ldr   r0,=SPI2_DriverIRQHandler
711    bx    r0
712    .size SPI2_IRQHandler, . - SPI2_IRQHandler
713
714    .align 1
715    .thumb_func
716    .weak SPI3_IRQHandler
717    .type SPI3_IRQHandler, %function
718SPI3_IRQHandler:
719    ldr   r0,=SPI3_DriverIRQHandler
720    bx    r0
721    .size SPI3_IRQHandler, . - SPI3_IRQHandler
722
723    .align 1
724    .thumb_func
725    .weak I2S1_Tx_IRQHandler
726    .type I2S1_Tx_IRQHandler, %function
727I2S1_Tx_IRQHandler:
728    ldr   r0,=I2S1_Tx_DriverIRQHandler
729    bx    r0
730    .size I2S1_Tx_IRQHandler, . - I2S1_Tx_IRQHandler
731
732    .align 1
733    .thumb_func
734    .weak I2S1_Rx_IRQHandler
735    .type I2S1_Rx_IRQHandler, %function
736I2S1_Rx_IRQHandler:
737    ldr   r0,=I2S1_Rx_DriverIRQHandler
738    bx    r0
739    .size I2S1_Rx_IRQHandler, . - I2S1_Rx_IRQHandler
740
741    .align 1
742    .thumb_func
743    .weak FLEXIO0_IRQHandler
744    .type FLEXIO0_IRQHandler, %function
745FLEXIO0_IRQHandler:
746    ldr   r0,=FLEXIO0_DriverIRQHandler
747    bx    r0
748    .size FLEXIO0_IRQHandler, . - FLEXIO0_IRQHandler
749
750    .align 1
751    .thumb_func
752    .weak I2C2_IRQHandler
753    .type I2C2_IRQHandler, %function
754I2C2_IRQHandler:
755    ldr   r0,=I2C2_DriverIRQHandler
756    bx    r0
757    .size I2C2_IRQHandler, . - I2C2_IRQHandler
758
759    .align 1
760    .thumb_func
761    .weak SDHC_IRQHandler
762    .type SDHC_IRQHandler, %function
763SDHC_IRQHandler:
764    ldr   r0,=SDHC_DriverIRQHandler
765    bx    r0
766    .size SDHC_IRQHandler, . - SDHC_IRQHandler
767
768    .align 1
769    .thumb_func
770    .weak I2C3_IRQHandler
771    .type I2C3_IRQHandler, %function
772I2C3_IRQHandler:
773    ldr   r0,=I2C3_DriverIRQHandler
774    bx    r0
775    .size I2C3_IRQHandler, . - I2C3_IRQHandler
776
777    .align 1
778    .thumb_func
779    .weak QuadSPI0_IRQHandler
780    .type QuadSPI0_IRQHandler, %function
781QuadSPI0_IRQHandler:
782    ldr   r0,=QuadSPI0_DriverIRQHandler
783    bx    r0
784    .size QuadSPI0_IRQHandler, . - QuadSPI0_IRQHandler
785
786
787/*    Macro to define default handlers. Default handler
788 *    will be weak symbol and just dead loops. They can be
789 *    overwritten by other handlers */
790    .macro def_irq_handler  handler_name
791    .weak \handler_name
792    .set  \handler_name, DefaultISR
793    .endm
794
795/* Exception Handlers */
796    def_irq_handler    MemManage_Handler
797    def_irq_handler    BusFault_Handler
798    def_irq_handler    UsageFault_Handler
799    def_irq_handler    DebugMon_Handler
800    def_irq_handler    DMA0_DMA16_DriverIRQHandler
801    def_irq_handler    DMA1_DMA17_DriverIRQHandler
802    def_irq_handler    DMA2_DMA18_DriverIRQHandler
803    def_irq_handler    DMA3_DMA19_DriverIRQHandler
804    def_irq_handler    DMA4_DMA20_DriverIRQHandler
805    def_irq_handler    DMA5_DMA21_DriverIRQHandler
806    def_irq_handler    DMA6_DMA22_DriverIRQHandler
807    def_irq_handler    DMA7_DMA23_DriverIRQHandler
808    def_irq_handler    DMA8_DMA24_DriverIRQHandler
809    def_irq_handler    DMA9_DMA25_DriverIRQHandler
810    def_irq_handler    DMA10_DMA26_DriverIRQHandler
811    def_irq_handler    DMA11_DMA27_DriverIRQHandler
812    def_irq_handler    DMA12_DMA28_DriverIRQHandler
813    def_irq_handler    DMA13_DMA29_DriverIRQHandler
814    def_irq_handler    DMA14_DMA30_DriverIRQHandler
815    def_irq_handler    DMA15_DMA31_DriverIRQHandler
816    def_irq_handler    DMA_Error_DriverIRQHandler
817    def_irq_handler    MCM_IRQHandler
818    def_irq_handler    FTFE_IRQHandler
819    def_irq_handler    Read_Collision_IRQHandler
820    def_irq_handler    LVD_LVW_IRQHandler
821    def_irq_handler    LLWU_IRQHandler
822    def_irq_handler    WDOG_EWM_IRQHandler
823    def_irq_handler    TRNG0_IRQHandler
824    def_irq_handler    I2C0_DriverIRQHandler
825    def_irq_handler    I2C1_DriverIRQHandler
826    def_irq_handler    SPI0_DriverIRQHandler
827    def_irq_handler    SPI1_DriverIRQHandler
828    def_irq_handler    I2S0_Tx_DriverIRQHandler
829    def_irq_handler    I2S0_Rx_DriverIRQHandler
830    def_irq_handler    LPUART0_DriverIRQHandler
831    def_irq_handler    LPUART1_DriverIRQHandler
832    def_irq_handler    LPUART2_DriverIRQHandler
833    def_irq_handler    LPUART3_DriverIRQHandler
834    def_irq_handler    LPUART4_DriverIRQHandler
835    def_irq_handler    Reserved51_IRQHandler
836    def_irq_handler    Reserved52_IRQHandler
837    def_irq_handler    Reserved53_IRQHandler
838    def_irq_handler    Reserved54_IRQHandler
839    def_irq_handler    ADC0_IRQHandler
840    def_irq_handler    CMP0_IRQHandler
841    def_irq_handler    CMP1_IRQHandler
842    def_irq_handler    FTM0_IRQHandler
843    def_irq_handler    FTM1_IRQHandler
844    def_irq_handler    FTM2_IRQHandler
845    def_irq_handler    CMT_IRQHandler
846    def_irq_handler    RTC_IRQHandler
847    def_irq_handler    RTC_Seconds_IRQHandler
848    def_irq_handler    PIT0CH0_IRQHandler
849    def_irq_handler    PIT0CH1_IRQHandler
850    def_irq_handler    PIT0CH2_IRQHandler
851    def_irq_handler    PIT0CH3_IRQHandler
852    def_irq_handler    PDB0_IRQHandler
853    def_irq_handler    USB0_IRQHandler
854    def_irq_handler    USBDCD_IRQHandler
855    def_irq_handler    Reserved71_IRQHandler
856    def_irq_handler    DAC0_IRQHandler
857    def_irq_handler    MCG_IRQHandler
858    def_irq_handler    LPTMR0_LPTMR1_IRQHandler
859    def_irq_handler    PORTA_IRQHandler
860    def_irq_handler    PORTB_IRQHandler
861    def_irq_handler    PORTC_IRQHandler
862    def_irq_handler    PORTD_IRQHandler
863    def_irq_handler    PORTE_IRQHandler
864    def_irq_handler    SWI_IRQHandler
865    def_irq_handler    SPI2_DriverIRQHandler
866    def_irq_handler    SPI3_DriverIRQHandler
867    def_irq_handler    Reserved83_IRQHandler
868    def_irq_handler    I2S1_Tx_DriverIRQHandler
869    def_irq_handler    I2S1_Rx_DriverIRQHandler
870    def_irq_handler    FLEXIO0_DriverIRQHandler
871    def_irq_handler    FTM3_IRQHandler
872    def_irq_handler    Reserved88_IRQHandler
873    def_irq_handler    Reserved89_IRQHandler
874    def_irq_handler    I2C2_DriverIRQHandler
875    def_irq_handler    Reserved91_IRQHandler
876    def_irq_handler    Reserved92_IRQHandler
877    def_irq_handler    Reserved93_IRQHandler
878    def_irq_handler    Reserved94_IRQHandler
879    def_irq_handler    Reserved95_IRQHandler
880    def_irq_handler    Reserved96_IRQHandler
881    def_irq_handler    SDHC_DriverIRQHandler
882    def_irq_handler    Reserved98_IRQHandler
883    def_irq_handler    Reserved99_IRQHandler
884    def_irq_handler    Reserved100_IRQHandler
885    def_irq_handler    Reserved101_IRQHandler
886    def_irq_handler    Reserved102_IRQHandler
887    def_irq_handler    Reserved103_IRQHandler
888    def_irq_handler    TPM1_IRQHandler
889    def_irq_handler    TPM2_IRQHandler
890    def_irq_handler    USBHSDCD_IRQHandler
891    def_irq_handler    I2C3_DriverIRQHandler
892    def_irq_handler    Reserved108_IRQHandler
893    def_irq_handler    USBHS_IRQHandler
894    def_irq_handler    Reserved110_IRQHandler
895    def_irq_handler    Reserved111_IRQHandler
896    def_irq_handler    Reserved112_IRQHandler
897    def_irq_handler    Reserved113_IRQHandler
898    def_irq_handler    Reserved114_IRQHandler
899    def_irq_handler    Reserved115_IRQHandler
900    def_irq_handler    QuadSPI0_DriverIRQHandler
901    def_irq_handler    Reserved117_IRQHandler
902    def_irq_handler    Reserved118_IRQHandler
903    def_irq_handler    Reserved119_IRQHandler
904    def_irq_handler    Reserved120_IRQHandler
905    def_irq_handler    Reserved121_IRQHandler
906    def_irq_handler    Reserved122_IRQHandler
907
908    .end
909