1/* --------------------------------------------------------------------------*/
2/* @file:    startup_MIMXRT595S_cm33.s                                                */
3/* @purpose: CMSIS Cortex-M33 Core Device Startup File                       */
4/*           MIMXRT595S_cm33                                                          */
5/* @version: 5.0                                                      */
6/* @date:    2020-8-27                                                         */
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   0x280000                                        /* 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  /* Watchdog timer interrupt */
49    .long   DMA0_IRQHandler  /* DMA interrupt */
50    .long   GPIO_INTA_IRQHandler  /* GPIO Interrupt A */
51    .long   GPIO_INTB_IRQHandler  /* GPIO Interrupt B */
52    .long   PIN_INT0_IRQHandler  /* General Purpose Input/Output interrupt 0 */
53    .long   PIN_INT1_IRQHandler  /* General Purpose Input/Output interrupt 1 */
54    .long   PIN_INT2_IRQHandler  /* General Purpose Input/Output interrupt 2 */
55    .long   PIN_INT3_IRQHandler  /* General Purpose Input/Output interrupt 3 */
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 interrupt */
63    .long   FLEXCOMM1_IRQHandler  /* FlexComm interrupt */
64    .long   FLEXCOMM2_IRQHandler  /* FlexComm interrupt */
65    .long   FLEXCOMM3_IRQHandler  /* FlexComm interrupt */
66    .long   FLEXCOMM4_IRQHandler  /* FlexComm interrupt */
67    .long   FLEXCOMM5_IRQHandler  /* FlexComm interrupt */
68    .long   FLEXCOMM14_IRQHandler  /* FlexComm interrupt. Standalone SPI */
69    .long   FLEXCOMM15_IRQHandler  /* FlexComm interrupt. Standalone I2C */
70    .long   ADC0_IRQHandler  /* Analog-to-Digital Converter interrupt */
71    .long   Reserved39_IRQHandler  /* Reserved interrupt */
72    .long   ACMP_IRQHandler  /* Analog comparator Interrupts */
73    .long   DMIC0_IRQHandler  /* Digital Microphone Interface interrupt */
74    .long   Reserved42_IRQHandler  /* Reserved interrupt */
75    .long   HYPERVISOR_IRQHandler  /* Hypervisor interrupt */
76    .long   SECURE_VIOLATION_IRQHandler  /* Secure violation interrupt */
77    .long   HWVAD0_IRQHandler  /* Hardware Voice Activity Detector interrupt */
78    .long   Reserved46_IRQHandler  /* Reserved interrupt */
79    .long   RNG_IRQHandler  /* Random Number Generator interrupt */
80    .long   RTC_IRQHandler  /* Real Time Clock Alarm interrupt OR Wakeup timer interrupt */
81    .long   DSP_TIE_EXPSTATE1_IRQHandler  /* DSP interrupt */
82    .long   MU_A_IRQHandler  /* Messaging Unit - Side A */
83    .long   PIN_INT4_IRQHandler  /* General Purpose Input/Output interrupt 4 */
84    .long   PIN_INT5_IRQHandler  /* General Purpose Input/Output interrupt 5 */
85    .long   PIN_INT6_IRQHandler  /* General Purpose Input/Output interrupt 6 */
86    .long   PIN_INT7_IRQHandler  /* General Purpose Input/Output interrupt 7 */
87    .long   CTIMER2_IRQHandler  /* Standard counter/timer CTIMER2 */
88    .long   CTIMER4_IRQHandler  /* Standard counter/timer CTIMER4 */
89    .long   OS_EVENT_IRQHandler  /* Event timer M33 Wakeup/interrupt */
90    .long   FLEXSPI0_FLEXSPI1_IRQHandler  /* FlexSPI0_IRQ OR FlexSPI1_IRQ */
91    .long   FLEXCOMM6_IRQHandler  /* FlexComm interrupt */
92    .long   FLEXCOMM7_IRQHandler  /* FlexComm interrupt */
93    .long   USDHC0_IRQHandler  /* USDHC interrupt */
94    .long   USDHC1_IRQHandler  /* USDHC interrupt */
95    .long   SGPIO_INTA_IRQHandler  /* Secure GPIO HS interrupt 0 */
96    .long   SGPIO_INTB_IRQHandler  /* Secure GPIO HS interrupt 1 */
97    .long   I3C0_IRQHandler  /* Improved Inter Integrated Circuit 0 interrupt */
98    .long   USB0_IRQHandler  /* USB device */
99    .long   USB0_NEEDCLK_IRQHandler  /* USB Activity Wake-up Interrupt */
100    .long   WDT1_IRQHandler  /* Watchdog timer 1 interrupt */
101    .long   USB_PHYDCD_IRQHandler  /* USBPHY DCD interrupt */
102    .long   DMA1_IRQHandler  /* DMA interrupt */
103    .long   PUF_IRQHandler  /* QuidKey interrupt */
104    .long   POWERQUAD_IRQHandler  /* Powerquad interrupt */
105    .long   CASPER_IRQHandler  /* Caspar interrupt */
106    .long   PMU_PMIC_IRQHandler  /* Power Management Control interrupt */
107    .long   HASHCRYPT_IRQHandler  /* SHA interrupt */
108    .long   FLEXCOMM8_IRQHandler  /* FlexComm interrupt */
109    .long   FLEXCOMM9_IRQHandler  /* FlexComm interrupt */
110    .long   FLEXCOMM10_IRQHandler  /* FlexComm interrupt */
111    .long   FLEXCOMM11_IRQHandler  /* FlexComm interrupt */
112    .long   FLEXCOMM12_IRQHandler  /* FlexComm interrupt */
113    .long   FLEXCOMM13_IRQHandler  /* FlexComm interrupt */
114    .long   FLEXCOMM16_IRQHandler  /* FlexComm interrupt */
115    .long   I3C1_IRQHandler  /* Improved Inter Integrated Circuit 1 interrupt */
116    .long   FLEXIO_IRQHandler  /* Flexible I/O interrupt */
117    .long   LCDIF_IRQHandler  /* Liquid Crystal Display interface interrupt */
118    .long   GPU_IRQHandler  /* Graphics Processor Unit interrupt */
119    .long   MIPI_IRQHandler  /* MIPI interrupt */
120    .long   Reserved88_IRQHandler  /*  */
121    .long   SDMA_IRQHandler  /* Smart DMA Engine Controller interrupt */
122
123    .size    __isr_vector, . - __isr_vector
124
125    .text
126    .thumb
127
128/* Reset Handler */
129    .thumb_func
130    .align 2
131    .globl   Reset_Handler
132    .weak    Reset_Handler
133    .type    Reset_Handler, %function
134Reset_Handler:
135    cpsid   i               /* Mask interrupts */
136    .equ    VTOR, 0xE000ED08
137    ldr     r0, =VTOR
138    ldr     r1, =__isr_vector
139    str     r1, [r0]
140    ldr     r2, [r1]
141    msr     msp, r2
142    ldr     r0, =__StackLimit
143    msr     msplim, r0
144#ifndef __NO_SYSTEM_INIT
145    ldr   r0,=SystemInit
146    blx   r0
147#endif
148/*     Loop to copy data from read only memory to RAM. The ranges
149 *      of copy from/to are specified by following symbols evaluated in
150 *      linker script.
151 *      __etext: End of code section, i.e., begin of data sections to copy from.
152 *      __data_start__/__data_end__: RAM address range that data should be
153 *      copied to. Both must be aligned to 4 bytes boundary.  */
154
155    ldr    r1, =__etext
156    ldr    r2, =__data_start__
157    ldr    r3, =__data_end__
158
159#if 1
160/* Here are two copies of loop implemenations. First one favors code size
161 * and the second one favors performance. Default uses the first one.
162 * Change to "#if 0" to use the second one */
163.LC0:
164    cmp     r2, r3
165    ittt    lt
166    ldrlt   r0, [r1], #4
167    strlt   r0, [r2], #4
168    blt    .LC0
169#else
170    subs    r3, r2
171    ble    .LC1
172.LC0:
173    subs    r3, #4
174    ldr    r0, [r1, r3]
175    str    r0, [r2, r3]
176    bgt    .LC0
177.LC1:
178#endif
179
180#ifdef __STARTUP_CLEAR_BSS
181/*     This part of work usually is done in C library startup code. Otherwise,
182 *     define this macro to enable it in this startup.
183 *
184 *     Loop to zero out BSS section, which uses following symbols
185 *     in linker script:
186 *      __bss_start__: start of BSS section. Must align to 4
187 *      __bss_end__: end of BSS section. Must align to 4
188 */
189    ldr r1, =__bss_start__
190    ldr r2, =__bss_end__
191
192    movs    r0, 0
193.LC2:
194    cmp     r1, r2
195    itt    lt
196    strlt   r0, [r1], #4
197    blt    .LC2
198#endif /* __STARTUP_CLEAR_BSS */
199
200/* Add stack / heap initializaiton */
201    movs    r0, 0
202    ldr     r1, =__HeapBase
203    ldr     r2, =__HeapLimit
204.LC3:
205    cmp     r1, r2
206    itt     lt
207    strlt   r0, [r1], #4
208    blt     .LC3
209
210    ldr     r1, =__StackLimit
211    ldr     r2, =__StackTop
212.LC4:
213    cmp     r1, r2
214    itt     lt
215    strlt   r0, [r1], #4
216    blt     .LC4
217/*End of stack / heap initializaiton */
218    cpsie   i               /* Unmask interrupts */
219
220#ifndef __START
221#define __START _start
222#endif
223#ifndef __ATOLLIC__
224    ldr   r0,=__START
225    blx   r0
226#else
227    ldr   r0,=__libc_init_array
228    blx   r0
229    ldr   r0,=main
230    bx    r0
231#endif
232    .pool
233    .size Reset_Handler, . - Reset_Handler
234
235    .align  1
236    .thumb_func
237    .weak DefaultISR
238    .type DefaultISR, %function
239DefaultISR:
240    b DefaultISR
241    .size DefaultISR, . - DefaultISR
242
243    .align 1
244    .thumb_func
245    .weak NMI_Handler
246    .type NMI_Handler, %function
247NMI_Handler:
248    ldr   r0,=NMI_Handler
249    bx    r0
250    .size NMI_Handler, . - NMI_Handler
251
252    .align 1
253    .thumb_func
254    .weak HardFault_Handler
255    .type HardFault_Handler, %function
256HardFault_Handler:
257    ldr   r0,=HardFault_Handler
258    bx    r0
259    .size HardFault_Handler, . - HardFault_Handler
260
261    .align 1
262    .thumb_func
263    .weak SVC_Handler
264    .type SVC_Handler, %function
265SVC_Handler:
266    ldr   r0,=SVC_Handler
267    bx    r0
268    .size SVC_Handler, . - SVC_Handler
269
270    .align 1
271    .thumb_func
272    .weak PendSV_Handler
273    .type PendSV_Handler, %function
274PendSV_Handler:
275    ldr   r0,=PendSV_Handler
276    bx    r0
277    .size PendSV_Handler, . - PendSV_Handler
278
279    .align 1
280    .thumb_func
281    .weak SysTick_Handler
282    .type SysTick_Handler, %function
283SysTick_Handler:
284    ldr   r0,=SysTick_Handler
285    bx    r0
286    .size SysTick_Handler, . - SysTick_Handler
287
288    .align 1
289    .thumb_func
290    .weak WDT0_IRQHandler
291    .type WDT0_IRQHandler, %function
292WDT0_IRQHandler:
293    ldr   r0,=WDT0_DriverIRQHandler
294    bx    r0
295    .size WDT0_IRQHandler, . - WDT0_IRQHandler
296
297    .align 1
298    .thumb_func
299    .weak DMA0_IRQHandler
300    .type DMA0_IRQHandler, %function
301DMA0_IRQHandler:
302    ldr   r0,=DMA0_DriverIRQHandler
303    bx    r0
304    .size DMA0_IRQHandler, . - DMA0_IRQHandler
305
306    .align 1
307    .thumb_func
308    .weak GPIO_INTA_IRQHandler
309    .type GPIO_INTA_IRQHandler, %function
310GPIO_INTA_IRQHandler:
311    ldr   r0,=GPIO_INTA_DriverIRQHandler
312    bx    r0
313    .size GPIO_INTA_IRQHandler, . - GPIO_INTA_IRQHandler
314
315    .align 1
316    .thumb_func
317    .weak GPIO_INTB_IRQHandler
318    .type GPIO_INTB_IRQHandler, %function
319GPIO_INTB_IRQHandler:
320    ldr   r0,=GPIO_INTB_DriverIRQHandler
321    bx    r0
322    .size GPIO_INTB_IRQHandler, . - GPIO_INTB_IRQHandler
323
324    .align 1
325    .thumb_func
326    .weak PIN_INT0_IRQHandler
327    .type PIN_INT0_IRQHandler, %function
328PIN_INT0_IRQHandler:
329    ldr   r0,=PIN_INT0_DriverIRQHandler
330    bx    r0
331    .size PIN_INT0_IRQHandler, . - PIN_INT0_IRQHandler
332
333    .align 1
334    .thumb_func
335    .weak PIN_INT1_IRQHandler
336    .type PIN_INT1_IRQHandler, %function
337PIN_INT1_IRQHandler:
338    ldr   r0,=PIN_INT1_DriverIRQHandler
339    bx    r0
340    .size PIN_INT1_IRQHandler, . - PIN_INT1_IRQHandler
341
342    .align 1
343    .thumb_func
344    .weak PIN_INT2_IRQHandler
345    .type PIN_INT2_IRQHandler, %function
346PIN_INT2_IRQHandler:
347    ldr   r0,=PIN_INT2_DriverIRQHandler
348    bx    r0
349    .size PIN_INT2_IRQHandler, . - PIN_INT2_IRQHandler
350
351    .align 1
352    .thumb_func
353    .weak PIN_INT3_IRQHandler
354    .type PIN_INT3_IRQHandler, %function
355PIN_INT3_IRQHandler:
356    ldr   r0,=PIN_INT3_DriverIRQHandler
357    bx    r0
358    .size PIN_INT3_IRQHandler, . - PIN_INT3_IRQHandler
359
360    .align 1
361    .thumb_func
362    .weak UTICK0_IRQHandler
363    .type UTICK0_IRQHandler, %function
364UTICK0_IRQHandler:
365    ldr   r0,=UTICK0_DriverIRQHandler
366    bx    r0
367    .size UTICK0_IRQHandler, . - UTICK0_IRQHandler
368
369    .align 1
370    .thumb_func
371    .weak MRT0_IRQHandler
372    .type MRT0_IRQHandler, %function
373MRT0_IRQHandler:
374    ldr   r0,=MRT0_DriverIRQHandler
375    bx    r0
376    .size MRT0_IRQHandler, . - MRT0_IRQHandler
377
378    .align 1
379    .thumb_func
380    .weak CTIMER0_IRQHandler
381    .type CTIMER0_IRQHandler, %function
382CTIMER0_IRQHandler:
383    ldr   r0,=CTIMER0_DriverIRQHandler
384    bx    r0
385    .size CTIMER0_IRQHandler, . - CTIMER0_IRQHandler
386
387    .align 1
388    .thumb_func
389    .weak CTIMER1_IRQHandler
390    .type CTIMER1_IRQHandler, %function
391CTIMER1_IRQHandler:
392    ldr   r0,=CTIMER1_DriverIRQHandler
393    bx    r0
394    .size CTIMER1_IRQHandler, . - CTIMER1_IRQHandler
395
396    .align 1
397    .thumb_func
398    .weak SCT0_IRQHandler
399    .type SCT0_IRQHandler, %function
400SCT0_IRQHandler:
401    ldr   r0,=SCT0_DriverIRQHandler
402    bx    r0
403    .size SCT0_IRQHandler, . - SCT0_IRQHandler
404
405    .align 1
406    .thumb_func
407    .weak CTIMER3_IRQHandler
408    .type CTIMER3_IRQHandler, %function
409CTIMER3_IRQHandler:
410    ldr   r0,=CTIMER3_DriverIRQHandler
411    bx    r0
412    .size CTIMER3_IRQHandler, . - CTIMER3_IRQHandler
413
414    .align 1
415    .thumb_func
416    .weak FLEXCOMM0_IRQHandler
417    .type FLEXCOMM0_IRQHandler, %function
418FLEXCOMM0_IRQHandler:
419    ldr   r0,=FLEXCOMM0_DriverIRQHandler
420    bx    r0
421    .size FLEXCOMM0_IRQHandler, . - FLEXCOMM0_IRQHandler
422
423    .align 1
424    .thumb_func
425    .weak FLEXCOMM1_IRQHandler
426    .type FLEXCOMM1_IRQHandler, %function
427FLEXCOMM1_IRQHandler:
428    ldr   r0,=FLEXCOMM1_DriverIRQHandler
429    bx    r0
430    .size FLEXCOMM1_IRQHandler, . - FLEXCOMM1_IRQHandler
431
432    .align 1
433    .thumb_func
434    .weak FLEXCOMM2_IRQHandler
435    .type FLEXCOMM2_IRQHandler, %function
436FLEXCOMM2_IRQHandler:
437    ldr   r0,=FLEXCOMM2_DriverIRQHandler
438    bx    r0
439    .size FLEXCOMM2_IRQHandler, . - FLEXCOMM2_IRQHandler
440
441    .align 1
442    .thumb_func
443    .weak FLEXCOMM3_IRQHandler
444    .type FLEXCOMM3_IRQHandler, %function
445FLEXCOMM3_IRQHandler:
446    ldr   r0,=FLEXCOMM3_DriverIRQHandler
447    bx    r0
448    .size FLEXCOMM3_IRQHandler, . - FLEXCOMM3_IRQHandler
449
450    .align 1
451    .thumb_func
452    .weak FLEXCOMM4_IRQHandler
453    .type FLEXCOMM4_IRQHandler, %function
454FLEXCOMM4_IRQHandler:
455    ldr   r0,=FLEXCOMM4_DriverIRQHandler
456    bx    r0
457    .size FLEXCOMM4_IRQHandler, . - FLEXCOMM4_IRQHandler
458
459    .align 1
460    .thumb_func
461    .weak FLEXCOMM5_IRQHandler
462    .type FLEXCOMM5_IRQHandler, %function
463FLEXCOMM5_IRQHandler:
464    ldr   r0,=FLEXCOMM5_DriverIRQHandler
465    bx    r0
466    .size FLEXCOMM5_IRQHandler, . - FLEXCOMM5_IRQHandler
467
468    .align 1
469    .thumb_func
470    .weak FLEXCOMM14_IRQHandler
471    .type FLEXCOMM14_IRQHandler, %function
472FLEXCOMM14_IRQHandler:
473    ldr   r0,=FLEXCOMM14_DriverIRQHandler
474    bx    r0
475    .size FLEXCOMM14_IRQHandler, . - FLEXCOMM14_IRQHandler
476
477    .align 1
478    .thumb_func
479    .weak FLEXCOMM15_IRQHandler
480    .type FLEXCOMM15_IRQHandler, %function
481FLEXCOMM15_IRQHandler:
482    ldr   r0,=FLEXCOMM15_DriverIRQHandler
483    bx    r0
484    .size FLEXCOMM15_IRQHandler, . - FLEXCOMM15_IRQHandler
485
486    .align 1
487    .thumb_func
488    .weak ADC0_IRQHandler
489    .type ADC0_IRQHandler, %function
490ADC0_IRQHandler:
491    ldr   r0,=ADC0_DriverIRQHandler
492    bx    r0
493    .size ADC0_IRQHandler, . - ADC0_IRQHandler
494
495    .align 1
496    .thumb_func
497    .weak Reserved39_IRQHandler
498    .type Reserved39_IRQHandler, %function
499Reserved39_IRQHandler:
500    ldr   r0,=Reserved39_DriverIRQHandler
501    bx    r0
502    .size Reserved39_IRQHandler, . - Reserved39_IRQHandler
503
504    .align 1
505    .thumb_func
506    .weak ACMP_IRQHandler
507    .type ACMP_IRQHandler, %function
508ACMP_IRQHandler:
509    ldr   r0,=ACMP_DriverIRQHandler
510    bx    r0
511    .size ACMP_IRQHandler, . - ACMP_IRQHandler
512
513    .align 1
514    .thumb_func
515    .weak DMIC0_IRQHandler
516    .type DMIC0_IRQHandler, %function
517DMIC0_IRQHandler:
518    ldr   r0,=DMIC0_DriverIRQHandler
519    bx    r0
520    .size DMIC0_IRQHandler, . - DMIC0_IRQHandler
521
522    .align 1
523    .thumb_func
524    .weak Reserved42_IRQHandler
525    .type Reserved42_IRQHandler, %function
526Reserved42_IRQHandler:
527    ldr   r0,=Reserved42_DriverIRQHandler
528    bx    r0
529    .size Reserved42_IRQHandler, . - Reserved42_IRQHandler
530
531    .align 1
532    .thumb_func
533    .weak HYPERVISOR_IRQHandler
534    .type HYPERVISOR_IRQHandler, %function
535HYPERVISOR_IRQHandler:
536    ldr   r0,=HYPERVISOR_DriverIRQHandler
537    bx    r0
538    .size HYPERVISOR_IRQHandler, . - HYPERVISOR_IRQHandler
539
540    .align 1
541    .thumb_func
542    .weak SECURE_VIOLATION_IRQHandler
543    .type SECURE_VIOLATION_IRQHandler, %function
544SECURE_VIOLATION_IRQHandler:
545    ldr   r0,=SECURE_VIOLATION_DriverIRQHandler
546    bx    r0
547    .size SECURE_VIOLATION_IRQHandler, . - SECURE_VIOLATION_IRQHandler
548
549    .align 1
550    .thumb_func
551    .weak HWVAD0_IRQHandler
552    .type HWVAD0_IRQHandler, %function
553HWVAD0_IRQHandler:
554    ldr   r0,=HWVAD0_DriverIRQHandler
555    bx    r0
556    .size HWVAD0_IRQHandler, . - HWVAD0_IRQHandler
557
558    .align 1
559    .thumb_func
560    .weak Reserved46_IRQHandler
561    .type Reserved46_IRQHandler, %function
562Reserved46_IRQHandler:
563    ldr   r0,=Reserved46_DriverIRQHandler
564    bx    r0
565    .size Reserved46_IRQHandler, . - Reserved46_IRQHandler
566
567    .align 1
568    .thumb_func
569    .weak RNG_IRQHandler
570    .type RNG_IRQHandler, %function
571RNG_IRQHandler:
572    ldr   r0,=RNG_DriverIRQHandler
573    bx    r0
574    .size RNG_IRQHandler, . - RNG_IRQHandler
575
576    .align 1
577    .thumb_func
578    .weak RTC_IRQHandler
579    .type RTC_IRQHandler, %function
580RTC_IRQHandler:
581    ldr   r0,=RTC_DriverIRQHandler
582    bx    r0
583    .size RTC_IRQHandler, . - RTC_IRQHandler
584
585    .align 1
586    .thumb_func
587    .weak DSP_TIE_EXPSTATE1_IRQHandler
588    .type DSP_TIE_EXPSTATE1_IRQHandler, %function
589DSP_TIE_EXPSTATE1_IRQHandler:
590    ldr   r0,=DSP_TIE_EXPSTATE1_DriverIRQHandler
591    bx    r0
592    .size DSP_TIE_EXPSTATE1_IRQHandler, . - DSP_TIE_EXPSTATE1_IRQHandler
593
594    .align 1
595    .thumb_func
596    .weak MU_A_IRQHandler
597    .type MU_A_IRQHandler, %function
598MU_A_IRQHandler:
599    ldr   r0,=MU_A_DriverIRQHandler
600    bx    r0
601    .size MU_A_IRQHandler, . - MU_A_IRQHandler
602
603    .align 1
604    .thumb_func
605    .weak PIN_INT4_IRQHandler
606    .type PIN_INT4_IRQHandler, %function
607PIN_INT4_IRQHandler:
608    ldr   r0,=PIN_INT4_DriverIRQHandler
609    bx    r0
610    .size PIN_INT4_IRQHandler, . - PIN_INT4_IRQHandler
611
612    .align 1
613    .thumb_func
614    .weak PIN_INT5_IRQHandler
615    .type PIN_INT5_IRQHandler, %function
616PIN_INT5_IRQHandler:
617    ldr   r0,=PIN_INT5_DriverIRQHandler
618    bx    r0
619    .size PIN_INT5_IRQHandler, . - PIN_INT5_IRQHandler
620
621    .align 1
622    .thumb_func
623    .weak PIN_INT6_IRQHandler
624    .type PIN_INT6_IRQHandler, %function
625PIN_INT6_IRQHandler:
626    ldr   r0,=PIN_INT6_DriverIRQHandler
627    bx    r0
628    .size PIN_INT6_IRQHandler, . - PIN_INT6_IRQHandler
629
630    .align 1
631    .thumb_func
632    .weak PIN_INT7_IRQHandler
633    .type PIN_INT7_IRQHandler, %function
634PIN_INT7_IRQHandler:
635    ldr   r0,=PIN_INT7_DriverIRQHandler
636    bx    r0
637    .size PIN_INT7_IRQHandler, . - PIN_INT7_IRQHandler
638
639    .align 1
640    .thumb_func
641    .weak CTIMER2_IRQHandler
642    .type CTIMER2_IRQHandler, %function
643CTIMER2_IRQHandler:
644    ldr   r0,=CTIMER2_DriverIRQHandler
645    bx    r0
646    .size CTIMER2_IRQHandler, . - CTIMER2_IRQHandler
647
648    .align 1
649    .thumb_func
650    .weak CTIMER4_IRQHandler
651    .type CTIMER4_IRQHandler, %function
652CTIMER4_IRQHandler:
653    ldr   r0,=CTIMER4_DriverIRQHandler
654    bx    r0
655    .size CTIMER4_IRQHandler, . - CTIMER4_IRQHandler
656
657    .align 1
658    .thumb_func
659    .weak OS_EVENT_IRQHandler
660    .type OS_EVENT_IRQHandler, %function
661OS_EVENT_IRQHandler:
662    ldr   r0,=OS_EVENT_DriverIRQHandler
663    bx    r0
664    .size OS_EVENT_IRQHandler, . - OS_EVENT_IRQHandler
665
666    .align 1
667    .thumb_func
668    .weak FLEXSPI0_FLEXSPI1_IRQHandler
669    .type FLEXSPI0_FLEXSPI1_IRQHandler, %function
670FLEXSPI0_FLEXSPI1_IRQHandler:
671    ldr   r0,=FLEXSPI0_FLEXSPI1_DriverIRQHandler
672    bx    r0
673    .size FLEXSPI0_FLEXSPI1_IRQHandler, . - FLEXSPI0_FLEXSPI1_IRQHandler
674
675    .align 1
676    .thumb_func
677    .weak FLEXCOMM6_IRQHandler
678    .type FLEXCOMM6_IRQHandler, %function
679FLEXCOMM6_IRQHandler:
680    ldr   r0,=FLEXCOMM6_DriverIRQHandler
681    bx    r0
682    .size FLEXCOMM6_IRQHandler, . - FLEXCOMM6_IRQHandler
683
684    .align 1
685    .thumb_func
686    .weak FLEXCOMM7_IRQHandler
687    .type FLEXCOMM7_IRQHandler, %function
688FLEXCOMM7_IRQHandler:
689    ldr   r0,=FLEXCOMM7_DriverIRQHandler
690    bx    r0
691    .size FLEXCOMM7_IRQHandler, . - FLEXCOMM7_IRQHandler
692
693    .align 1
694    .thumb_func
695    .weak USDHC0_IRQHandler
696    .type USDHC0_IRQHandler, %function
697USDHC0_IRQHandler:
698    ldr   r0,=USDHC0_DriverIRQHandler
699    bx    r0
700    .size USDHC0_IRQHandler, . - USDHC0_IRQHandler
701
702    .align 1
703    .thumb_func
704    .weak USDHC1_IRQHandler
705    .type USDHC1_IRQHandler, %function
706USDHC1_IRQHandler:
707    ldr   r0,=USDHC1_DriverIRQHandler
708    bx    r0
709    .size USDHC1_IRQHandler, . - USDHC1_IRQHandler
710
711    .align 1
712    .thumb_func
713    .weak SGPIO_INTA_IRQHandler
714    .type SGPIO_INTA_IRQHandler, %function
715SGPIO_INTA_IRQHandler:
716    ldr   r0,=SGPIO_INTA_DriverIRQHandler
717    bx    r0
718    .size SGPIO_INTA_IRQHandler, . - SGPIO_INTA_IRQHandler
719
720    .align 1
721    .thumb_func
722    .weak SGPIO_INTB_IRQHandler
723    .type SGPIO_INTB_IRQHandler, %function
724SGPIO_INTB_IRQHandler:
725    ldr   r0,=SGPIO_INTB_DriverIRQHandler
726    bx    r0
727    .size SGPIO_INTB_IRQHandler, . - SGPIO_INTB_IRQHandler
728
729    .align 1
730    .thumb_func
731    .weak I3C0_IRQHandler
732    .type I3C0_IRQHandler, %function
733I3C0_IRQHandler:
734    ldr   r0,=I3C0_DriverIRQHandler
735    bx    r0
736    .size I3C0_IRQHandler, . - I3C0_IRQHandler
737
738    .align 1
739    .thumb_func
740    .weak USB0_IRQHandler
741    .type USB0_IRQHandler, %function
742USB0_IRQHandler:
743    ldr   r0,=USB0_DriverIRQHandler
744    bx    r0
745    .size USB0_IRQHandler, . - USB0_IRQHandler
746
747    .align 1
748    .thumb_func
749    .weak USB0_NEEDCLK_IRQHandler
750    .type USB0_NEEDCLK_IRQHandler, %function
751USB0_NEEDCLK_IRQHandler:
752    ldr   r0,=USB0_NEEDCLK_DriverIRQHandler
753    bx    r0
754    .size USB0_NEEDCLK_IRQHandler, . - USB0_NEEDCLK_IRQHandler
755
756    .align 1
757    .thumb_func
758    .weak WDT1_IRQHandler
759    .type WDT1_IRQHandler, %function
760WDT1_IRQHandler:
761    ldr   r0,=WDT1_DriverIRQHandler
762    bx    r0
763    .size WDT1_IRQHandler, . - WDT1_IRQHandler
764
765    .align 1
766    .thumb_func
767    .weak USB_PHYDCD_IRQHandler
768    .type USB_PHYDCD_IRQHandler, %function
769USB_PHYDCD_IRQHandler:
770    ldr   r0,=USB_PHYDCD_DriverIRQHandler
771    bx    r0
772    .size USB_PHYDCD_IRQHandler, . - USB_PHYDCD_IRQHandler
773
774    .align 1
775    .thumb_func
776    .weak DMA1_IRQHandler
777    .type DMA1_IRQHandler, %function
778DMA1_IRQHandler:
779    ldr   r0,=DMA1_DriverIRQHandler
780    bx    r0
781    .size DMA1_IRQHandler, . - DMA1_IRQHandler
782
783    .align 1
784    .thumb_func
785    .weak PUF_IRQHandler
786    .type PUF_IRQHandler, %function
787PUF_IRQHandler:
788    ldr   r0,=PUF_DriverIRQHandler
789    bx    r0
790    .size PUF_IRQHandler, . - PUF_IRQHandler
791
792    .align 1
793    .thumb_func
794    .weak POWERQUAD_IRQHandler
795    .type POWERQUAD_IRQHandler, %function
796POWERQUAD_IRQHandler:
797    ldr   r0,=POWERQUAD_DriverIRQHandler
798    bx    r0
799    .size POWERQUAD_IRQHandler, . - POWERQUAD_IRQHandler
800
801    .align 1
802    .thumb_func
803    .weak CASPER_IRQHandler
804    .type CASPER_IRQHandler, %function
805CASPER_IRQHandler:
806    ldr   r0,=CASPER_DriverIRQHandler
807    bx    r0
808    .size CASPER_IRQHandler, . - CASPER_IRQHandler
809
810    .align 1
811    .thumb_func
812    .weak PMU_PMIC_IRQHandler
813    .type PMU_PMIC_IRQHandler, %function
814PMU_PMIC_IRQHandler:
815    ldr   r0,=PMU_PMIC_DriverIRQHandler
816    bx    r0
817    .size PMU_PMIC_IRQHandler, . - PMU_PMIC_IRQHandler
818
819    .align 1
820    .thumb_func
821    .weak HASHCRYPT_IRQHandler
822    .type HASHCRYPT_IRQHandler, %function
823HASHCRYPT_IRQHandler:
824    ldr   r0,=HASHCRYPT_DriverIRQHandler
825    bx    r0
826    .size HASHCRYPT_IRQHandler, . - HASHCRYPT_IRQHandler
827
828    .align 1
829    .thumb_func
830    .weak FLEXCOMM8_IRQHandler
831    .type FLEXCOMM8_IRQHandler, %function
832FLEXCOMM8_IRQHandler:
833    ldr   r0,=FLEXCOMM8_DriverIRQHandler
834    bx    r0
835    .size FLEXCOMM8_IRQHandler, . - FLEXCOMM8_IRQHandler
836
837    .align 1
838    .thumb_func
839    .weak FLEXCOMM9_IRQHandler
840    .type FLEXCOMM9_IRQHandler, %function
841FLEXCOMM9_IRQHandler:
842    ldr   r0,=FLEXCOMM9_DriverIRQHandler
843    bx    r0
844    .size FLEXCOMM9_IRQHandler, . - FLEXCOMM9_IRQHandler
845
846    .align 1
847    .thumb_func
848    .weak FLEXCOMM10_IRQHandler
849    .type FLEXCOMM10_IRQHandler, %function
850FLEXCOMM10_IRQHandler:
851    ldr   r0,=FLEXCOMM10_DriverIRQHandler
852    bx    r0
853    .size FLEXCOMM10_IRQHandler, . - FLEXCOMM10_IRQHandler
854
855    .align 1
856    .thumb_func
857    .weak FLEXCOMM11_IRQHandler
858    .type FLEXCOMM11_IRQHandler, %function
859FLEXCOMM11_IRQHandler:
860    ldr   r0,=FLEXCOMM11_DriverIRQHandler
861    bx    r0
862    .size FLEXCOMM11_IRQHandler, . - FLEXCOMM11_IRQHandler
863
864    .align 1
865    .thumb_func
866    .weak FLEXCOMM12_IRQHandler
867    .type FLEXCOMM12_IRQHandler, %function
868FLEXCOMM12_IRQHandler:
869    ldr   r0,=FLEXCOMM12_DriverIRQHandler
870    bx    r0
871    .size FLEXCOMM12_IRQHandler, . - FLEXCOMM12_IRQHandler
872
873    .align 1
874    .thumb_func
875    .weak FLEXCOMM13_IRQHandler
876    .type FLEXCOMM13_IRQHandler, %function
877FLEXCOMM13_IRQHandler:
878    ldr   r0,=FLEXCOMM13_DriverIRQHandler
879    bx    r0
880    .size FLEXCOMM13_IRQHandler, . - FLEXCOMM13_IRQHandler
881
882    .align 1
883    .thumb_func
884    .weak FLEXCOMM16_IRQHandler
885    .type FLEXCOMM16_IRQHandler, %function
886FLEXCOMM16_IRQHandler:
887    ldr   r0,=FLEXCOMM16_DriverIRQHandler
888    bx    r0
889    .size FLEXCOMM16_IRQHandler, . - FLEXCOMM16_IRQHandler
890
891    .align 1
892    .thumb_func
893    .weak I3C1_IRQHandler
894    .type I3C1_IRQHandler, %function
895I3C1_IRQHandler:
896    ldr   r0,=I3C1_DriverIRQHandler
897    bx    r0
898    .size I3C1_IRQHandler, . - I3C1_IRQHandler
899
900    .align 1
901    .thumb_func
902    .weak FLEXIO_IRQHandler
903    .type FLEXIO_IRQHandler, %function
904FLEXIO_IRQHandler:
905    ldr   r0,=FLEXIO_DriverIRQHandler
906    bx    r0
907    .size FLEXIO_IRQHandler, . - FLEXIO_IRQHandler
908
909    .align 1
910    .thumb_func
911    .weak LCDIF_IRQHandler
912    .type LCDIF_IRQHandler, %function
913LCDIF_IRQHandler:
914    ldr   r0,=LCDIF_DriverIRQHandler
915    bx    r0
916    .size LCDIF_IRQHandler, . - LCDIF_IRQHandler
917
918    .align 1
919    .thumb_func
920    .weak GPU_IRQHandler
921    .type GPU_IRQHandler, %function
922GPU_IRQHandler:
923    ldr   r0,=GPU_DriverIRQHandler
924    bx    r0
925    .size GPU_IRQHandler, . - GPU_IRQHandler
926
927    .align 1
928    .thumb_func
929    .weak MIPI_IRQHandler
930    .type MIPI_IRQHandler, %function
931MIPI_IRQHandler:
932    ldr   r0,=MIPI_DriverIRQHandler
933    bx    r0
934    .size MIPI_IRQHandler, . - MIPI_IRQHandler
935
936    .align 1
937    .thumb_func
938    .weak Reserved88_IRQHandler
939    .type Reserved88_IRQHandler, %function
940Reserved88_IRQHandler:
941    ldr   r0,=Reserved88_DriverIRQHandler
942    bx    r0
943    .size Reserved88_IRQHandler, . - Reserved88_IRQHandler
944
945    .align 1
946    .thumb_func
947    .weak SDMA_IRQHandler
948    .type SDMA_IRQHandler, %function
949SDMA_IRQHandler:
950    ldr   r0,=SDMA_DriverIRQHandler
951    bx    r0
952    .size SDMA_IRQHandler, . - SDMA_IRQHandler
953
954/*    Macro to define default handlers. Default handler
955 *    will be weak symbol and just dead loops. They can be
956 *    overwritten by other handlers */
957    .macro def_irq_handler  handler_name
958    .weak \handler_name
959    .set  \handler_name, DefaultISR
960    .endm
961/* Exception Handlers */
962    def_irq_handler    MemManage_Handler
963    def_irq_handler    BusFault_Handler
964    def_irq_handler    UsageFault_Handler
965    def_irq_handler    SecureFault_Handler
966    def_irq_handler    DebugMon_Handler
967                def_irq_handler     WDT0_DriverIRQHandler
968                def_irq_handler     DMA0_DriverIRQHandler
969                def_irq_handler     GPIO_INTA_DriverIRQHandler
970                def_irq_handler     GPIO_INTB_DriverIRQHandler
971                def_irq_handler     PIN_INT0_DriverIRQHandler
972                def_irq_handler     PIN_INT1_DriverIRQHandler
973                def_irq_handler     PIN_INT2_DriverIRQHandler
974                def_irq_handler     PIN_INT3_DriverIRQHandler
975                def_irq_handler     UTICK0_DriverIRQHandler
976                def_irq_handler     MRT0_DriverIRQHandler
977                def_irq_handler     CTIMER0_DriverIRQHandler
978                def_irq_handler     CTIMER1_DriverIRQHandler
979                def_irq_handler     SCT0_DriverIRQHandler
980                def_irq_handler     CTIMER3_DriverIRQHandler
981                def_irq_handler     FLEXCOMM0_DriverIRQHandler
982                def_irq_handler     FLEXCOMM1_DriverIRQHandler
983                def_irq_handler     FLEXCOMM2_DriverIRQHandler
984                def_irq_handler     FLEXCOMM3_DriverIRQHandler
985                def_irq_handler     FLEXCOMM4_DriverIRQHandler
986                def_irq_handler     FLEXCOMM5_DriverIRQHandler
987                def_irq_handler     FLEXCOMM14_DriverIRQHandler
988                def_irq_handler     FLEXCOMM15_DriverIRQHandler
989                def_irq_handler     ADC0_DriverIRQHandler
990                def_irq_handler     Reserved39_DriverIRQHandler
991                def_irq_handler     ACMP_DriverIRQHandler
992                def_irq_handler     DMIC0_DriverIRQHandler
993                def_irq_handler     Reserved42_DriverIRQHandler
994                def_irq_handler     HYPERVISOR_DriverIRQHandler
995                def_irq_handler     SECURE_VIOLATION_DriverIRQHandler
996                def_irq_handler     HWVAD0_DriverIRQHandler
997                def_irq_handler     Reserved46_DriverIRQHandler
998                def_irq_handler     RNG_DriverIRQHandler
999                def_irq_handler     RTC_DriverIRQHandler
1000                def_irq_handler     DSP_TIE_EXPSTATE1_DriverIRQHandler
1001                def_irq_handler     MU_A_DriverIRQHandler
1002                def_irq_handler     PIN_INT4_DriverIRQHandler
1003                def_irq_handler     PIN_INT5_DriverIRQHandler
1004                def_irq_handler     PIN_INT6_DriverIRQHandler
1005                def_irq_handler     PIN_INT7_DriverIRQHandler
1006                def_irq_handler     CTIMER2_DriverIRQHandler
1007                def_irq_handler     CTIMER4_DriverIRQHandler
1008                def_irq_handler     OS_EVENT_DriverIRQHandler
1009                def_irq_handler     FLEXSPI0_FLEXSPI1_DriverIRQHandler
1010                def_irq_handler     FLEXCOMM6_DriverIRQHandler
1011                def_irq_handler     FLEXCOMM7_DriverIRQHandler
1012                def_irq_handler     USDHC0_DriverIRQHandler
1013                def_irq_handler     USDHC1_DriverIRQHandler
1014                def_irq_handler     SGPIO_INTA_DriverIRQHandler
1015                def_irq_handler     SGPIO_INTB_DriverIRQHandler
1016                def_irq_handler     I3C0_DriverIRQHandler
1017                def_irq_handler     USB0_DriverIRQHandler
1018                def_irq_handler     USB0_NEEDCLK_DriverIRQHandler
1019                def_irq_handler     WDT1_DriverIRQHandler
1020                def_irq_handler     USB_PHYDCD_DriverIRQHandler
1021                def_irq_handler     DMA1_DriverIRQHandler
1022                def_irq_handler     PUF_DriverIRQHandler
1023                def_irq_handler     POWERQUAD_DriverIRQHandler
1024                def_irq_handler     CASPER_DriverIRQHandler
1025                def_irq_handler     PMU_PMIC_DriverIRQHandler
1026                def_irq_handler     HASHCRYPT_DriverIRQHandler
1027                def_irq_handler     FLEXCOMM8_DriverIRQHandler
1028                def_irq_handler     FLEXCOMM9_DriverIRQHandler
1029                def_irq_handler     FLEXCOMM10_DriverIRQHandler
1030                def_irq_handler     FLEXCOMM11_DriverIRQHandler
1031                def_irq_handler     FLEXCOMM12_DriverIRQHandler
1032                def_irq_handler     FLEXCOMM13_DriverIRQHandler
1033                def_irq_handler     FLEXCOMM16_DriverIRQHandler
1034                def_irq_handler     I3C1_DriverIRQHandler
1035                def_irq_handler     FLEXIO_DriverIRQHandler
1036                def_irq_handler     LCDIF_DriverIRQHandler
1037                def_irq_handler     GPU_DriverIRQHandler
1038                def_irq_handler     MIPI_DriverIRQHandler
1039                def_irq_handler     Reserved88_DriverIRQHandler
1040                def_irq_handler     SDMA_DriverIRQHandler
1041
1042    .end
1043