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