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