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