1/* ------------------------------------------------------------------------- */
2/*  @file:    startup_LPC54005.s                                             */
3/*  @purpose: CMSIS Cortex-M4 Core Device Startup File                       */
4/*            LPC54005                                                       */
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   0                                               /* Reserved*/
32    .long   0xEDDC94BD                                      /* Enhanced image marker, set to 0x0 for legacy boot*/
33    .long   0x160                                           /* Pointer to enhanced boot block, set to 0x0 for legacy boot*/
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   FLEXCOMM10_IRQHandler                           /* Flexcomm Interface 10 (SPI, FLEXCOMM)*/
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   Reserved68_IRQHandler                           /* Reserved 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
102    .long   0                                               /* Reserved */
103    .long   0                                               /* Reserved */
104    .long   0                                               /* Reserved */
105    .long   0                                               /* Reserved */
106    .long   0                                               /* Reserved */
107    .long   0                                               /* Reserved */
108    .long   0                                               /* Reserved */
109    .long   0                                               /* Reserved */
110    .long   0                                               /* Reserved */
111    .long   0                                               /* Reserved */
112    .long   0                                               /* Reserved */
113    .long   0                                               /* Reserved */
114    .long   0                                               /* Reserved */
115    .long   0                                               /* Reserved */
116    .long   0                                               /* Reserved */
117
118#ifndef IMG_BAUDRATE
119#define IMG_BAUDRATE 0
120#endif
121
122__image_header:
123    .long   0xFEEDA5A5                                      /* (0x00, 0x160) Header Marker */
124    #ifdef XIP_IMAGE
125          #ifdef ADD_CRC
126          .long   0x2                                       /* (0x04) Image Type */
127          #else
128          .long   0x3                                       /* (0x04) Image Type */
129          #endif
130    #else
131          #ifdef ADD_CRC
132          .long   0x0                                       /* (0x04) Image Type */
133          #else
134          .long   0x1                                       /* (0x04) Image Type */
135          #endif
136    #endif
137
138    #ifdef XIP_IMAGE
139          .long   0x10000000                                /* (0x08) Load_address */
140    #else
141          .long   0x00000000                                /* (0x08) Load_address */
142    #endif
143    .long   __IMAGE_SIZE - 4                                /* (0x0C) load_length, exclude 4 bytes CRC field */
144    .long   0                                               /* (0x10) CRC value (only applicable to NON Non-secure images) */
145    .long   0                                               /* (0x14) Version (only applicable to DUAL_ENH image type */
146    .long   0                                               /* (0x18) EMC static memory configuration settings, required for EMC boot */
147    .long   IMG_BAUDRATE                                    /* image baudrate */
148    .long   0                                               /* Reserved */
149    .long   0xEDDC94BD                                      /* (0x24) Image_marker */
150    .long   0                                               /* (0x28) SBZ */
151    .long   0                                               /* (0x2C) reserved */
152     #ifdef W25Q128JVFM
153     /* SPI Descriptor - W25Q128JVFM */
154    .long   0x00000000                                      /* 0xFFFFFFFF to default 1-bit SPI mode   ;DevStrAdr */
155    .long   0x001870EF                                      /* mfgId + extCount */
156    .long   0x00000000                                      /* extid 0-3 */
157    .long   0x00000000                                      /* extid 4-7 */
158    .long   0x0001001D                                      /* caps */
159    .long   0x00000100                                      /* Blks + RESV1 */
160    .long   0x00010000                                      /* blkSize */
161    .long   0x00000000                                      /* subBlks + subBlkSize */
162    .long   0x00000100                                      /* pageSize + RESV2 */
163    .long   0x00003F00                                      /* maxReadSize */
164    .long   0x68506850                                      /* maxClkRate,maxReadRate,maxHSReadRate,maxProgramRate */
165    .long   0x04030050                                      /* maxHSProgramRate,initDeInitFxId,clearStatusFxId,getStatusFxId, */
166    .long   0x14110D09                                      /* setStatusFxId,setOptionsFxId,getReadCmdFxId,getWriteCmdFxId */
167    #endif
168
169     #ifdef MXL12835F
170     /* SPI Descriptor - MXL12835F */
171    .long   0x00000000                                      /* 0xFFFFFFFF to default 1-bit SPI mode  ;DevStrAdr */
172    .long   0x001820C2                                      /* mfgId + extCount */
173    .long   0x00000000                                      /* extid 0-3 */
174    .long   0x00000000                                      /* extid 4-7 */
175    .long   0x0001001D                                      /* caps */
176    .long   0x00000100                                      /* Blks + RESV1 */
177    .long   0x00010000                                      /* blkSize */
178    .long   0x00000000                                      /* subBlks + subBlkSize */
179    .long   0x00000100                                      /* pageSize + RESV2 */
180    .long   0x00003F00                                      /* maxReadSize */
181    .long   0x68506850                                      /* maxClkRate,maxReadRate,maxHSReadRate,maxProgramRate */
182    .long   0x06030050                                      /* maxHSProgramRate,initDeInitFxId,clearStatusFxId,getStatusFxId */
183    .long   0x14110F0B                                      /* setStatusFxId,setOptionsFxId,getReadCmdFxId,getWriteCmdFxId */
184    #endif
185
186    .text
187    .thumb
188
189#if defined (__cplusplus)
190#ifdef __REDLIB__
191#error Redlib does not support C++
192#endif
193#endif
194/* Reset Handler */
195
196    .thumb_func
197    .align 2
198    .globl   Reset_Handler
199    .weak    Reset_Handler
200    .type    Reset_Handler, %function
201Reset_Handler:
202#ifndef __NO_SYSTEM_INIT
203    movs  r0,#56
204    ldr   r1, =0x40000220
205    str   r0, [r1]           /* Enable SRAM clock used by Stack */
206    ldr   r0,=SystemInit
207    blx   r0
208#endif
209/*     Loop to copy data from read only memory to RAM. The ranges
210 *      of copy from/to are specified by following symbols evaluated in
211 *      linker script.
212 *      __etext: End of code section, i.e., begin of data sections to copy from.
213 *      __data_start__/__data_end__: RAM address range that data should be
214 *      copied to. Both must be aligned to 4 bytes boundary.  */
215
216    ldr    r1, =__etext
217    ldr    r2, =__data_start__
218    ldr    r3, =__data_end__
219
220#if 1
221/* Here are two copies of loop implemenations. First one favors code size
222 * and the second one favors performance. Default uses the first one.
223 * Change to "#if 0" to use the second one */
224.LC0:
225    cmp     r2, r3
226    ittt    lt
227    ldrlt   r0, [r1], #4
228    strlt   r0, [r2], #4
229    blt    .LC0
230#else
231    subs    r3, r2
232    ble    .LC1
233.LC0:
234    subs    r3, #4
235    ldr    r0, [r1, r3]
236    str    r0, [r2, r3]
237    bgt    .LC0
238.LC1:
239#endif
240
241#ifdef __STARTUP_CLEAR_BSS
242/*     This part of work usually is done in C library startup code. Otherwise,
243 *     define this macro to enable it in this startup.
244 *
245 *     Loop to zero out BSS section, which uses following symbols
246 *     in linker script:
247 *      __bss_start__: start of BSS section. Must align to 4
248 *      __bss_end__: end of BSS section. Must align to 4
249 */
250    ldr r1, =__bss_start__
251    ldr r2, =__bss_end__
252
253    movs    r0, 0
254.LC2:
255    cmp     r1, r2
256    itt    lt
257    strlt   r0, [r1], #4
258    blt    .LC2
259#endif /* __STARTUP_CLEAR_BSS */
260
261#ifndef __START
262#ifdef __REDLIB__
263#define __START __main
264#else
265#define __START _start
266#endif
267#endif
268#ifndef __ATOLLIC__
269    ldr   r0,=__START
270    blx   r0
271#else
272    ldr   r0,=__libc_init_array
273    blx   r0
274    ldr   r0,=main
275    bx    r0
276#endif
277    .pool
278    .size Reset_Handler, . - Reset_Handler
279
280    .align  1
281    .thumb_func
282    .weak DefaultISR
283    .type DefaultISR, %function
284DefaultISR:
285    b DefaultISR
286    .size DefaultISR, . - DefaultISR
287
288    .align 1
289    .thumb_func
290    .weak NMI_Handler
291    .type NMI_Handler, %function
292NMI_Handler:
293    ldr   r0,=NMI_Handler
294    bx    r0
295    .size NMI_Handler, . - NMI_Handler
296
297    .align 1
298    .thumb_func
299    .weak HardFault_Handler
300    .type HardFault_Handler, %function
301HardFault_Handler:
302    ldr   r0,=HardFault_Handler
303    bx    r0
304    .size HardFault_Handler, . - HardFault_Handler
305
306    .align 1
307    .thumb_func
308    .weak SVC_Handler
309    .type SVC_Handler, %function
310SVC_Handler:
311    ldr   r0,=SVC_Handler
312    bx    r0
313    .size SVC_Handler, . - SVC_Handler
314
315    .align 1
316    .thumb_func
317    .weak PendSV_Handler
318    .type PendSV_Handler, %function
319PendSV_Handler:
320    ldr   r0,=PendSV_Handler
321    bx    r0
322    .size PendSV_Handler, . - PendSV_Handler
323
324    .align 1
325    .thumb_func
326    .weak SysTick_Handler
327    .type SysTick_Handler, %function
328SysTick_Handler:
329    ldr   r0,=SysTick_Handler
330    bx    r0
331    .size SysTick_Handler, . - SysTick_Handler
332
333    .align 1
334    .thumb_func
335    .weak WDT_BOD_IRQHandler
336    .type WDT_BOD_IRQHandler, %function
337WDT_BOD_IRQHandler:
338    ldr   r0,=WDT_BOD_DriverIRQHandler
339    bx    r0
340    .size WDT_BOD_IRQHandler, . - WDT_BOD_IRQHandler
341
342    .align 1
343    .thumb_func
344    .weak DMA0_IRQHandler
345    .type DMA0_IRQHandler, %function
346DMA0_IRQHandler:
347    ldr   r0,=DMA0_DriverIRQHandler
348    bx    r0
349    .size DMA0_IRQHandler, . - DMA0_IRQHandler
350
351    .align 1
352    .thumb_func
353    .weak GINT0_IRQHandler
354    .type GINT0_IRQHandler, %function
355GINT0_IRQHandler:
356    ldr   r0,=GINT0_DriverIRQHandler
357    bx    r0
358    .size GINT0_IRQHandler, . - GINT0_IRQHandler
359
360    .align 1
361    .thumb_func
362    .weak GINT1_IRQHandler
363    .type GINT1_IRQHandler, %function
364GINT1_IRQHandler:
365    ldr   r0,=GINT1_DriverIRQHandler
366    bx    r0
367    .size GINT1_IRQHandler, . - GINT1_IRQHandler
368
369    .align 1
370    .thumb_func
371    .weak PIN_INT0_IRQHandler
372    .type PIN_INT0_IRQHandler, %function
373PIN_INT0_IRQHandler:
374    ldr   r0,=PIN_INT0_DriverIRQHandler
375    bx    r0
376    .size PIN_INT0_IRQHandler, . - PIN_INT0_IRQHandler
377
378    .align 1
379    .thumb_func
380    .weak PIN_INT1_IRQHandler
381    .type PIN_INT1_IRQHandler, %function
382PIN_INT1_IRQHandler:
383    ldr   r0,=PIN_INT1_DriverIRQHandler
384    bx    r0
385    .size PIN_INT1_IRQHandler, . - PIN_INT1_IRQHandler
386
387    .align 1
388    .thumb_func
389    .weak PIN_INT2_IRQHandler
390    .type PIN_INT2_IRQHandler, %function
391PIN_INT2_IRQHandler:
392    ldr   r0,=PIN_INT2_DriverIRQHandler
393    bx    r0
394    .size PIN_INT2_IRQHandler, . - PIN_INT2_IRQHandler
395
396    .align 1
397    .thumb_func
398    .weak PIN_INT3_IRQHandler
399    .type PIN_INT3_IRQHandler, %function
400PIN_INT3_IRQHandler:
401    ldr   r0,=PIN_INT3_DriverIRQHandler
402    bx    r0
403    .size PIN_INT3_IRQHandler, . - PIN_INT3_IRQHandler
404
405    .align 1
406    .thumb_func
407    .weak UTICK0_IRQHandler
408    .type UTICK0_IRQHandler, %function
409UTICK0_IRQHandler:
410    ldr   r0,=UTICK0_DriverIRQHandler
411    bx    r0
412    .size UTICK0_IRQHandler, . - UTICK0_IRQHandler
413
414    .align 1
415    .thumb_func
416    .weak MRT0_IRQHandler
417    .type MRT0_IRQHandler, %function
418MRT0_IRQHandler:
419    ldr   r0,=MRT0_DriverIRQHandler
420    bx    r0
421    .size MRT0_IRQHandler, . - MRT0_IRQHandler
422
423    .align 1
424    .thumb_func
425    .weak CTIMER0_IRQHandler
426    .type CTIMER0_IRQHandler, %function
427CTIMER0_IRQHandler:
428    ldr   r0,=CTIMER0_DriverIRQHandler
429    bx    r0
430    .size CTIMER0_IRQHandler, . - CTIMER0_IRQHandler
431
432    .align 1
433    .thumb_func
434    .weak CTIMER1_IRQHandler
435    .type CTIMER1_IRQHandler, %function
436CTIMER1_IRQHandler:
437    ldr   r0,=CTIMER1_DriverIRQHandler
438    bx    r0
439    .size CTIMER1_IRQHandler, . - CTIMER1_IRQHandler
440
441    .align 1
442    .thumb_func
443    .weak SCT0_IRQHandler
444    .type SCT0_IRQHandler, %function
445SCT0_IRQHandler:
446    ldr   r0,=SCT0_DriverIRQHandler
447    bx    r0
448    .size SCT0_IRQHandler, . - SCT0_IRQHandler
449
450    .align 1
451    .thumb_func
452    .weak CTIMER3_IRQHandler
453    .type CTIMER3_IRQHandler, %function
454CTIMER3_IRQHandler:
455    ldr   r0,=CTIMER3_DriverIRQHandler
456    bx    r0
457    .size CTIMER3_IRQHandler, . - CTIMER3_IRQHandler
458
459    .align 1
460    .thumb_func
461    .weak FLEXCOMM0_IRQHandler
462    .type FLEXCOMM0_IRQHandler, %function
463FLEXCOMM0_IRQHandler:
464    ldr   r0,=FLEXCOMM0_DriverIRQHandler
465    bx    r0
466    .size FLEXCOMM0_IRQHandler, . - FLEXCOMM0_IRQHandler
467
468    .align 1
469    .thumb_func
470    .weak FLEXCOMM1_IRQHandler
471    .type FLEXCOMM1_IRQHandler, %function
472FLEXCOMM1_IRQHandler:
473    ldr   r0,=FLEXCOMM1_DriverIRQHandler
474    bx    r0
475    .size FLEXCOMM1_IRQHandler, . - FLEXCOMM1_IRQHandler
476
477    .align 1
478    .thumb_func
479    .weak FLEXCOMM2_IRQHandler
480    .type FLEXCOMM2_IRQHandler, %function
481FLEXCOMM2_IRQHandler:
482    ldr   r0,=FLEXCOMM2_DriverIRQHandler
483    bx    r0
484    .size FLEXCOMM2_IRQHandler, . - FLEXCOMM2_IRQHandler
485
486    .align 1
487    .thumb_func
488    .weak FLEXCOMM3_IRQHandler
489    .type FLEXCOMM3_IRQHandler, %function
490FLEXCOMM3_IRQHandler:
491    ldr   r0,=FLEXCOMM3_DriverIRQHandler
492    bx    r0
493    .size FLEXCOMM3_IRQHandler, . - FLEXCOMM3_IRQHandler
494
495    .align 1
496    .thumb_func
497    .weak FLEXCOMM4_IRQHandler
498    .type FLEXCOMM4_IRQHandler, %function
499FLEXCOMM4_IRQHandler:
500    ldr   r0,=FLEXCOMM4_DriverIRQHandler
501    bx    r0
502    .size FLEXCOMM4_IRQHandler, . - FLEXCOMM4_IRQHandler
503
504    .align 1
505    .thumb_func
506    .weak FLEXCOMM5_IRQHandler
507    .type FLEXCOMM5_IRQHandler, %function
508FLEXCOMM5_IRQHandler:
509    ldr   r0,=FLEXCOMM5_DriverIRQHandler
510    bx    r0
511    .size FLEXCOMM5_IRQHandler, . - FLEXCOMM5_IRQHandler
512
513    .align 1
514    .thumb_func
515    .weak FLEXCOMM6_IRQHandler
516    .type FLEXCOMM6_IRQHandler, %function
517FLEXCOMM6_IRQHandler:
518    ldr   r0,=FLEXCOMM6_DriverIRQHandler
519    bx    r0
520    .size FLEXCOMM6_IRQHandler, . - FLEXCOMM6_IRQHandler
521
522    .align 1
523    .thumb_func
524    .weak FLEXCOMM7_IRQHandler
525    .type FLEXCOMM7_IRQHandler, %function
526FLEXCOMM7_IRQHandler:
527    ldr   r0,=FLEXCOMM7_DriverIRQHandler
528    bx    r0
529    .size FLEXCOMM7_IRQHandler, . - FLEXCOMM7_IRQHandler
530
531    .align 1
532    .thumb_func
533    .weak ADC0_SEQA_IRQHandler
534    .type ADC0_SEQA_IRQHandler, %function
535ADC0_SEQA_IRQHandler:
536    ldr   r0,=ADC0_SEQA_DriverIRQHandler
537    bx    r0
538    .size ADC0_SEQA_IRQHandler, . - ADC0_SEQA_IRQHandler
539
540    .align 1
541    .thumb_func
542    .weak ADC0_SEQB_IRQHandler
543    .type ADC0_SEQB_IRQHandler, %function
544ADC0_SEQB_IRQHandler:
545    ldr   r0,=ADC0_SEQB_DriverIRQHandler
546    bx    r0
547    .size ADC0_SEQB_IRQHandler, . - ADC0_SEQB_IRQHandler
548
549    .align 1
550    .thumb_func
551    .weak ADC0_THCMP_IRQHandler
552    .type ADC0_THCMP_IRQHandler, %function
553ADC0_THCMP_IRQHandler:
554    ldr   r0,=ADC0_THCMP_DriverIRQHandler
555    bx    r0
556    .size ADC0_THCMP_IRQHandler, . - ADC0_THCMP_IRQHandler
557
558    .align 1
559    .thumb_func
560    .weak DMIC0_IRQHandler
561    .type DMIC0_IRQHandler, %function
562DMIC0_IRQHandler:
563    ldr   r0,=DMIC0_DriverIRQHandler
564    bx    r0
565    .size DMIC0_IRQHandler, . - DMIC0_IRQHandler
566
567    .align 1
568    .thumb_func
569    .weak HWVAD0_IRQHandler
570    .type HWVAD0_IRQHandler, %function
571HWVAD0_IRQHandler:
572    ldr   r0,=HWVAD0_DriverIRQHandler
573    bx    r0
574    .size HWVAD0_IRQHandler, . - HWVAD0_IRQHandler
575
576    .align 1
577    .thumb_func
578    .weak USB0_NEEDCLK_IRQHandler
579    .type USB0_NEEDCLK_IRQHandler, %function
580USB0_NEEDCLK_IRQHandler:
581    ldr   r0,=USB0_NEEDCLK_DriverIRQHandler
582    bx    r0
583    .size USB0_NEEDCLK_IRQHandler, . - USB0_NEEDCLK_IRQHandler
584
585    .align 1
586    .thumb_func
587    .weak USB0_IRQHandler
588    .type USB0_IRQHandler, %function
589USB0_IRQHandler:
590    ldr   r0,=USB0_DriverIRQHandler
591    bx    r0
592    .size USB0_IRQHandler, . - USB0_IRQHandler
593
594    .align 1
595    .thumb_func
596    .weak RTC_IRQHandler
597    .type RTC_IRQHandler, %function
598RTC_IRQHandler:
599    ldr   r0,=RTC_DriverIRQHandler
600    bx    r0
601    .size RTC_IRQHandler, . - RTC_IRQHandler
602
603    .align 1
604    .thumb_func
605    .weak FLEXCOMM10_IRQHandler
606    .type FLEXCOMM10_IRQHandler, %function
607FLEXCOMM10_IRQHandler:
608    ldr   r0,=FLEXCOMM10_DriverIRQHandler
609    bx    r0
610    .size FLEXCOMM10_IRQHandler, . - FLEXCOMM10_IRQHandler
611
612    .align 1
613    .thumb_func
614    .weak Reserved47_IRQHandler
615    .type Reserved47_IRQHandler, %function
616Reserved47_IRQHandler:
617    ldr   r0,=Reserved47_DriverIRQHandler
618    bx    r0
619    .size Reserved47_IRQHandler, . - Reserved47_IRQHandler
620
621    .align 1
622    .thumb_func
623    .weak PIN_INT4_IRQHandler
624    .type PIN_INT4_IRQHandler, %function
625PIN_INT4_IRQHandler:
626    ldr   r0,=PIN_INT4_DriverIRQHandler
627    bx    r0
628    .size PIN_INT4_IRQHandler, . - PIN_INT4_IRQHandler
629
630    .align 1
631    .thumb_func
632    .weak PIN_INT5_IRQHandler
633    .type PIN_INT5_IRQHandler, %function
634PIN_INT5_IRQHandler:
635    ldr   r0,=PIN_INT5_DriverIRQHandler
636    bx    r0
637    .size PIN_INT5_IRQHandler, . - PIN_INT5_IRQHandler
638
639    .align 1
640    .thumb_func
641    .weak PIN_INT6_IRQHandler
642    .type PIN_INT6_IRQHandler, %function
643PIN_INT6_IRQHandler:
644    ldr   r0,=PIN_INT6_DriverIRQHandler
645    bx    r0
646    .size PIN_INT6_IRQHandler, . - PIN_INT6_IRQHandler
647
648    .align 1
649    .thumb_func
650    .weak PIN_INT7_IRQHandler
651    .type PIN_INT7_IRQHandler, %function
652PIN_INT7_IRQHandler:
653    ldr   r0,=PIN_INT7_DriverIRQHandler
654    bx    r0
655    .size PIN_INT7_IRQHandler, . - PIN_INT7_IRQHandler
656
657    .align 1
658    .thumb_func
659    .weak CTIMER2_IRQHandler
660    .type CTIMER2_IRQHandler, %function
661CTIMER2_IRQHandler:
662    ldr   r0,=CTIMER2_DriverIRQHandler
663    bx    r0
664    .size CTIMER2_IRQHandler, . - CTIMER2_IRQHandler
665
666    .align 1
667    .thumb_func
668    .weak CTIMER4_IRQHandler
669    .type CTIMER4_IRQHandler, %function
670CTIMER4_IRQHandler:
671    ldr   r0,=CTIMER4_DriverIRQHandler
672    bx    r0
673    .size CTIMER4_IRQHandler, . - CTIMER4_IRQHandler
674
675    .align 1
676    .thumb_func
677    .weak RIT_IRQHandler
678    .type RIT_IRQHandler, %function
679RIT_IRQHandler:
680    ldr   r0,=RIT_DriverIRQHandler
681    bx    r0
682    .size RIT_IRQHandler, . - RIT_IRQHandler
683
684    .align 1
685    .thumb_func
686    .weak SPIFI0_IRQHandler
687    .type SPIFI0_IRQHandler, %function
688SPIFI0_IRQHandler:
689    ldr   r0,=SPIFI0_DriverIRQHandler
690    bx    r0
691    .size SPIFI0_IRQHandler, . - SPIFI0_IRQHandler
692
693    .align 1
694    .thumb_func
695    .weak FLEXCOMM8_IRQHandler
696    .type FLEXCOMM8_IRQHandler, %function
697FLEXCOMM8_IRQHandler:
698    ldr   r0,=FLEXCOMM8_DriverIRQHandler
699    bx    r0
700    .size FLEXCOMM8_IRQHandler, . - FLEXCOMM8_IRQHandler
701
702    .align 1
703    .thumb_func
704    .weak FLEXCOMM9_IRQHandler
705    .type FLEXCOMM9_IRQHandler, %function
706FLEXCOMM9_IRQHandler:
707    ldr   r0,=FLEXCOMM9_DriverIRQHandler
708    bx    r0
709    .size FLEXCOMM9_IRQHandler, . - FLEXCOMM9_IRQHandler
710
711    .align 1
712    .thumb_func
713    .weak SDIO_IRQHandler
714    .type SDIO_IRQHandler, %function
715SDIO_IRQHandler:
716    ldr   r0,=SDIO_DriverIRQHandler
717    bx    r0
718    .size SDIO_IRQHandler, . - SDIO_IRQHandler
719
720    .align 1
721    .thumb_func
722    .weak CAN0_IRQ0_IRQHandler
723    .type CAN0_IRQ0_IRQHandler, %function
724CAN0_IRQ0_IRQHandler:
725    ldr   r0,=CAN0_IRQ0_DriverIRQHandler
726    bx    r0
727    .size CAN0_IRQ0_IRQHandler, . - CAN0_IRQ0_IRQHandler
728
729    .align 1
730    .thumb_func
731    .weak CAN0_IRQ1_IRQHandler
732    .type CAN0_IRQ1_IRQHandler, %function
733CAN0_IRQ1_IRQHandler:
734    ldr   r0,=CAN0_IRQ1_DriverIRQHandler
735    bx    r0
736    .size CAN0_IRQ1_IRQHandler, . - CAN0_IRQ1_IRQHandler
737
738    .align 1
739    .thumb_func
740    .weak CAN1_IRQ0_IRQHandler
741    .type CAN1_IRQ0_IRQHandler, %function
742CAN1_IRQ0_IRQHandler:
743    ldr   r0,=CAN1_IRQ0_DriverIRQHandler
744    bx    r0
745    .size CAN1_IRQ0_IRQHandler, . - CAN1_IRQ0_IRQHandler
746
747    .align 1
748    .thumb_func
749    .weak CAN1_IRQ1_IRQHandler
750    .type CAN1_IRQ1_IRQHandler, %function
751CAN1_IRQ1_IRQHandler:
752    ldr   r0,=CAN1_IRQ1_DriverIRQHandler
753    bx    r0
754    .size CAN1_IRQ1_IRQHandler, . - CAN1_IRQ1_IRQHandler
755
756    .align 1
757    .thumb_func
758    .weak USB1_IRQHandler
759    .type USB1_IRQHandler, %function
760USB1_IRQHandler:
761    ldr   r0,=USB1_DriverIRQHandler
762    bx    r0
763    .size USB1_IRQHandler, . - USB1_IRQHandler
764
765    .align 1
766    .thumb_func
767    .weak USB1_NEEDCLK_IRQHandler
768    .type USB1_NEEDCLK_IRQHandler, %function
769USB1_NEEDCLK_IRQHandler:
770    ldr   r0,=USB1_NEEDCLK_DriverIRQHandler
771    bx    r0
772    .size USB1_NEEDCLK_IRQHandler, . - USB1_NEEDCLK_IRQHandler
773
774    .align 1
775    .thumb_func
776    .weak ETHERNET_IRQHandler
777    .type ETHERNET_IRQHandler, %function
778ETHERNET_IRQHandler:
779    ldr   r0,=ETHERNET_DriverIRQHandler
780    bx    r0
781    .size ETHERNET_IRQHandler, . - ETHERNET_IRQHandler
782
783    .align 1
784    .thumb_func
785    .weak ETHERNET_PMT_IRQHandler
786    .type ETHERNET_PMT_IRQHandler, %function
787ETHERNET_PMT_IRQHandler:
788    ldr   r0,=ETHERNET_PMT_DriverIRQHandler
789    bx    r0
790    .size ETHERNET_PMT_IRQHandler, . - ETHERNET_PMT_IRQHandler
791
792    .align 1
793    .thumb_func
794    .weak ETHERNET_MACLP_IRQHandler
795    .type ETHERNET_MACLP_IRQHandler, %function
796ETHERNET_MACLP_IRQHandler:
797    ldr   r0,=ETHERNET_MACLP_DriverIRQHandler
798    bx    r0
799    .size ETHERNET_MACLP_IRQHandler, . - ETHERNET_MACLP_IRQHandler
800
801    .align 1
802    .thumb_func
803    .weak Reserved68_IRQHandler
804    .type Reserved68_IRQHandler, %function
805Reserved68_IRQHandler:
806    ldr   r0,=Reserved68_DriverIRQHandler
807    bx    r0
808    .size Reserved68_IRQHandler, . - Reserved68_IRQHandler
809
810    .align 1
811    .thumb_func
812    .weak LCD_IRQHandler
813    .type LCD_IRQHandler, %function
814LCD_IRQHandler:
815    ldr   r0,=LCD_DriverIRQHandler
816    bx    r0
817    .size LCD_IRQHandler, . - LCD_IRQHandler
818
819    .align 1
820    .thumb_func
821    .weak SHA_IRQHandler
822    .type SHA_IRQHandler, %function
823SHA_IRQHandler:
824    ldr   r0,=SHA_DriverIRQHandler
825    bx    r0
826    .size SHA_IRQHandler, . - SHA_IRQHandler
827
828    .align 1
829    .thumb_func
830    .weak SMARTCARD0_IRQHandler
831    .type SMARTCARD0_IRQHandler, %function
832SMARTCARD0_IRQHandler:
833    ldr   r0,=SMARTCARD0_DriverIRQHandler
834    bx    r0
835    .size SMARTCARD0_IRQHandler, . - SMARTCARD0_IRQHandler
836
837    .align 1
838    .thumb_func
839    .weak SMARTCARD1_IRQHandler
840    .type SMARTCARD1_IRQHandler, %function
841SMARTCARD1_IRQHandler:
842    ldr   r0,=SMARTCARD1_DriverIRQHandler
843    bx    r0
844    .size SMARTCARD1_IRQHandler, . - SMARTCARD1_IRQHandler
845
846
847/*    Macro to define default handlers. Default handler
848 *    will be weak symbol and just dead loops. They can be
849 *    overwritten by other handlers */
850    .macro def_irq_handler  handler_name
851    .weak \handler_name
852    .set  \handler_name, DefaultISR
853    .endm
854/* Exception Handlers */
855    def_irq_handler    MemManage_Handler
856    def_irq_handler    BusFault_Handler
857    def_irq_handler    UsageFault_Handler
858    def_irq_handler    DebugMon_Handler
859    def_irq_handler    WDT_BOD_DriverIRQHandler
860    def_irq_handler    DMA0_DriverIRQHandler
861    def_irq_handler    GINT0_DriverIRQHandler
862    def_irq_handler    GINT1_DriverIRQHandler
863    def_irq_handler    PIN_INT0_DriverIRQHandler
864    def_irq_handler    PIN_INT1_DriverIRQHandler
865    def_irq_handler    PIN_INT2_DriverIRQHandler
866    def_irq_handler    PIN_INT3_DriverIRQHandler
867    def_irq_handler    UTICK0_DriverIRQHandler
868    def_irq_handler    MRT0_DriverIRQHandler
869    def_irq_handler    CTIMER0_DriverIRQHandler
870    def_irq_handler    CTIMER1_DriverIRQHandler
871    def_irq_handler    SCT0_DriverIRQHandler
872    def_irq_handler    CTIMER3_DriverIRQHandler
873    def_irq_handler    FLEXCOMM0_DriverIRQHandler
874    def_irq_handler    FLEXCOMM1_DriverIRQHandler
875    def_irq_handler    FLEXCOMM2_DriverIRQHandler
876    def_irq_handler    FLEXCOMM3_DriverIRQHandler
877    def_irq_handler    FLEXCOMM4_DriverIRQHandler
878    def_irq_handler    FLEXCOMM5_DriverIRQHandler
879    def_irq_handler    FLEXCOMM6_DriverIRQHandler
880    def_irq_handler    FLEXCOMM7_DriverIRQHandler
881    def_irq_handler    ADC0_SEQA_DriverIRQHandler
882    def_irq_handler    ADC0_SEQB_DriverIRQHandler
883    def_irq_handler    ADC0_THCMP_DriverIRQHandler
884    def_irq_handler    DMIC0_DriverIRQHandler
885    def_irq_handler    HWVAD0_DriverIRQHandler
886    def_irq_handler    USB0_NEEDCLK_DriverIRQHandler
887    def_irq_handler    USB0_DriverIRQHandler
888    def_irq_handler    RTC_DriverIRQHandler
889    def_irq_handler    FLEXCOMM10_DriverIRQHandler
890    def_irq_handler    Reserved47_DriverIRQHandler
891    def_irq_handler    PIN_INT4_DriverIRQHandler
892    def_irq_handler    PIN_INT5_DriverIRQHandler
893    def_irq_handler    PIN_INT6_DriverIRQHandler
894    def_irq_handler    PIN_INT7_DriverIRQHandler
895    def_irq_handler    CTIMER2_DriverIRQHandler
896    def_irq_handler    CTIMER4_DriverIRQHandler
897    def_irq_handler    RIT_DriverIRQHandler
898    def_irq_handler    SPIFI0_DriverIRQHandler
899    def_irq_handler    FLEXCOMM8_DriverIRQHandler
900    def_irq_handler    FLEXCOMM9_DriverIRQHandler
901    def_irq_handler    SDIO_DriverIRQHandler
902    def_irq_handler    CAN0_IRQ0_DriverIRQHandler
903    def_irq_handler    CAN0_IRQ1_DriverIRQHandler
904    def_irq_handler    CAN1_IRQ0_DriverIRQHandler
905    def_irq_handler    CAN1_IRQ1_DriverIRQHandler
906    def_irq_handler    USB1_DriverIRQHandler
907    def_irq_handler    USB1_NEEDCLK_DriverIRQHandler
908    def_irq_handler    ETHERNET_DriverIRQHandler
909    def_irq_handler    ETHERNET_PMT_DriverIRQHandler
910    def_irq_handler    ETHERNET_MACLP_DriverIRQHandler
911    def_irq_handler    Reserved68_DriverIRQHandler
912    def_irq_handler    LCD_DriverIRQHandler
913    def_irq_handler    SHA_DriverIRQHandler
914    def_irq_handler    SMARTCARD0_DriverIRQHandler
915    def_irq_handler    SMARTCARD1_DriverIRQHandler
916
917    .end
918