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