1/* ---------------------------------------------------------------------------------------*/
2/*  @file:    startup_LPC54114.S                                                      */
3/*  @purpose: CMSIS Cortex-M4 Core Device Startup File                                    */
4/*            LPC54114                                                                */
5/*  @version: 1.0                                                                         */
6/*  @date:    2016-11-2                                                                   */
7/*  @build:   b161214                                                                     */
8/* ---------------------------------------------------------------------------------------*/
9/*                                                                                        */
10/* Copyright 1997-2016 Freescale Semiconductor, Inc.                                      */
11/* Copyright 2016-2018 NXP                                                                */
12/*                                                                                        */
13/* SPDX-License-Identifier: BSD-3-Clause                           */
14/*****************************************************************************/
15/* Version: GCC for ARM Embedded Processors                                  */
16/*****************************************************************************/
17    .syntax unified
18    .arch armv7-m
19
20    .section .isr_vector, "a"
21    .align 2
22    .globl __Vectors
23__Vectors:
24    .long   __StackTop                                      /* Top of Stack */
25    .long   Reset_Handler                                   /* Reset Handler */
26    .long   NMI_Handler                                     /* NMI Handler*/
27    .long   HardFault_Handler                               /* Hard Fault Handler*/
28    .long   MemManage_Handler                               /* MPU Fault Handler*/
29    .long   BusFault_Handler                                /* Bus Fault Handler*/
30    .long   UsageFault_Handler                              /* Usage Fault Handler*/
31    .long   0                                               /* Reserved*/
32    .long   0                                               /* Reserved*/
33    .long   0                                               /* Reserved*/
34    .long   0                                               /* Reserved*/
35    .long   SVC_Handler                                     /* SVCall Handler*/
36    .long   DebugMon_Handler                                /* Debug Monitor Handler*/
37    .long   0                                               /* Reserved*/
38    .long   PendSV_Handler                                  /* PendSV Handler*/
39    .long   SysTick_Handler                                 /* SysTick Handler*/
40
41                                                            /* External Interrupts*/
42    .long   WDT_BOD_IRQHandler                              /* Watchdog Timer, Brownout detect */
43    .long   DMA0_IRQHandler                                 /* DMA controller interrupt */
44    .long   GINT0_IRQHandler                                /* GPIO group 0 */
45    .long   GINT1_IRQHandler                                /* GPIO group 1 */
46    .long   PIN_INT0_IRQHandler                             /* Pin interrupt 0 or pattern match engine slice 0 */
47    .long   PIN_INT1_IRQHandler                             /* Pin interrupt 1 or pattern match engine slice 1 */
48    .long   PIN_INT2_IRQHandler                             /* Pin interrupt 2 or pattern match engine slice 2 */
49    .long   PIN_INT3_IRQHandler                             /* Pin interrupt 3 or pattern match engine slice 3 */
50    .long   UTICK0_IRQHandler                               /* Micro-tick Timer */
51    .long   MRT0_IRQHandler                                 /* Multi-rate timer */
52    .long   CTIMER0_IRQHandler                              /* Standard counter/timer CTIMER0 */
53    .long   CTIMER1_IRQHandler                              /* Standard counter/timer CTIMER1 */
54    .long   SCT0_IRQHandler                                 /* SCTimer/PWM */
55    .long   CTIMER3_IRQHandler                              /* Standard counter/timer CTIMER3 */
56    .long   FLEXCOMM0_IRQHandler                            /* Flexcomm Interface 0 (USART, SPI, I2C, FLEXCOMM) */
57    .long   FLEXCOMM1_IRQHandler                            /* Flexcomm Interface 1 (USART, SPI, I2C, FLEXCOMM) */
58    .long   FLEXCOMM2_IRQHandler                            /* Flexcomm Interface 2 (USART, SPI, I2C, FLEXCOMM) */
59    .long   FLEXCOMM3_IRQHandler                            /* Flexcomm Interface 3 (USART, SPI, I2C, FLEXCOMM) */
60    .long   FLEXCOMM4_IRQHandler                            /* Flexcomm Interface 4 (USART, SPI, I2C, FLEXCOMM) */
61    .long   FLEXCOMM5_IRQHandler                            /* Flexcomm Interface 5 (USART, SPI, I2C, FLEXCOMM) */
62    .long   FLEXCOMM6_IRQHandler                            /* Flexcomm Interface 6 (USART, SPI, I2C, FLEXCOMM) */
63    .long   FLEXCOMM7_IRQHandler                            /* Flexcomm Interface 7 (USART, SPI, I2C, FLEXCOMM) */
64    .long   ADC0_SEQA_IRQHandler                            /* ADC0 sequence A completion */
65    .long   ADC0_SEQB_IRQHandler                            /* ADC0 sequence B completion */
66    .long   ADC0_THCMP_IRQHandler                           /* ADC0 threshold compare and error. */
67    .long   DMIC0_IRQHandler                                /* RTC alarm and wake-up interrupts */
68    .long   HWVAD0_IRQHandler                               /* Hardware Voice Activity Detector */
69    .long   USB0_NEEDCLK_IRQHandler                         /* USB Activity Wake-up Interrupt */
70    .long   USB0_IRQHandler                                 /* USB device */
71    .long   RTC_IRQHandler                                  /* RTC alarm and wake-up interrupts */
72    .long   IOH_IRQHandler                                  /* IOH interrupt */
73    .long   MAILBOX_IRQHandler                              /* Mailbox interrupt */
74    .long   PIN_INT4_IRQHandler                             /* Pin interrupt 4 or pattern match engine slice 4 int */
75    .long   PIN_INT5_IRQHandler                             /* Pin interrupt 5 or pattern match engine slice 5 int */
76    .long   PIN_INT6_IRQHandler                             /* Pin interrupt 6 or pattern match engine slice 6 int */
77    .long   PIN_INT7_IRQHandler                             /* Pin interrupt 7 or pattern match engine slice 7 int */
78    .long   CTIMER2_IRQHandler                              /* Standard counter/timer CTIMER2 */
79    .long   CTIMER4_IRQHandler                              /* Standard counter/timer CTIMER4 */
80    .long   0                                               /* Reserved interrupt */
81    .long   SPIFI0_IRQHandler                               /* SPI flash interface */
82    .size    __Vectors, . - __Vectors
83
84/*  Variable to store CRP value in. No code read protection enabled by default
85 *  Code Read Protection level (CRP)
86 *    CRP_Level:
87 *      <0xFFFFFFFF=> Disabled
88 *      <0x4E697370=> NO_ISP
89 *      <0x12345678=> CRP1
90 *      <0x87654321=> CRP2
91 *      <0x43218765=> CRP3
92 */
93    #ifndef NO_CRP
94      .section .crp, "a"
95      .long 0xFFFFFFFF
96    #endif
97
98
99    .text
100    .thumb
101/* Reset Handler */
102
103    .thumb_func
104    .align 2
105    .globl   Reset_Handler
106    .weak    Reset_Handler
107    .type    Reset_Handler, %function
108
109Reset_Handler:
110#ifndef __START
111#define __START _start
112#endif
113#ifndef __ATOLLIC__
114normal_boot:
115#ifndef __NO_SYSTEM_INIT
116    ldr   r0,=SystemInit
117    blx   r0
118#endif
119    /*      Loop to copy data from read only memory to RAM. The ranges
120     *      of copy from/to are specified by following symbols evaluated in
121     *      linker script.
122     *      __etext: End of code section, i.e., begin of data sections to copy from.
123     *      __data_start__/__data_end__: RAM address range that data should be
124     *      copied to. Both must be aligned to 4 bytes boundary.  */
125
126    ldr    r1, =__etext
127    ldr    r2, =__data_start__
128    ldr    r3, =__data_end__
129
130#if 1
131/* Here are two copies of loop implemenations. First one favors code size
132 * and the second one favors performance. Default uses the first one.
133 * Change to "#if 0" to use the second one */
134.LC0:
135    cmp     r2, r3
136    ittt    lt
137    ldrlt   r0, [r1], #4
138    strlt   r0, [r2], #4
139    blt    .LC0
140#else
141    subs    r3, r2
142    ble    .LC1
143.LC0:
144    subs    r3, #4
145    ldr    r0, [r1, r3]
146    str    r0, [r2, r3]
147    bgt    .LC0
148.LC1:
149#endif
150
151#ifdef __STARTUP_CLEAR_BSS
152/*     This part of work usually is done in C library startup code. Otherwise,
153 *     define this macro to enable it in this startup.
154 *
155 *     Loop to zero out BSS section, which uses following symbols
156 *     in linker script:
157 *      __bss_start__: start of BSS section. Must align to 4
158 *      __bss_end__: end of BSS section. Must align to 4
159 */
160    ldr r1, =__bss_start__
161    ldr r2, =__bss_end__
162
163    movs    r0, 0
164.LC2:
165    cmp     r1, r2
166    itt    lt
167    strlt   r0, [r1], #4
168    blt    .LC2
169#endif /* __STARTUP_CLEAR_BSS */
170    ldr   r0,=__START
171    blx   r0
172#else
173    ldr   r0,=__libc_init_array
174    blx   r0
175    ldr   r0,=main
176    bx    r0
177#endif
178
179    .pool
180    .size Reset_Handler, . - Reset_Handler
181
182    .align  1
183    .thumb_func
184    .weak DefaultISR
185    .type DefaultISR, %function
186DefaultISR:
187    b DefaultISR
188    .size DefaultISR, . - DefaultISR
189
190    .align 1
191    .thumb_func
192    .weak NMI_Handler
193    .type NMI_Handler, %function
194NMI_Handler:
195    ldr   r0,=NMI_Handler
196    bx    r0
197    .size NMI_Handler, . - NMI_Handler
198
199    .align 1
200    .thumb_func
201    .weak HardFault_Handler
202    .type HardFault_Handler, %function
203HardFault_Handler:
204    ldr   r0,=HardFault_Handler
205    bx    r0
206    .size HardFault_Handler, . - HardFault_Handler
207
208    .align 1
209    .thumb_func
210    .weak MemManage_Handler
211    .type MemManage_Handler, %function
212MemManage_Handler:
213    ldr   r0,=MemManage_Handler
214    bx    r0
215    .size MemManage_Handler, . - MemManage_Handler
216
217    .align 1
218    .thumb_func
219    .weak BusFault_Handler
220    .type BusFault_Handler, %function
221BusFault_Handler:
222    ldr   r0,=BusFault_Handler
223    bx    r0
224    .size BusFault_Handler, . - BusFault_Handler
225
226    .align 1
227    .thumb_func
228    .weak UsageFault_Handler
229    .type UsageFault_Handler, %function
230UsageFault_Handler:
231    ldr   r0,=UsageFault_Handler
232    bx    r0
233    .size UsageFault_Handler, . - UsageFault_Handler
234
235    .align 1
236    .thumb_func
237    .weak SVC_Handler
238    .type SVC_Handler, %function
239SVC_Handler:
240    ldr   r0,=SVC_Handler
241    bx    r0
242    .size SVC_Handler, . - SVC_Handler
243
244    .align 1
245    .thumb_func
246    .weak DebugMon_Handler
247    .type DebugMon_Handler, %function
248DebugMon_Handler:
249    ldr   r0,=DebugMon_Handler
250    bx    r0
251    .size DebugMon_Handler, . - DebugMon_Handler
252
253    .align 1
254    .thumb_func
255    .weak PendSV_Handler
256    .type PendSV_Handler, %function
257PendSV_Handler:
258    ldr   r0,=PendSV_Handler
259    bx    r0
260    .size PendSV_Handler, . - PendSV_Handler
261
262    .align 1
263    .thumb_func
264    .weak SysTick_Handler
265    .type SysTick_Handler, %function
266SysTick_Handler:
267    ldr   r0,=SysTick_Handler
268    bx    r0
269    .size SysTick_Handler, . - SysTick_Handler
270
271    .align 1
272    .thumb_func
273    .weak WDT_BOD_IRQHandler
274    .type WDT_BOD_IRQHandler, %function
275WDT_BOD_IRQHandler:
276    ldr   r0,=WDT_BOD_DriverIRQHandler
277    bx    r0
278    .size WDT_BOD_IRQHandler, . - WDT_BOD_IRQHandler
279
280
281    .align 1
282    .thumb_func
283    .weak DMA0_IRQHandler
284    .type DMA0_IRQHandler, %function
285DMA0_IRQHandler:
286    ldr   r0,=DMA0_DriverIRQHandler
287    bx    r0
288    .size DMA0_IRQHandler, . - DMA0_IRQHandler
289
290    .align 1
291    .thumb_func
292    .weak GINT0_IRQHandler
293    .type GINT0_IRQHandler, %function
294GINT0_IRQHandler:
295    ldr   r0,=GINT0_DriverIRQHandler
296    bx    r0
297    .size GINT0_IRQHandler, . - GINT0_IRQHandler
298
299    .align 1
300    .thumb_func
301    .weak GINT1_IRQHandler
302    .type GINT1_IRQHandler, %function
303GINT1_IRQHandler:
304    ldr   r0,=GINT1_DriverIRQHandler
305    bx    r0
306    .size GINT1_IRQHandler, . - GINT1_IRQHandler
307
308    .align 1
309    .thumb_func
310    .weak PIN_INT0_IRQHandler
311    .type PIN_INT0_IRQHandler, %function
312PIN_INT0_IRQHandler:
313    ldr   r0,=PIN_INT0_DriverIRQHandler
314    bx    r0
315    .size PIN_INT0_IRQHandler, . - PIN_INT0_IRQHandler
316
317    .align 1
318    .thumb_func
319    .weak PIN_INT1_IRQHandler
320    .type PIN_INT1_IRQHandler, %function
321PIN_INT1_IRQHandler:
322    ldr   r0,=PIN_INT1_DriverIRQHandler
323    bx    r0
324    .size PIN_INT1_IRQHandler, . - PIN_INT1_IRQHandler
325
326    .align 1
327    .thumb_func
328    .weak PIN_INT2_IRQHandler
329    .type PIN_INT2_IRQHandler, %function
330PIN_INT2_IRQHandler:
331    ldr   r0,=PIN_INT2_DriverIRQHandler
332    bx    r0
333    .size PIN_INT2_IRQHandler, . - PIN_INT2_IRQHandler
334
335    .align 1
336    .thumb_func
337    .weak PIN_INT3_IRQHandler
338    .type PIN_INT3_IRQHandler, %function
339PIN_INT3_IRQHandler:
340    ldr   r0,=PIN_INT3_DriverIRQHandler
341    bx    r0
342    .size PIN_INT3_IRQHandler, . - PIN_INT3_IRQHandler
343
344    .align 1
345    .thumb_func
346    .weak UTICK0_IRQHandler
347    .type UTICK0_IRQHandler, %function
348UTICK0_IRQHandler:
349    ldr   r0,=UTICK0_DriverIRQHandler
350    bx    r0
351    .size UTICK0_IRQHandler, . - UTICK0_IRQHandler
352
353    .align 1
354    .thumb_func
355    .weak MRT0_IRQHandler
356    .type MRT0_IRQHandler, %function
357MRT0_IRQHandler:
358    ldr   r0,=MRT0_DriverIRQHandler
359    bx    r0
360    .size MRT0_IRQHandler, . - MRT0_IRQHandler
361
362    .align 1
363    .thumb_func
364    .weak CTIMER0_IRQHandler
365    .type CTIMER0_IRQHandler, %function
366CTIMER0_IRQHandler:
367    ldr   r0,=CTIMER0_DriverIRQHandler
368    bx    r0
369    .size CTIMER0_IRQHandler, . - CTIMER0_IRQHandler
370
371    .align 1
372    .thumb_func
373    .weak CTIMER1_IRQHandler
374    .type CTIMER1_IRQHandler, %function
375CTIMER1_IRQHandler:
376    ldr   r0,=CTIMER1_DriverIRQHandler
377    bx    r0
378    .size CTIMER1_IRQHandler, . - CTIMER1_IRQHandler
379
380
381    .align 1
382    .thumb_func
383    .weak SCT0_IRQHandler
384    .type SCT0_IRQHandler, %function
385SCT0_IRQHandler:
386    ldr   r0,=SCT0_DriverIRQHandler
387    bx    r0
388    .size SCT0_IRQHandler, . - SCT0_IRQHandler
389
390    .align 1
391    .thumb_func
392    .weak CTIMER3_IRQHandler
393    .type CTIMER3_IRQHandler, %function
394CTIMER3_IRQHandler:
395    ldr   r0,=CTIMER3_DriverIRQHandler
396    bx    r0
397    .size CTIMER3_IRQHandler, . - CTIMER3_IRQHandler
398
399    .align 1
400    .thumb_func
401    .weak FLEXCOMM0_IRQHandler
402    .type FLEXCOMM0_IRQHandler, %function
403FLEXCOMM0_IRQHandler:
404    ldr   r0,=FLEXCOMM0_DriverIRQHandler
405    bx    r0
406    .size FLEXCOMM0_IRQHandler, . - FLEXCOMM0_IRQHandler
407
408    .align 1
409    .thumb_func
410    .weak FLEXCOMM1_IRQHandler
411    .type FLEXCOMM1_IRQHandler, %function
412FLEXCOMM1_IRQHandler:
413    ldr   r0,=FLEXCOMM1_DriverIRQHandler
414    bx    r0
415    .size FLEXCOMM1_IRQHandler, . - FLEXCOMM1_IRQHandler
416
417    .align 1
418    .thumb_func
419    .weak FLEXCOMM2_IRQHandler
420    .type FLEXCOMM2_IRQHandler, %function
421FLEXCOMM2_IRQHandler:
422    ldr   r0,=FLEXCOMM2_DriverIRQHandler
423    bx    r0
424    .size FLEXCOMM2_IRQHandler, . - FLEXCOMM2_IRQHandler
425
426    .align 1
427    .thumb_func
428    .weak FLEXCOMM3_IRQHandler
429    .type FLEXCOMM3_IRQHandler, %function
430FLEXCOMM3_IRQHandler:
431    ldr   r0,=FLEXCOMM3_DriverIRQHandler
432    bx    r0
433    .size FLEXCOMM3_IRQHandler, . - FLEXCOMM3_IRQHandler
434
435    .align 1
436    .thumb_func
437    .weak FLEXCOMM4_IRQHandler
438    .type FLEXCOMM4_IRQHandler, %function
439FLEXCOMM4_IRQHandler:
440    ldr   r0,=FLEXCOMM4_DriverIRQHandler
441    bx    r0
442    .size FLEXCOMM4_IRQHandler, . - FLEXCOMM4_IRQHandler
443
444    .align 1
445    .thumb_func
446    .weak FLEXCOMM5_IRQHandler
447    .type FLEXCOMM5_IRQHandler, %function
448FLEXCOMM5_IRQHandler:
449    ldr   r0,=FLEXCOMM5_DriverIRQHandler
450    bx    r0
451    .size FLEXCOMM5_IRQHandler, . - FLEXCOMM5_IRQHandler
452
453    .align 1
454    .thumb_func
455    .weak FLEXCOMM6_IRQHandler
456    .type FLEXCOMM6_IRQHandler, %function
457FLEXCOMM6_IRQHandler:
458    ldr   r0,=FLEXCOMM6_DriverIRQHandler
459    bx    r0
460    .size FLEXCOMM6_IRQHandler, . - FLEXCOMM6_IRQHandler
461
462    .align 1
463    .thumb_func
464    .weak FLEXCOMM7_IRQHandler
465    .type FLEXCOMM7_IRQHandler, %function
466FLEXCOMM7_IRQHandler:
467    ldr   r0,=FLEXCOMM7_DriverIRQHandler
468    bx    r0
469    .size FLEXCOMM7_IRQHandler, . - FLEXCOMM7_IRQHandler
470
471
472    .align 1
473    .thumb_func
474    .weak ADC0_SEQA_IRQHandler
475    .type ADC0_SEQA_IRQHandler, %function
476ADC0_SEQA_IRQHandler:
477    ldr   r0,=ADC0_SEQA_DriverIRQHandler
478    bx    r0
479    .size ADC0_SEQA_IRQHandler, . - ADC0_SEQA_IRQHandler
480
481    .align 1
482    .thumb_func
483    .weak ADC0_SEQB_IRQHandler
484    .type ADC0_SEQB_IRQHandler, %function
485ADC0_SEQB_IRQHandler:
486    ldr   r0,=ADC0_SEQB_DriverIRQHandler
487    bx    r0
488    .size ADC0_SEQB_IRQHandler, . - ADC0_SEQB_IRQHandler
489
490    .align 1
491    .thumb_func
492    .weak ADC0_THCMP_IRQHandler
493    .type ADC0_THCMP_IRQHandler, %function
494ADC0_THCMP_IRQHandler:
495    ldr   r0,=ADC0_THCMP_DriverIRQHandler
496    bx    r0
497    .size ADC0_THCMP_IRQHandler, . - ADC0_THCMP_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 HWVAD0_IRQHandler
511    .type HWVAD0_IRQHandler, %function
512HWVAD0_IRQHandler:
513    ldr   r0,=HWVAD0_DriverIRQHandler
514    bx    r0
515    .size HWVAD0_IRQHandler, . - HWVAD0_IRQHandler
516
517    .align 1
518    .thumb_func
519    .weak USB0_NEEDCLK_IRQHandler
520    .type USB0_NEEDCLK_IRQHandler, %function
521USB0_NEEDCLK_IRQHandler:
522    ldr   r0,=USB0_NEEDCLK_DriverIRQHandler
523    bx    r0
524    .size USB0_NEEDCLK_IRQHandler, . - USB0_NEEDCLK_IRQHandler
525
526    .align 1
527    .thumb_func
528    .weak USB0_IRQHandler
529    .type USB0_IRQHandler, %function
530USB0_IRQHandler:
531    ldr   r0,=USB0_DriverIRQHandler
532    bx    r0
533    .size USB0_IRQHandler, . - USB0_IRQHandler
534
535    .align 1
536    .thumb_func
537    .weak RTC_IRQHandler
538    .type RTC_IRQHandler, %function
539RTC_IRQHandler:
540    ldr   r0,=RTC_DriverIRQHandler
541    bx    r0
542    .size RTC_IRQHandler, . - RTC_IRQHandler
543
544    .align 1
545    .thumb_func
546    .weak IOH_IRQHandler
547    .type IOH_IRQHandler, %function
548IOH_IRQHandler:
549    ldr   r0,=IOH_DriverIRQHandler
550    bx    r0
551    .size IOH_IRQHandler, . - IOH_IRQHandler
552
553    .align 1
554    .thumb_func
555    .weak MAILBOX_IRQHandler
556    .type MAILBOX_IRQHandler, %function
557MAILBOX_IRQHandler:
558    ldr   r0,=MAILBOX_DriverIRQHandler
559    bx    r0
560    .size MAILBOX_IRQHandler, . - MAILBOX_IRQHandler
561
562
563    .align 1
564    .thumb_func
565    .weak PIN_INT4_IRQHandler
566    .type PIN_INT4_IRQHandler, %function
567PIN_INT4_IRQHandler:
568    ldr   r0,=PIN_INT4_DriverIRQHandler
569    bx    r0
570    .size PIN_INT4_IRQHandler, . - PIN_INT4_IRQHandler
571
572    .align 1
573    .thumb_func
574    .weak PIN_INT5_IRQHandler
575    .type PIN_INT5_IRQHandler, %function
576PIN_INT5_IRQHandler:
577    ldr   r0,=PIN_INT5_DriverIRQHandler
578    bx    r0
579    .size PIN_INT5_IRQHandler, . - PIN_INT5_IRQHandler
580
581    .align 1
582    .thumb_func
583    .weak PIN_INT6_IRQHandler
584    .type PIN_INT6_IRQHandler, %function
585PIN_INT6_IRQHandler:
586    ldr   r0,=PIN_INT6_DriverIRQHandler
587    bx    r0
588    .size PIN_INT6_IRQHandler, . - PIN_INT6_IRQHandler
589
590    .align 1
591    .thumb_func
592    .weak PIN_INT7_IRQHandler
593    .type PIN_INT7_IRQHandler, %function
594PIN_INT7_IRQHandler:
595    ldr   r0,=PIN_INT7_DriverIRQHandler
596    bx    r0
597    .size PIN_INT7_IRQHandler, . - PIN_INT7_IRQHandler
598
599
600    .align 1
601    .thumb_func
602    .weak CTIMER2_IRQHandler
603    .type CTIMER2_IRQHandler, %function
604CTIMER2_IRQHandler:
605    ldr   r0,=CTIMER2_DriverIRQHandler
606    bx    r0
607    .size CTIMER2_IRQHandler, . - CTIMER2_IRQHandler
608
609    .align 1
610    .thumb_func
611    .weak CTIMER4_IRQHandler
612    .type CTIMER4_IRQHandler, %function
613CTIMER4_IRQHandler:
614    ldr   r0,=CTIMER4_DriverIRQHandler
615    bx    r0
616    .size CTIMER4_IRQHandler, . - CTIMER4_IRQHandler
617
618
619    .align 1
620    .thumb_func
621    .weak SPIFI0_IRQHandler
622    .type SPIFI0_IRQHandler, %function
623SPIFI0_IRQHandler:
624    ldr   r0,=SPIFI0_DriverIRQHandler
625    bx    r0
626    .size SPIFI0_IRQHandler, . - SPIFI0_IRQHandler
627/*    Macro to define default handlers. Default handler
628 *    will be weak symbol and just dead loops. They can be
629 *    overwritten by other handlers */
630    .macro def_irq_handler  handler_name
631    .weak \handler_name
632    .set  \handler_name, DefaultISR
633    .endm
634
635/* Exception Handlers */
636    def_irq_handler     WDT_BOD_DriverIRQHandler              /* Windowed watchdog timer, Brownout detect */
637    def_irq_handler     DMA0_DriverIRQHandler                 /* DMA controller */
638    def_irq_handler     GINT0_DriverIRQHandler                /* GPIO group 0 */
639    def_irq_handler     GINT1_DriverIRQHandler                /* GPIO group 1 */
640    def_irq_handler     PIN_INT0_DriverIRQHandler             /* Pin interrupt 0 or pattern match engine slice 0 */
641    def_irq_handler     PIN_INT1_DriverIRQHandler             /* Pin interrupt 1or pattern match engine slice 1 */
642    def_irq_handler     PIN_INT2_DriverIRQHandler             /* Pin interrupt 2 or pattern match engine slice 2 */
643    def_irq_handler     PIN_INT3_DriverIRQHandler             /* Pin interrupt 3 or pattern match engine slice 3 */
644    def_irq_handler     UTICK0_DriverIRQHandler               /* Micro-tick Timer */
645    def_irq_handler     MRT0_DriverIRQHandler                 /* Multi-rate timer */
646    def_irq_handler     CTIMER0_DriverIRQHandler              /* Standard counter/timer CTIMER0 */
647    def_irq_handler     CTIMER1_DriverIRQHandler              /* Standard counter/timer CTIMER1 */
648    def_irq_handler     SCT0_DriverIRQHandler                 /* SCTimer/PWM */
649    def_irq_handler     CTIMER3_DriverIRQHandler              /* Standard counter/timer CTIMER3 */
650    def_irq_handler     FLEXCOMM0_DriverIRQHandler            /* Flexcomm Interface 0 (USART, SPI, I2C) */
651    def_irq_handler     FLEXCOMM1_DriverIRQHandler            /* Flexcomm Interface 1 (USART, SPI, I2C) */
652    def_irq_handler     FLEXCOMM2_DriverIRQHandler            /* Flexcomm Interface 2 (USART, SPI, I2C) */
653    def_irq_handler     FLEXCOMM3_DriverIRQHandler            /* Flexcomm Interface 3 (USART, SPI, I2C) */
654    def_irq_handler     FLEXCOMM4_DriverIRQHandler            /* Flexcomm Interface 4 (USART, SPI, I2C) */
655    def_irq_handler     FLEXCOMM5_DriverIRQHandler            /* Flexcomm Interface 5 (USART, SPI, I2C) */
656    def_irq_handler     FLEXCOMM6_DriverIRQHandler            /* Flexcomm Interface 6 (USART, SPI, I2C, I2S) */
657    def_irq_handler     FLEXCOMM7_DriverIRQHandler            /* Flexcomm Interface 7 (USART, SPI, I2C, I2S) */
658    def_irq_handler     ADC0_SEQA_DriverIRQHandler            /* ADC0 sequence A completion. */
659    def_irq_handler     ADC0_SEQB_DriverIRQHandler            /* ADC0 sequence B completion. */
660    def_irq_handler     ADC0_THCMP_DriverIRQHandler           /* ADC0 threshold compare and error. */
661    def_irq_handler     DMIC0_DriverIRQHandler                /* Digital microphone and DMIC subsystem */
662    def_irq_handler     HWVAD0_DriverIRQHandler               /* Hardware Voice Activity Detector */
663    def_irq_handler     USB0_NEEDCLK_DriverIRQHandler         /* USB Activity Wake-up Interrupt */
664    def_irq_handler     USB0_DriverIRQHandler                 /* USB device */
665    def_irq_handler     RTC_DriverIRQHandler                  /* RTC alarm and wake-up interrupts */
666    def_irq_handler     IOH_DriverIRQHandler                  /* IOH */
667    def_irq_handler     MAILBOX_DriverIRQHandler              /* Mailbox interrupt (present on selected devices) */
668    def_irq_handler     PIN_INT4_DriverIRQHandler             /* Pin interrupt 4 or pattern match engine slice 4 int */
669    def_irq_handler     PIN_INT5_DriverIRQHandler             /* Pin interrupt 5 or pattern match engine slice 5 int */
670    def_irq_handler     PIN_INT6_DriverIRQHandler             /* Pin interrupt 6 or pattern match engine slice 6 int */
671    def_irq_handler     PIN_INT7_DriverIRQHandler             /* Pin interrupt 7 or pattern match engine slice 7 int */
672    def_irq_handler     CTIMER2_DriverIRQHandler              /* Standard counter/timer CTIMER2 */
673    def_irq_handler     CTIMER4_DriverIRQHandler              /* Standard counter/timer CTIMER4 */
674    def_irq_handler     SPIFI0_DriverIRQHandler               /* SPI flash interface */
675
676    .end
677