1/* --------------------------------------------------------------------------*/
2/* @file:    startup_MIMXRT633S.s                                                */
3/* @purpose: CMSIS Cortex-M33 Core Device Startup File                       */
4/*           MIMXRT633S                                                          */
5/* @version: 2.0                                                      */
6/* @date:    2019-11-12                                                         */
7/* --------------------------------------------------------------------------*/
8/*                                                                           */
9/* Copyright 1997-2016 Freescale Semiconductor, Inc.                         */
10/* Copyright 2016-2021 NXP                                                   */
11/* All rights reserved.                                                      */
12/*                                                                           */
13/* SPDX-License-Identifier: BSD-3-Clause                                     */
14/*****************************************************************************/
15/* Version: GCC for ARM Embedded Processors                                  */
16/*****************************************************************************/
17
18
19    .syntax unified
20    .arch armv8-m.main
21
22    .section .isr_vector, "a"
23    .align 2
24    .globl __isr_vector
25__isr_vector:
26    .long   __StackTop                                      /* Top of Stack */
27    .long   Reset_Handler                                   /* Reset Handler */
28    .long   NMI_Handler                                     /* NMI Handler*/
29    .long   HardFault_Handler                               /* Hard Fault Handler*/
30    .long   MemManage_Handler                               /* MPU Fault Handler*/
31    .long   BusFault_Handler                                /* Bus Fault Handler*/
32    .long   UsageFault_Handler                              /* Usage Fault Handler*/
33    .long   SecureFault_Handler                             /* Secure Fault Handler*/
34#if (defined(__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE & 0x2))
35    .long   0x180000                                        /* Image length*/
36#else
37    .long   _image_size                                     /* Image length*/
38#endif
39    .long   0                                               /* Reserved*/
40    .long   0                                               /* Reserved*/
41    .long   SVC_Handler                                     /* SVCall Handler*/
42    .long   DebugMon_Handler                                /* Debug Monitor Handler*/
43    .long   __isr_vector                                    /* Image load address*/
44    .long   PendSV_Handler                                  /* PendSV Handler*/
45    .long   SysTick_Handler                                 /* SysTick Handler*/
46
47    /* External Interrupts */
48    .long   WDT0_IRQHandler  /* Windowed watchdog timer 0 (CM33 watchdog) */
49    .long   DMA0_IRQHandler  /* DMA controller 0 (secure or CM33 DMA) */
50    .long   GPIO_INTA_IRQHandler  /* GPIO interrupt A */
51    .long   GPIO_INTB_IRQHandler  /* GPIO interrupt B */
52    .long   PIN_INT0_IRQHandler  /* Pin interrupt 0 or pattern match engine slice 0 int */
53    .long   PIN_INT1_IRQHandler  /* Pin interrupt 1 or pattern match engine slice 1 int */
54    .long   PIN_INT2_IRQHandler  /* Pin interrupt 2 or pattern match engine slice 2 int */
55    .long   PIN_INT3_IRQHandler  /* Pin interrupt 3 or pattern match engine slice 3 int */
56    .long   UTICK0_IRQHandler  /* Micro-tick Timer */
57    .long   MRT0_IRQHandler  /* Multi-Rate Timer */
58    .long   CTIMER0_IRQHandler  /* Standard counter/timer CTIMER0 */
59    .long   CTIMER1_IRQHandler  /* Standard counter/timer CTIMER1 */
60    .long   SCT0_IRQHandler  /* SCTimer/PWM */
61    .long   CTIMER3_IRQHandler  /* Standard counter/timer CTIMER3 */
62    .long   FLEXCOMM0_IRQHandler  /* Flexcomm Interface 0 (USART, SPI, I2C, I2S) */
63    .long   FLEXCOMM1_IRQHandler  /* Flexcomm Interface 1 (USART, SPI, I2C, I2S) */
64    .long   FLEXCOMM2_IRQHandler  /* Flexcomm Interface 2 (USART, SPI, I2C, I2S) */
65    .long   FLEXCOMM3_IRQHandler  /* Flexcomm Interface 3 (USART, SPI, I2C, I2S) */
66    .long   FLEXCOMM4_IRQHandler  /* Flexcomm Interface 4 (USART, SPI, I2C, I2S) */
67    .long   FLEXCOMM5_IRQHandler  /* Flexcomm Interface 5 (USART, SPI, I2C, I2S) */
68    .long   FLEXCOMM14_IRQHandler  /* Flexcomm Interface 14 (SPI only) */
69    .long   FLEXCOMM15_IRQHandler  /* Flexcomm Interface 15 (I2C only) */
70    .long   ADC0_IRQHandler  /* ADC0  */
71    .long   Reserved39_IRQHandler  /* Reserved interrupt */
72    .long   ACMP_IRQHandler  /* Analog comparator */
73    .long   DMIC0_IRQHandler  /* Digital microphone and DMIC subsystem */
74    .long   Reserved42_IRQHandler  /* Reserved interrupt */
75    .long   HYPERVISOR_IRQHandler  /* Hypervisor */
76    .long   SECUREVIOLATION_IRQHandler  /* Secure violation */
77    .long   HWVAD0_IRQHandler  /* Hardware Voice Activity Detector */
78    .long   Reserved46_IRQHandler  /* Reserved interrupt */
79    .long   RNG_IRQHandler  /* Random number Generator */
80    .long   RTC_IRQHandler  /* RTC alarm and wake-up */
81    .long   Reserved49_IRQHandler  /* Reserved interrupt */
82    .long   MU_A_IRQHandler  /* Messaging Unit port A for CM33 */
83    .long   PIN_INT4_IRQHandler  /* Pin interrupt 4 or pattern match engine slice 4 int */
84    .long   PIN_INT5_IRQHandler  /* Pin interrupt 5 or pattern match engine slice 5 int */
85    .long   PIN_INT6_IRQHandler  /* Pin interrupt 6 or pattern match engine slice 6 int */
86    .long   PIN_INT7_IRQHandler  /* Pin interrupt 7 or pattern match engine slice 7 int */
87    .long   CTIMER2_IRQHandler  /* Standard counter/timer CTIMER2 */
88    .long   CTIMER4_IRQHandler  /* Standard counter/timer CTIMER4 */
89    .long   OS_EVENT_IRQHandler  /* OS event timer */
90    .long   FLEXSPI_IRQHandler  /* FLEXSPI interface */
91    .long   FLEXCOMM6_IRQHandler  /* Flexcomm Interface 6 (USART, SPI, I2C, I2S) */
92    .long   FLEXCOMM7_IRQHandler  /* Flexcomm Interface 7 (USART, SPI, I2C, I2S) */
93    .long   USDHC0_IRQHandler  /* USDHC0 (Enhanced SDHC) interrupt request */
94    .long   USDHC1_IRQHandler  /* USDHC1 (Enhanced SDHC) interrupt request */
95    .long   SGPIO_INTA_IRQHandler  /* Secure GPIO interrupt A */
96    .long   SGPIO_INTB_IRQHandler  /* Secure GPIO interrupt B */
97    .long   I3C0_IRQHandler  /* I3C interface 0 */
98    .long   USB_IRQHandler  /* High-speed USB device/host */
99    .long   USB_WAKEUP_IRQHandler  /* USB Activity Wake-up Interrupt */
100    .long   WDT1_IRQHandler  /* Windowed watchdog timer 1 (HiFi 4 watchdog) */
101    .long   USBPHY_DCD_IRQHandler  /* USBPHY DCD */
102    .long   DMA1_IRQHandler  /* DMA controller 1 (non-secure or HiFi 4 DMA) */
103    .long   PUF_IRQHandler  /* Physical Unclonable Function */
104    .long   POWERQUAD_IRQHandler  /* PowerQuad math coprocessor */
105    .long   CASPER_IRQHandler  /* Casper cryptographic coprocessor */
106    .long   PMC_PMIC_IRQHandler  /* Power management IC */
107    .long   HASHCRYPT_IRQHandler  /* Hash-AES unit */
108
109    .size    __isr_vector, . - __isr_vector
110
111    .text
112    .thumb
113
114/* Reset Handler */
115    .thumb_func
116    .align 2
117    .globl   Reset_Handler
118    .weak    Reset_Handler
119    .type    Reset_Handler, %function
120Reset_Handler:
121    cpsid   i               /* Mask interrupts */
122    .equ    VTOR, 0xE000ED08
123    ldr     r0, =VTOR
124    ldr     r1, =__isr_vector
125    str     r1, [r0]
126    ldr     r2, [r1]
127    msr     msp, r2
128    ldr     r0, =__StackLimit
129    msr     msplim, r0
130#ifndef __NO_SYSTEM_INIT
131    ldr   r0,=SystemInit
132    blx   r0
133#endif
134/*     Loop to copy data from read only memory to RAM. The ranges
135 *      of copy from/to are specified by following symbols evaluated in
136 *      linker script.
137 *      __etext: End of code section, i.e., begin of data sections to copy from.
138 *      __data_start__/__data_end__: RAM address range that data should be
139 *      copied to. Both must be aligned to 4 bytes boundary.  */
140
141    ldr    r1, =__etext
142    ldr    r2, =__data_start__
143    ldr    r3, =__data_end__
144
145#if 1
146/* Here are two copies of loop implemenations. First one favors code size
147 * and the second one favors performance. Default uses the first one.
148 * Change to "#if 0" to use the second one */
149.LC0:
150    cmp     r2, r3
151    ittt    lt
152    ldrlt   r0, [r1], #4
153    strlt   r0, [r2], #4
154    blt    .LC0
155#else
156    subs    r3, r2
157    ble    .LC1
158.LC0:
159    subs    r3, #4
160    ldr    r0, [r1, r3]
161    str    r0, [r2, r3]
162    bgt    .LC0
163.LC1:
164#endif
165
166#ifdef __STARTUP_CLEAR_BSS
167/*     This part of work usually is done in C library startup code. Otherwise,
168 *     define this macro to enable it in this startup.
169 *
170 *     Loop to zero out BSS section, which uses following symbols
171 *     in linker script:
172 *      __bss_start__: start of BSS section. Must align to 4
173 *      __bss_end__: end of BSS section. Must align to 4
174 */
175    ldr r1, =__bss_start__
176    ldr r2, =__bss_end__
177
178    movs    r0, 0
179.LC2:
180    cmp     r1, r2
181    itt    lt
182    strlt   r0, [r1], #4
183    blt    .LC2
184#endif /* __STARTUP_CLEAR_BSS */
185
186/* Add stack / heap initializaiton */
187    movs    r0, 0
188    ldr     r1, =__HeapBase
189    ldr     r2, =__HeapLimit
190.LC3:
191    cmp     r1, r2
192    itt     lt
193    strlt   r0, [r1], #4
194    blt     .LC3
195
196    ldr     r1, =__StackLimit
197    ldr     r2, =__StackTop
198.LC4:
199    cmp     r1, r2
200    itt     lt
201    strlt   r0, [r1], #4
202    blt     .LC4
203/*End of stack / heap initializaiton */
204    cpsie   i               /* Unmask interrupts */
205
206#ifndef __START
207#define __START _start
208#endif
209#ifndef __ATOLLIC__
210    ldr   r0,=__START
211    blx   r0
212#else
213    ldr   r0,=__libc_init_array
214    blx   r0
215    ldr   r0,=main
216    bx    r0
217#endif
218    .pool
219    .size Reset_Handler, . - Reset_Handler
220
221    .align  1
222    .thumb_func
223    .weak DefaultISR
224    .type DefaultISR, %function
225DefaultISR:
226    b DefaultISR
227    .size DefaultISR, . - DefaultISR
228
229    .align 1
230    .thumb_func
231    .weak NMI_Handler
232    .type NMI_Handler, %function
233NMI_Handler:
234    ldr   r0,=NMI_Handler
235    bx    r0
236    .size NMI_Handler, . - NMI_Handler
237
238    .align 1
239    .thumb_func
240    .weak HardFault_Handler
241    .type HardFault_Handler, %function
242HardFault_Handler:
243    ldr   r0,=HardFault_Handler
244    bx    r0
245    .size HardFault_Handler, . - HardFault_Handler
246
247    .align 1
248    .thumb_func
249    .weak SVC_Handler
250    .type SVC_Handler, %function
251SVC_Handler:
252    ldr   r0,=SVC_Handler
253    bx    r0
254    .size SVC_Handler, . - SVC_Handler
255
256    .align 1
257    .thumb_func
258    .weak PendSV_Handler
259    .type PendSV_Handler, %function
260PendSV_Handler:
261    ldr   r0,=PendSV_Handler
262    bx    r0
263    .size PendSV_Handler, . - PendSV_Handler
264
265    .align 1
266    .thumb_func
267    .weak SysTick_Handler
268    .type SysTick_Handler, %function
269SysTick_Handler:
270    ldr   r0,=SysTick_Handler
271    bx    r0
272    .size SysTick_Handler, . - SysTick_Handler
273
274    .align 1
275    .thumb_func
276    .weak WDT0_IRQHandler
277    .type WDT0_IRQHandler, %function
278WDT0_IRQHandler:
279    ldr   r0,=WDT0_DriverIRQHandler
280    bx    r0
281    .size WDT0_IRQHandler, . - WDT0_IRQHandler
282
283    .align 1
284    .thumb_func
285    .weak DMA0_IRQHandler
286    .type DMA0_IRQHandler, %function
287DMA0_IRQHandler:
288    ldr   r0,=DMA0_DriverIRQHandler
289    bx    r0
290    .size DMA0_IRQHandler, . - DMA0_IRQHandler
291
292    .align 1
293    .thumb_func
294    .weak GPIO_INTA_IRQHandler
295    .type GPIO_INTA_IRQHandler, %function
296GPIO_INTA_IRQHandler:
297    ldr   r0,=GPIO_INTA_DriverIRQHandler
298    bx    r0
299    .size GPIO_INTA_IRQHandler, . - GPIO_INTA_IRQHandler
300
301    .align 1
302    .thumb_func
303    .weak GPIO_INTB_IRQHandler
304    .type GPIO_INTB_IRQHandler, %function
305GPIO_INTB_IRQHandler:
306    ldr   r0,=GPIO_INTB_DriverIRQHandler
307    bx    r0
308    .size GPIO_INTB_IRQHandler, . - GPIO_INTB_IRQHandler
309
310    .align 1
311    .thumb_func
312    .weak PIN_INT0_IRQHandler
313    .type PIN_INT0_IRQHandler, %function
314PIN_INT0_IRQHandler:
315    ldr   r0,=PIN_INT0_DriverIRQHandler
316    bx    r0
317    .size PIN_INT0_IRQHandler, . - PIN_INT0_IRQHandler
318
319    .align 1
320    .thumb_func
321    .weak PIN_INT1_IRQHandler
322    .type PIN_INT1_IRQHandler, %function
323PIN_INT1_IRQHandler:
324    ldr   r0,=PIN_INT1_DriverIRQHandler
325    bx    r0
326    .size PIN_INT1_IRQHandler, . - PIN_INT1_IRQHandler
327
328    .align 1
329    .thumb_func
330    .weak PIN_INT2_IRQHandler
331    .type PIN_INT2_IRQHandler, %function
332PIN_INT2_IRQHandler:
333    ldr   r0,=PIN_INT2_DriverIRQHandler
334    bx    r0
335    .size PIN_INT2_IRQHandler, . - PIN_INT2_IRQHandler
336
337    .align 1
338    .thumb_func
339    .weak PIN_INT3_IRQHandler
340    .type PIN_INT3_IRQHandler, %function
341PIN_INT3_IRQHandler:
342    ldr   r0,=PIN_INT3_DriverIRQHandler
343    bx    r0
344    .size PIN_INT3_IRQHandler, . - PIN_INT3_IRQHandler
345
346    .align 1
347    .thumb_func
348    .weak UTICK0_IRQHandler
349    .type UTICK0_IRQHandler, %function
350UTICK0_IRQHandler:
351    ldr   r0,=UTICK0_DriverIRQHandler
352    bx    r0
353    .size UTICK0_IRQHandler, . - UTICK0_IRQHandler
354
355    .align 1
356    .thumb_func
357    .weak MRT0_IRQHandler
358    .type MRT0_IRQHandler, %function
359MRT0_IRQHandler:
360    ldr   r0,=MRT0_DriverIRQHandler
361    bx    r0
362    .size MRT0_IRQHandler, . - MRT0_IRQHandler
363
364    .align 1
365    .thumb_func
366    .weak CTIMER0_IRQHandler
367    .type CTIMER0_IRQHandler, %function
368CTIMER0_IRQHandler:
369    ldr   r0,=CTIMER0_DriverIRQHandler
370    bx    r0
371    .size CTIMER0_IRQHandler, . - CTIMER0_IRQHandler
372
373    .align 1
374    .thumb_func
375    .weak CTIMER1_IRQHandler
376    .type CTIMER1_IRQHandler, %function
377CTIMER1_IRQHandler:
378    ldr   r0,=CTIMER1_DriverIRQHandler
379    bx    r0
380    .size CTIMER1_IRQHandler, . - CTIMER1_IRQHandler
381
382    .align 1
383    .thumb_func
384    .weak SCT0_IRQHandler
385    .type SCT0_IRQHandler, %function
386SCT0_IRQHandler:
387    ldr   r0,=SCT0_DriverIRQHandler
388    bx    r0
389    .size SCT0_IRQHandler, . - SCT0_IRQHandler
390
391    .align 1
392    .thumb_func
393    .weak CTIMER3_IRQHandler
394    .type CTIMER3_IRQHandler, %function
395CTIMER3_IRQHandler:
396    ldr   r0,=CTIMER3_DriverIRQHandler
397    bx    r0
398    .size CTIMER3_IRQHandler, . - CTIMER3_IRQHandler
399
400    .align 1
401    .thumb_func
402    .weak FLEXCOMM0_IRQHandler
403    .type FLEXCOMM0_IRQHandler, %function
404FLEXCOMM0_IRQHandler:
405    ldr   r0,=FLEXCOMM0_DriverIRQHandler
406    bx    r0
407    .size FLEXCOMM0_IRQHandler, . - FLEXCOMM0_IRQHandler
408
409    .align 1
410    .thumb_func
411    .weak FLEXCOMM1_IRQHandler
412    .type FLEXCOMM1_IRQHandler, %function
413FLEXCOMM1_IRQHandler:
414    ldr   r0,=FLEXCOMM1_DriverIRQHandler
415    bx    r0
416    .size FLEXCOMM1_IRQHandler, . - FLEXCOMM1_IRQHandler
417
418    .align 1
419    .thumb_func
420    .weak FLEXCOMM2_IRQHandler
421    .type FLEXCOMM2_IRQHandler, %function
422FLEXCOMM2_IRQHandler:
423    ldr   r0,=FLEXCOMM2_DriverIRQHandler
424    bx    r0
425    .size FLEXCOMM2_IRQHandler, . - FLEXCOMM2_IRQHandler
426
427    .align 1
428    .thumb_func
429    .weak FLEXCOMM3_IRQHandler
430    .type FLEXCOMM3_IRQHandler, %function
431FLEXCOMM3_IRQHandler:
432    ldr   r0,=FLEXCOMM3_DriverIRQHandler
433    bx    r0
434    .size FLEXCOMM3_IRQHandler, . - FLEXCOMM3_IRQHandler
435
436    .align 1
437    .thumb_func
438    .weak FLEXCOMM4_IRQHandler
439    .type FLEXCOMM4_IRQHandler, %function
440FLEXCOMM4_IRQHandler:
441    ldr   r0,=FLEXCOMM4_DriverIRQHandler
442    bx    r0
443    .size FLEXCOMM4_IRQHandler, . - FLEXCOMM4_IRQHandler
444
445    .align 1
446    .thumb_func
447    .weak FLEXCOMM5_IRQHandler
448    .type FLEXCOMM5_IRQHandler, %function
449FLEXCOMM5_IRQHandler:
450    ldr   r0,=FLEXCOMM5_DriverIRQHandler
451    bx    r0
452    .size FLEXCOMM5_IRQHandler, . - FLEXCOMM5_IRQHandler
453
454    .align 1
455    .thumb_func
456    .weak FLEXCOMM14_IRQHandler
457    .type FLEXCOMM14_IRQHandler, %function
458FLEXCOMM14_IRQHandler:
459    ldr   r0,=FLEXCOMM14_DriverIRQHandler
460    bx    r0
461    .size FLEXCOMM14_IRQHandler, . - FLEXCOMM14_IRQHandler
462
463    .align 1
464    .thumb_func
465    .weak FLEXCOMM15_IRQHandler
466    .type FLEXCOMM15_IRQHandler, %function
467FLEXCOMM15_IRQHandler:
468    ldr   r0,=FLEXCOMM15_DriverIRQHandler
469    bx    r0
470    .size FLEXCOMM15_IRQHandler, . - FLEXCOMM15_IRQHandler
471
472    .align 1
473    .thumb_func
474    .weak ADC0_IRQHandler
475    .type ADC0_IRQHandler, %function
476ADC0_IRQHandler:
477    ldr   r0,=ADC0_DriverIRQHandler
478    bx    r0
479    .size ADC0_IRQHandler, . - ADC0_IRQHandler
480
481    .align 1
482    .thumb_func
483    .weak Reserved39_IRQHandler
484    .type Reserved39_IRQHandler, %function
485Reserved39_IRQHandler:
486    ldr   r0,=Reserved39_DriverIRQHandler
487    bx    r0
488    .size Reserved39_IRQHandler, . - Reserved39_IRQHandler
489
490    .align 1
491    .thumb_func
492    .weak ACMP_IRQHandler
493    .type ACMP_IRQHandler, %function
494ACMP_IRQHandler:
495    ldr   r0,=ACMP_DriverIRQHandler
496    bx    r0
497    .size ACMP_IRQHandler, . - ACMP_IRQHandler
498
499    .align 1
500    .thumb_func
501    .weak DMIC0_IRQHandler
502    .type DMIC0_IRQHandler, %function
503DMIC0_IRQHandler:
504    ldr   r0,=DMIC0_DriverIRQHandler
505    bx    r0
506    .size DMIC0_IRQHandler, . - DMIC0_IRQHandler
507
508    .align 1
509    .thumb_func
510    .weak Reserved42_IRQHandler
511    .type Reserved42_IRQHandler, %function
512Reserved42_IRQHandler:
513    ldr   r0,=Reserved42_DriverIRQHandler
514    bx    r0
515    .size Reserved42_IRQHandler, . - Reserved42_IRQHandler
516
517    .align 1
518    .thumb_func
519    .weak HYPERVISOR_IRQHandler
520    .type HYPERVISOR_IRQHandler, %function
521HYPERVISOR_IRQHandler:
522    ldr   r0,=HYPERVISOR_DriverIRQHandler
523    bx    r0
524    .size HYPERVISOR_IRQHandler, . - HYPERVISOR_IRQHandler
525
526    .align 1
527    .thumb_func
528    .weak SECUREVIOLATION_IRQHandler
529    .type SECUREVIOLATION_IRQHandler, %function
530SECUREVIOLATION_IRQHandler:
531    ldr   r0,=SECUREVIOLATION_DriverIRQHandler
532    bx    r0
533    .size SECUREVIOLATION_IRQHandler, . - SECUREVIOLATION_IRQHandler
534
535    .align 1
536    .thumb_func
537    .weak HWVAD0_IRQHandler
538    .type HWVAD0_IRQHandler, %function
539HWVAD0_IRQHandler:
540    ldr   r0,=HWVAD0_DriverIRQHandler
541    bx    r0
542    .size HWVAD0_IRQHandler, . - HWVAD0_IRQHandler
543
544    .align 1
545    .thumb_func
546    .weak Reserved46_IRQHandler
547    .type Reserved46_IRQHandler, %function
548Reserved46_IRQHandler:
549    ldr   r0,=Reserved46_DriverIRQHandler
550    bx    r0
551    .size Reserved46_IRQHandler, . - Reserved46_IRQHandler
552
553    .align 1
554    .thumb_func
555    .weak RNG_IRQHandler
556    .type RNG_IRQHandler, %function
557RNG_IRQHandler:
558    ldr   r0,=RNG_DriverIRQHandler
559    bx    r0
560    .size RNG_IRQHandler, . - RNG_IRQHandler
561
562    .align 1
563    .thumb_func
564    .weak RTC_IRQHandler
565    .type RTC_IRQHandler, %function
566RTC_IRQHandler:
567    ldr   r0,=RTC_DriverIRQHandler
568    bx    r0
569    .size RTC_IRQHandler, . - RTC_IRQHandler
570
571    .align 1
572    .thumb_func
573    .weak Reserved49_IRQHandler
574    .type Reserved49_IRQHandler, %function
575Reserved49_IRQHandler:
576    ldr   r0,=Reserved49_DriverIRQHandler
577    bx    r0
578    .size Reserved49_IRQHandler, . - Reserved49_IRQHandler
579
580    .align 1
581    .thumb_func
582    .weak MU_A_IRQHandler
583    .type MU_A_IRQHandler, %function
584MU_A_IRQHandler:
585    ldr   r0,=MU_A_DriverIRQHandler
586    bx    r0
587    .size MU_A_IRQHandler, . - MU_A_IRQHandler
588
589    .align 1
590    .thumb_func
591    .weak PIN_INT4_IRQHandler
592    .type PIN_INT4_IRQHandler, %function
593PIN_INT4_IRQHandler:
594    ldr   r0,=PIN_INT4_DriverIRQHandler
595    bx    r0
596    .size PIN_INT4_IRQHandler, . - PIN_INT4_IRQHandler
597
598    .align 1
599    .thumb_func
600    .weak PIN_INT5_IRQHandler
601    .type PIN_INT5_IRQHandler, %function
602PIN_INT5_IRQHandler:
603    ldr   r0,=PIN_INT5_DriverIRQHandler
604    bx    r0
605    .size PIN_INT5_IRQHandler, . - PIN_INT5_IRQHandler
606
607    .align 1
608    .thumb_func
609    .weak PIN_INT6_IRQHandler
610    .type PIN_INT6_IRQHandler, %function
611PIN_INT6_IRQHandler:
612    ldr   r0,=PIN_INT6_DriverIRQHandler
613    bx    r0
614    .size PIN_INT6_IRQHandler, . - PIN_INT6_IRQHandler
615
616    .align 1
617    .thumb_func
618    .weak PIN_INT7_IRQHandler
619    .type PIN_INT7_IRQHandler, %function
620PIN_INT7_IRQHandler:
621    ldr   r0,=PIN_INT7_DriverIRQHandler
622    bx    r0
623    .size PIN_INT7_IRQHandler, . - PIN_INT7_IRQHandler
624
625    .align 1
626    .thumb_func
627    .weak CTIMER2_IRQHandler
628    .type CTIMER2_IRQHandler, %function
629CTIMER2_IRQHandler:
630    ldr   r0,=CTIMER2_DriverIRQHandler
631    bx    r0
632    .size CTIMER2_IRQHandler, . - CTIMER2_IRQHandler
633
634    .align 1
635    .thumb_func
636    .weak CTIMER4_IRQHandler
637    .type CTIMER4_IRQHandler, %function
638CTIMER4_IRQHandler:
639    ldr   r0,=CTIMER4_DriverIRQHandler
640    bx    r0
641    .size CTIMER4_IRQHandler, . - CTIMER4_IRQHandler
642
643    .align 1
644    .thumb_func
645    .weak OS_EVENT_IRQHandler
646    .type OS_EVENT_IRQHandler, %function
647OS_EVENT_IRQHandler:
648    ldr   r0,=OS_EVENT_DriverIRQHandler
649    bx    r0
650    .size OS_EVENT_IRQHandler, . - OS_EVENT_IRQHandler
651
652    .align 1
653    .thumb_func
654    .weak FLEXSPI_IRQHandler
655    .type FLEXSPI_IRQHandler, %function
656FLEXSPI_IRQHandler:
657    ldr   r0,=FLEXSPI_DriverIRQHandler
658    bx    r0
659    .size FLEXSPI_IRQHandler, . - FLEXSPI_IRQHandler
660
661    .align 1
662    .thumb_func
663    .weak FLEXCOMM6_IRQHandler
664    .type FLEXCOMM6_IRQHandler, %function
665FLEXCOMM6_IRQHandler:
666    ldr   r0,=FLEXCOMM6_DriverIRQHandler
667    bx    r0
668    .size FLEXCOMM6_IRQHandler, . - FLEXCOMM6_IRQHandler
669
670    .align 1
671    .thumb_func
672    .weak FLEXCOMM7_IRQHandler
673    .type FLEXCOMM7_IRQHandler, %function
674FLEXCOMM7_IRQHandler:
675    ldr   r0,=FLEXCOMM7_DriverIRQHandler
676    bx    r0
677    .size FLEXCOMM7_IRQHandler, . - FLEXCOMM7_IRQHandler
678
679    .align 1
680    .thumb_func
681    .weak USDHC0_IRQHandler
682    .type USDHC0_IRQHandler, %function
683USDHC0_IRQHandler:
684    ldr   r0,=USDHC0_DriverIRQHandler
685    bx    r0
686    .size USDHC0_IRQHandler, . - USDHC0_IRQHandler
687
688    .align 1
689    .thumb_func
690    .weak USDHC1_IRQHandler
691    .type USDHC1_IRQHandler, %function
692USDHC1_IRQHandler:
693    ldr   r0,=USDHC1_DriverIRQHandler
694    bx    r0
695    .size USDHC1_IRQHandler, . - USDHC1_IRQHandler
696
697    .align 1
698    .thumb_func
699    .weak SGPIO_INTA_IRQHandler
700    .type SGPIO_INTA_IRQHandler, %function
701SGPIO_INTA_IRQHandler:
702    ldr   r0,=SGPIO_INTA_DriverIRQHandler
703    bx    r0
704    .size SGPIO_INTA_IRQHandler, . - SGPIO_INTA_IRQHandler
705
706    .align 1
707    .thumb_func
708    .weak SGPIO_INTB_IRQHandler
709    .type SGPIO_INTB_IRQHandler, %function
710SGPIO_INTB_IRQHandler:
711    ldr   r0,=SGPIO_INTB_DriverIRQHandler
712    bx    r0
713    .size SGPIO_INTB_IRQHandler, . - SGPIO_INTB_IRQHandler
714
715    .align 1
716    .thumb_func
717    .weak I3C0_IRQHandler
718    .type I3C0_IRQHandler, %function
719I3C0_IRQHandler:
720    ldr   r0,=I3C0_DriverIRQHandler
721    bx    r0
722    .size I3C0_IRQHandler, . - I3C0_IRQHandler
723
724    .align 1
725    .thumb_func
726    .weak USB_IRQHandler
727    .type USB_IRQHandler, %function
728USB_IRQHandler:
729    ldr   r0,=USB_DriverIRQHandler
730    bx    r0
731    .size USB_IRQHandler, . - USB_IRQHandler
732
733    .align 1
734    .thumb_func
735    .weak USB_WAKEUP_IRQHandler
736    .type USB_WAKEUP_IRQHandler, %function
737USB_WAKEUP_IRQHandler:
738    ldr   r0,=USB_WAKEUP_DriverIRQHandler
739    bx    r0
740    .size USB_WAKEUP_IRQHandler, . - USB_WAKEUP_IRQHandler
741
742    .align 1
743    .thumb_func
744    .weak WDT1_IRQHandler
745    .type WDT1_IRQHandler, %function
746WDT1_IRQHandler:
747    ldr   r0,=WDT1_DriverIRQHandler
748    bx    r0
749    .size WDT1_IRQHandler, . - WDT1_IRQHandler
750
751    .align 1
752    .thumb_func
753    .weak USBPHY_DCD_IRQHandler
754    .type USBPHY_DCD_IRQHandler, %function
755USBPHY_DCD_IRQHandler:
756    ldr   r0,=USBPHY_DCD_DriverIRQHandler
757    bx    r0
758    .size USBPHY_DCD_IRQHandler, . - USBPHY_DCD_IRQHandler
759
760    .align 1
761    .thumb_func
762    .weak DMA1_IRQHandler
763    .type DMA1_IRQHandler, %function
764DMA1_IRQHandler:
765    ldr   r0,=DMA1_DriverIRQHandler
766    bx    r0
767    .size DMA1_IRQHandler, . - DMA1_IRQHandler
768
769    .align 1
770    .thumb_func
771    .weak PUF_IRQHandler
772    .type PUF_IRQHandler, %function
773PUF_IRQHandler:
774    ldr   r0,=PUF_DriverIRQHandler
775    bx    r0
776    .size PUF_IRQHandler, . - PUF_IRQHandler
777
778    .align 1
779    .thumb_func
780    .weak POWERQUAD_IRQHandler
781    .type POWERQUAD_IRQHandler, %function
782POWERQUAD_IRQHandler:
783    ldr   r0,=POWERQUAD_DriverIRQHandler
784    bx    r0
785    .size POWERQUAD_IRQHandler, . - POWERQUAD_IRQHandler
786
787    .align 1
788    .thumb_func
789    .weak CASPER_IRQHandler
790    .type CASPER_IRQHandler, %function
791CASPER_IRQHandler:
792    ldr   r0,=CASPER_DriverIRQHandler
793    bx    r0
794    .size CASPER_IRQHandler, . - CASPER_IRQHandler
795
796    .align 1
797    .thumb_func
798    .weak PMC_PMIC_IRQHandler
799    .type PMC_PMIC_IRQHandler, %function
800PMC_PMIC_IRQHandler:
801    ldr   r0,=PMC_PMIC_DriverIRQHandler
802    bx    r0
803    .size PMC_PMIC_IRQHandler, . - PMC_PMIC_IRQHandler
804
805    .align 1
806    .thumb_func
807    .weak HASHCRYPT_IRQHandler
808    .type HASHCRYPT_IRQHandler, %function
809HASHCRYPT_IRQHandler:
810    ldr   r0,=HASHCRYPT_DriverIRQHandler
811    bx    r0
812    .size HASHCRYPT_IRQHandler, . - HASHCRYPT_IRQHandler
813
814/*    Macro to define default handlers. Default handler
815 *    will be weak symbol and just dead loops. They can be
816 *    overwritten by other handlers */
817    .macro def_irq_handler  handler_name
818    .weak \handler_name
819    .set  \handler_name, DefaultISR
820    .endm
821/* Exception Handlers */
822    def_irq_handler    MemManage_Handler
823    def_irq_handler    BusFault_Handler
824    def_irq_handler    UsageFault_Handler
825    def_irq_handler    SecureFault_Handler
826    def_irq_handler    DebugMon_Handler
827                def_irq_handler     WDT0_DriverIRQHandler
828                def_irq_handler     DMA0_DriverIRQHandler
829                def_irq_handler     GPIO_INTA_DriverIRQHandler
830                def_irq_handler     GPIO_INTB_DriverIRQHandler
831                def_irq_handler     PIN_INT0_DriverIRQHandler
832                def_irq_handler     PIN_INT1_DriverIRQHandler
833                def_irq_handler     PIN_INT2_DriverIRQHandler
834                def_irq_handler     PIN_INT3_DriverIRQHandler
835                def_irq_handler     UTICK0_DriverIRQHandler
836                def_irq_handler     MRT0_DriverIRQHandler
837                def_irq_handler     CTIMER0_DriverIRQHandler
838                def_irq_handler     CTIMER1_DriverIRQHandler
839                def_irq_handler     SCT0_DriverIRQHandler
840                def_irq_handler     CTIMER3_DriverIRQHandler
841                def_irq_handler     FLEXCOMM0_DriverIRQHandler
842                def_irq_handler     FLEXCOMM1_DriverIRQHandler
843                def_irq_handler     FLEXCOMM2_DriverIRQHandler
844                def_irq_handler     FLEXCOMM3_DriverIRQHandler
845                def_irq_handler     FLEXCOMM4_DriverIRQHandler
846                def_irq_handler     FLEXCOMM5_DriverIRQHandler
847                def_irq_handler     FLEXCOMM14_DriverIRQHandler
848                def_irq_handler     FLEXCOMM15_DriverIRQHandler
849                def_irq_handler     ADC0_DriverIRQHandler
850                def_irq_handler     Reserved39_DriverIRQHandler
851                def_irq_handler     ACMP_DriverIRQHandler
852                def_irq_handler     DMIC0_DriverIRQHandler
853                def_irq_handler     Reserved42_DriverIRQHandler
854                def_irq_handler     HYPERVISOR_DriverIRQHandler
855                def_irq_handler     SECUREVIOLATION_DriverIRQHandler
856                def_irq_handler     HWVAD0_DriverIRQHandler
857                def_irq_handler     Reserved46_DriverIRQHandler
858                def_irq_handler     RNG_DriverIRQHandler
859                def_irq_handler     RTC_DriverIRQHandler
860                def_irq_handler     Reserved49_DriverIRQHandler
861                def_irq_handler     MU_A_DriverIRQHandler
862                def_irq_handler     PIN_INT4_DriverIRQHandler
863                def_irq_handler     PIN_INT5_DriverIRQHandler
864                def_irq_handler     PIN_INT6_DriverIRQHandler
865                def_irq_handler     PIN_INT7_DriverIRQHandler
866                def_irq_handler     CTIMER2_DriverIRQHandler
867                def_irq_handler     CTIMER4_DriverIRQHandler
868                def_irq_handler     OS_EVENT_DriverIRQHandler
869                def_irq_handler     FLEXSPI_DriverIRQHandler
870                def_irq_handler     FLEXCOMM6_DriverIRQHandler
871                def_irq_handler     FLEXCOMM7_DriverIRQHandler
872                def_irq_handler     USDHC0_DriverIRQHandler
873                def_irq_handler     USDHC1_DriverIRQHandler
874                def_irq_handler     SGPIO_INTA_DriverIRQHandler
875                def_irq_handler     SGPIO_INTB_DriverIRQHandler
876                def_irq_handler     I3C0_DriverIRQHandler
877                def_irq_handler     USB_DriverIRQHandler
878                def_irq_handler     USB_WAKEUP_DriverIRQHandler
879                def_irq_handler     WDT1_DriverIRQHandler
880                def_irq_handler     USBPHY_DCD_DriverIRQHandler
881                def_irq_handler     DMA1_DriverIRQHandler
882                def_irq_handler     PUF_DriverIRQHandler
883                def_irq_handler     POWERQUAD_DriverIRQHandler
884                def_irq_handler     CASPER_DriverIRQHandler
885                def_irq_handler     PMC_PMIC_DriverIRQHandler
886                def_irq_handler     HASHCRYPT_DriverIRQHandler
887
888    .end
889