1 //*****************************************************************************
2 // LPC5526_cm33_core0 startup code for use with MCUXpresso IDE
3 //
4 // Version : 010621
5 //*****************************************************************************
6 //
7 // Copyright 2016-2021 NXP
8 // All rights reserved.
9 //
10 // SPDX-License-Identifier: BSD-3-Clause
11 //*****************************************************************************
12
13 #if defined (DEBUG)
14 #pragma GCC push_options
15 #pragma GCC optimize ("Og")
16 #endif // (DEBUG)
17
18 #if defined (__cplusplus)
19 #ifdef __REDLIB__
20 #error Redlib does not support C++
21 #else
22 //*****************************************************************************
23 //
24 // The entry point for the C++ library startup
25 //
26 //*****************************************************************************
27 extern "C" {
28 extern void __libc_init_array(void);
29 }
30 #endif
31 #endif
32
33 #define WEAK __attribute__ ((weak))
34 #define WEAK_AV __attribute__ ((weak, section(".after_vectors")))
35 #define ALIAS(f) __attribute__ ((weak, alias (#f)))
36
37 //*****************************************************************************
38 #if defined (__cplusplus)
39 extern "C" {
40 #endif
41
42 //*****************************************************************************
43 // Variable to store CRP value in. Will be placed automatically
44 // by the linker when "Enable Code Read Protect" selected.
45 // See crp.h header for more information
46 //*****************************************************************************
47
48 //*****************************************************************************
49 // Declaration of external SystemInit function
50 //*****************************************************************************
51 #if defined (__USE_CMSIS)
52 extern void SystemInit(void);
53 #endif // (__USE_CMSIS)
54
55 //*****************************************************************************
56 // Forward declaration of the core exception handlers.
57 // When the application defines a handler (with the same name), this will
58 // automatically take precedence over these weak definitions.
59 // If your application is a C++ one, then any interrupt handlers defined
60 // in C++ files within in your main application will need to have C linkage
61 // rather than C++ linkage. To do this, make sure that you are using extern "C"
62 // { .... } around the interrupt handler within your main application code.
63 //*****************************************************************************
64 void ResetISR(void);
65 WEAK void NMI_Handler(void);
66 WEAK void HardFault_Handler(void);
67 WEAK void MemManage_Handler(void);
68 WEAK void BusFault_Handler(void);
69 WEAK void UsageFault_Handler(void);
70 WEAK void SecureFault_Handler(void);
71 WEAK void SVC_Handler(void);
72 WEAK void DebugMon_Handler(void);
73 WEAK void PendSV_Handler(void);
74 WEAK void SysTick_Handler(void);
75 WEAK void IntDefaultHandler(void);
76
77 //*****************************************************************************
78 // Forward declaration of the application IRQ handlers. When the application
79 // defines a handler (with the same name), this will automatically take
80 // precedence over weak definitions below
81 //*****************************************************************************
82 WEAK void WDT_BOD_IRQHandler(void);
83 WEAK void DMA0_IRQHandler(void);
84 WEAK void GINT0_IRQHandler(void);
85 WEAK void GINT1_IRQHandler(void);
86 WEAK void PIN_INT0_IRQHandler(void);
87 WEAK void PIN_INT1_IRQHandler(void);
88 WEAK void PIN_INT2_IRQHandler(void);
89 WEAK void PIN_INT3_IRQHandler(void);
90 WEAK void UTICK0_IRQHandler(void);
91 WEAK void MRT0_IRQHandler(void);
92 WEAK void CTIMER0_IRQHandler(void);
93 WEAK void CTIMER1_IRQHandler(void);
94 WEAK void SCT0_IRQHandler(void);
95 WEAK void CTIMER3_IRQHandler(void);
96 WEAK void FLEXCOMM0_IRQHandler(void);
97 WEAK void FLEXCOMM1_IRQHandler(void);
98 WEAK void FLEXCOMM2_IRQHandler(void);
99 WEAK void FLEXCOMM3_IRQHandler(void);
100 WEAK void FLEXCOMM4_IRQHandler(void);
101 WEAK void FLEXCOMM5_IRQHandler(void);
102 WEAK void FLEXCOMM6_IRQHandler(void);
103 WEAK void FLEXCOMM7_IRQHandler(void);
104 WEAK void ADC0_IRQHandler(void);
105 WEAK void Reserved39_IRQHandler(void);
106 WEAK void ACMP_IRQHandler(void);
107 WEAK void Reserved41_IRQHandler(void);
108 WEAK void Reserved42_IRQHandler(void);
109 WEAK void USB0_NEEDCLK_IRQHandler(void);
110 WEAK void USB0_IRQHandler(void);
111 WEAK void RTC_IRQHandler(void);
112 WEAK void Reserved46_IRQHandler(void);
113 WEAK void Reserved47_IRQHandler(void);
114 WEAK void PIN_INT4_IRQHandler(void);
115 WEAK void PIN_INT5_IRQHandler(void);
116 WEAK void PIN_INT6_IRQHandler(void);
117 WEAK void PIN_INT7_IRQHandler(void);
118 WEAK void CTIMER2_IRQHandler(void);
119 WEAK void CTIMER4_IRQHandler(void);
120 WEAK void OS_EVENT_IRQHandler(void);
121 WEAK void Reserved55_IRQHandler(void);
122 WEAK void Reserved56_IRQHandler(void);
123 WEAK void Reserved57_IRQHandler(void);
124 WEAK void SDIO_IRQHandler(void);
125 WEAK void Reserved59_IRQHandler(void);
126 WEAK void Reserved60_IRQHandler(void);
127 WEAK void Reserved61_IRQHandler(void);
128 WEAK void USB1_PHY_IRQHandler(void);
129 WEAK void USB1_IRQHandler(void);
130 WEAK void USB1_NEEDCLK_IRQHandler(void);
131 WEAK void SEC_HYPERVISOR_CALL_IRQHandler(void);
132 WEAK void SEC_GPIO_INT0_IRQ0_IRQHandler(void);
133 WEAK void SEC_GPIO_INT0_IRQ1_IRQHandler(void);
134 WEAK void PLU_IRQHandler(void);
135 WEAK void SEC_VIO_IRQHandler(void);
136 WEAK void Reserved70_IRQHandler(void);
137 WEAK void CASER_IRQHandler(void);
138 WEAK void Reserved72_IRQHandler(void);
139 WEAK void PQ_IRQHandler(void);
140 WEAK void DMA1_IRQHandler(void);
141 WEAK void FLEXCOMM8_IRQHandler(void);
142
143 //*****************************************************************************
144 // Forward declaration of the driver IRQ handlers. These are aliased
145 // to the IntDefaultHandler, which is a 'forever' loop. When the driver
146 // defines a handler (with the same name), this will automatically take
147 // precedence over these weak definitions
148 //*****************************************************************************
149 void WDT_BOD_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
150 void DMA0_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
151 void GINT0_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
152 void GINT1_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
153 void PIN_INT0_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
154 void PIN_INT1_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
155 void PIN_INT2_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
156 void PIN_INT3_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
157 void UTICK0_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
158 void MRT0_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
159 void CTIMER0_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
160 void CTIMER1_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
161 void SCT0_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
162 void CTIMER3_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
163 void FLEXCOMM0_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
164 void FLEXCOMM1_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
165 void FLEXCOMM2_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
166 void FLEXCOMM3_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
167 void FLEXCOMM4_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
168 void FLEXCOMM5_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
169 void FLEXCOMM6_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
170 void FLEXCOMM7_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
171 void ADC0_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
172 void Reserved39_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
173 void ACMP_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
174 void Reserved41_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
175 void Reserved42_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
176 void USB0_NEEDCLK_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
177 void USB0_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
178 void RTC_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
179 void Reserved46_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
180 void Reserved47_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
181 void PIN_INT4_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
182 void PIN_INT5_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
183 void PIN_INT6_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
184 void PIN_INT7_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
185 void CTIMER2_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
186 void CTIMER4_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
187 void OS_EVENT_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
188 void Reserved55_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
189 void Reserved56_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
190 void Reserved57_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
191 void SDIO_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
192 void Reserved59_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
193 void Reserved60_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
194 void Reserved61_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
195 void USB1_PHY_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
196 void USB1_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
197 void USB1_NEEDCLK_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
198 void SEC_HYPERVISOR_CALL_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
199 void SEC_GPIO_INT0_IRQ0_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
200 void SEC_GPIO_INT0_IRQ1_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
201 void PLU_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
202 void SEC_VIO_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
203 void Reserved70_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
204 void CASER_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
205 void Reserved72_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
206 void PQ_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
207 void DMA1_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
208 void FLEXCOMM8_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
209
210 //*****************************************************************************
211 // The entry point for the application.
212 // __main() is the entry point for Redlib based applications
213 // main() is the entry point for Newlib based applications
214 //*****************************************************************************
215 #if defined (__REDLIB__)
216 extern void __main(void);
217 #endif
218 extern int main(void);
219
220 //*****************************************************************************
221 // External declaration for the pointer to the stack top from the Linker Script
222 //*****************************************************************************
223 extern void _vStackTop(void);
224 //*****************************************************************************
225 // External declaration for LPC MCU vector table checksum from Linker Script
226 //*****************************************************************************
227 WEAK extern void __valid_user_code_checksum();
228 extern void _vStackBase(void);
229
230 //*****************************************************************************
231 //*****************************************************************************
232 #if defined (__cplusplus)
233 } // extern "C"
234 #endif
235 //*****************************************************************************
236 // The vector table.
237 // This relies on the linker script to place at correct location in memory.
238 //*****************************************************************************
239
240
241
242 extern void (* const g_pfnVectors[])(void);
243 extern void * __Vectors __attribute__ ((alias ("g_pfnVectors")));
244
245 __attribute__ ((used, section(".isr_vector")))
246 void (* const g_pfnVectors[])(void) = {
247 // Core Level - CM33
248 &_vStackTop, // The initial stack pointer
249 ResetISR, // The reset handler
250 NMI_Handler, // The NMI handler
251 HardFault_Handler, // The hard fault handler
252 MemManage_Handler, // The MPU fault handler
253 BusFault_Handler, // The bus fault handler
254 UsageFault_Handler, // The usage fault handler
255 SecureFault_Handler, // The secure fault handler
256 0, // ECRP
257 0, // Reserved
258 0, // Reserved
259 SVC_Handler, // SVCall handler
260 DebugMon_Handler, // Debug monitor handler
261 0, // Reserved
262 PendSV_Handler, // The PendSV handler
263 SysTick_Handler, // The SysTick handler
264
265 // Chip Level - LPC5526_cm33_core0
266 WDT_BOD_IRQHandler, // 16: Windowed watchdog timer, Brownout detect, Flash interrupt
267 DMA0_IRQHandler, // 17: DMA0 controller
268 GINT0_IRQHandler, // 18: GPIO group 0
269 GINT1_IRQHandler, // 19: GPIO group 1
270 PIN_INT0_IRQHandler, // 20: Pin interrupt 0 or pattern match engine slice 0
271 PIN_INT1_IRQHandler, // 21: Pin interrupt 1or pattern match engine slice 1
272 PIN_INT2_IRQHandler, // 22: Pin interrupt 2 or pattern match engine slice 2
273 PIN_INT3_IRQHandler, // 23: Pin interrupt 3 or pattern match engine slice 3
274 UTICK0_IRQHandler, // 24: Micro-tick Timer
275 MRT0_IRQHandler, // 25: Multi-rate timer
276 CTIMER0_IRQHandler, // 26: Standard counter/timer CTIMER0
277 CTIMER1_IRQHandler, // 27: Standard counter/timer CTIMER1
278 SCT0_IRQHandler, // 28: SCTimer/PWM
279 CTIMER3_IRQHandler, // 29: Standard counter/timer CTIMER3
280 FLEXCOMM0_IRQHandler, // 30: Flexcomm Interface 0 (USART, SPI, I2C, I2S, FLEXCOMM)
281 FLEXCOMM1_IRQHandler, // 31: Flexcomm Interface 1 (USART, SPI, I2C, I2S, FLEXCOMM)
282 FLEXCOMM2_IRQHandler, // 32: Flexcomm Interface 2 (USART, SPI, I2C, I2S, FLEXCOMM)
283 FLEXCOMM3_IRQHandler, // 33: Flexcomm Interface 3 (USART, SPI, I2C, I2S, FLEXCOMM)
284 FLEXCOMM4_IRQHandler, // 34: Flexcomm Interface 4 (USART, SPI, I2C, I2S, FLEXCOMM)
285 FLEXCOMM5_IRQHandler, // 35: Flexcomm Interface 5 (USART, SPI, I2C, I2S, FLEXCOMM)
286 FLEXCOMM6_IRQHandler, // 36: Flexcomm Interface 6 (USART, SPI, I2C, I2S, FLEXCOMM)
287 FLEXCOMM7_IRQHandler, // 37: Flexcomm Interface 7 (USART, SPI, I2C, I2S, FLEXCOMM)
288 ADC0_IRQHandler, // 38: ADC0
289 Reserved39_IRQHandler, // 39: Reserved interrupt
290 ACMP_IRQHandler, // 40: ACMP interrupts
291 Reserved41_IRQHandler, // 41: Reserved interrupt
292 Reserved42_IRQHandler, // 42: Reserved interrupt
293 USB0_NEEDCLK_IRQHandler, // 43: USB Activity Wake-up Interrupt
294 USB0_IRQHandler, // 44: USB device
295 RTC_IRQHandler, // 45: RTC alarm and wake-up interrupts
296 Reserved46_IRQHandler, // 46: Reserved interrupt
297 Reserved47_IRQHandler, // 47: Reserved interrupt
298 PIN_INT4_IRQHandler, // 48: Pin interrupt 4 or pattern match engine slice 4 int
299 PIN_INT5_IRQHandler, // 49: Pin interrupt 5 or pattern match engine slice 5 int
300 PIN_INT6_IRQHandler, // 50: Pin interrupt 6 or pattern match engine slice 6 int
301 PIN_INT7_IRQHandler, // 51: Pin interrupt 7 or pattern match engine slice 7 int
302 CTIMER2_IRQHandler, // 52: Standard counter/timer CTIMER2
303 CTIMER4_IRQHandler, // 53: Standard counter/timer CTIMER4
304 OS_EVENT_IRQHandler, // 54: OSEVTIMER0 and OSEVTIMER0_WAKEUP interrupts
305 Reserved55_IRQHandler, // 55: Reserved interrupt
306 Reserved56_IRQHandler, // 56: Reserved interrupt
307 Reserved57_IRQHandler, // 57: Reserved interrupt
308 SDIO_IRQHandler, // 58: SD/MMC
309 Reserved59_IRQHandler, // 59: Reserved interrupt
310 Reserved60_IRQHandler, // 60: Reserved interrupt
311 Reserved61_IRQHandler, // 61: Reserved interrupt
312 USB1_PHY_IRQHandler, // 62: USB1_PHY
313 USB1_IRQHandler, // 63: USB1 interrupt
314 USB1_NEEDCLK_IRQHandler, // 64: USB1 activity
315 SEC_HYPERVISOR_CALL_IRQHandler, // 65: SEC_HYPERVISOR_CALL interrupt
316 SEC_GPIO_INT0_IRQ0_IRQHandler, // 66: SEC_GPIO_INT0_IRQ0 interrupt
317 SEC_GPIO_INT0_IRQ1_IRQHandler, // 67: SEC_GPIO_INT0_IRQ1 interrupt
318 PLU_IRQHandler, // 68: PLU interrupt
319 SEC_VIO_IRQHandler, // 69: SEC_VIO interrupt
320 Reserved70_IRQHandler, // 70: Reserved interrupt
321 CASER_IRQHandler, // 71: CASPER interrupt
322 Reserved72_IRQHandler, // 72: Reserved interrupt
323 PQ_IRQHandler, // 73: PQ interrupt
324 DMA1_IRQHandler, // 74: DMA1 interrupt
325 FLEXCOMM8_IRQHandler, // 75: Flexcomm Interface 8 (SPI, , FLEXCOMM)
326
327
328 }; /* End of g_pfnVectors */
329
330 //*****************************************************************************
331 // Functions to carry out the initialization of RW and BSS data sections. These
332 // are written as separate functions rather than being inlined within the
333 // ResetISR() function in order to cope with MCUs with multiple banks of
334 // memory.
335 //*****************************************************************************
336 __attribute__ ((section(".after_vectors.init_data")))
data_init(unsigned int romstart,unsigned int start,unsigned int len)337 void data_init(unsigned int romstart, unsigned int start, unsigned int len) {
338 unsigned int *pulDest = (unsigned int*) start;
339 unsigned int *pulSrc = (unsigned int*) romstart;
340 unsigned int loop;
341 for (loop = 0; loop < len; loop = loop + 4)
342 *pulDest++ = *pulSrc++;
343 }
344
345 __attribute__ ((section(".after_vectors.init_bss")))
bss_init(unsigned int start,unsigned int len)346 void bss_init(unsigned int start, unsigned int len) {
347 unsigned int *pulDest = (unsigned int*) start;
348 unsigned int loop;
349 for (loop = 0; loop < len; loop = loop + 4)
350 *pulDest++ = 0;
351 }
352
353 //*****************************************************************************
354 // The following symbols are constructs generated by the linker, indicating
355 // the location of various points in the "Global Section Table". This table is
356 // created by the linker via the Code Red managed linker script mechanism. It
357 // contains the load address, execution address and length of each RW data
358 // section and the execution and length of each BSS (zero initialized) section.
359 //*****************************************************************************
360 extern unsigned int __data_section_table;
361 extern unsigned int __data_section_table_end;
362 extern unsigned int __bss_section_table;
363 extern unsigned int __bss_section_table_end;
364
365 //*****************************************************************************
366 // Reset entry point for your code.
367 // Sets up a simple runtime environment and initializes the C/C++
368 // library.
369 //*****************************************************************************
370 __attribute__ ((naked, section(".after_vectors.reset")))
ResetISR(void)371 void ResetISR(void) {
372
373
374 // Disable interrupts
375 __asm volatile ("cpsid i");
376
377 // Config VTOR & MSPLIM register
378 __asm volatile ("LDR R0, =0xE000ED08 \n"
379 "STR %0, [R0] \n"
380 "LDR R1, [%0] \n"
381 "MSR MSP, R1 \n"
382 "MSR MSPLIM, %1 \n"
383 :
384 : "r"(g_pfnVectors), "r"(_vStackBase)
385 : "r0", "r1");
386
387
388
389
390 #if defined (__USE_CMSIS)
391 // If __USE_CMSIS defined, then call CMSIS SystemInit code
392 SystemInit();
393
394 #endif // (__USE_CMSIS)
395
396 //
397 // Copy the data sections from flash to SRAM.
398 //
399 unsigned int LoadAddr, ExeAddr, SectionLen;
400 unsigned int *SectionTableAddr;
401
402 // Load base address of Global Section Table
403 SectionTableAddr = &__data_section_table;
404
405 // Copy the data sections from flash to SRAM.
406 while (SectionTableAddr < &__data_section_table_end) {
407 LoadAddr = *SectionTableAddr++;
408 ExeAddr = *SectionTableAddr++;
409 SectionLen = *SectionTableAddr++;
410 data_init(LoadAddr, ExeAddr, SectionLen);
411 }
412
413 // At this point, SectionTableAddr = &__bss_section_table;
414 // Zero fill the bss segment
415 while (SectionTableAddr < &__bss_section_table_end) {
416 ExeAddr = *SectionTableAddr++;
417 SectionLen = *SectionTableAddr++;
418 bss_init(ExeAddr, SectionLen);
419 }
420
421
422 #if !defined (__USE_CMSIS)
423 // Assume that if __USE_CMSIS defined, then CMSIS SystemInit code
424 // will setup the VTOR register
425
426 // Check to see if we are running the code from a non-zero
427 // address (eg RAM, external flash), in which case we need
428 // to modify the VTOR register to tell the CPU that the
429 // vector table is located at a non-0x0 address.
430 unsigned int * pSCB_VTOR = (unsigned int *) 0xE000ED08;
431 if ((unsigned int *)g_pfnVectors!=(unsigned int *) 0x00000000) {
432 *pSCB_VTOR = (unsigned int)g_pfnVectors;
433 }
434 #endif // (__USE_CMSIS)
435 #if defined (__cplusplus)
436 //
437 // Call C++ library initialisation
438 //
439 __libc_init_array();
440 #endif
441
442 // Reenable interrupts
443 __asm volatile ("cpsie i");
444
445 #if defined (__REDLIB__)
446 // Call the Redlib library, which in turn calls main()
447 __main();
448 #else
449 main();
450 #endif
451
452 //
453 // main() shouldn't return, but if it does, we'll just enter an infinite loop
454 //
455 while (1) {
456 ;
457 }
458 }
459
460 //*****************************************************************************
461 // Default core exception handlers. Override the ones here by defining your own
462 // handler routines in your application code.
463 //*****************************************************************************
NMI_Handler(void)464 WEAK_AV void NMI_Handler(void)
465 { while(1) {}
466 }
467
HardFault_Handler(void)468 WEAK_AV void HardFault_Handler(void)
469 { while(1) {}
470 }
471
MemManage_Handler(void)472 WEAK_AV void MemManage_Handler(void)
473 { while(1) {}
474 }
475
BusFault_Handler(void)476 WEAK_AV void BusFault_Handler(void)
477 { while(1) {}
478 }
479
UsageFault_Handler(void)480 WEAK_AV void UsageFault_Handler(void)
481 { while(1) {}
482 }
483
SecureFault_Handler(void)484 WEAK_AV void SecureFault_Handler(void)
485 { while(1) {}
486 }
487
SVC_Handler(void)488 WEAK_AV void SVC_Handler(void)
489 { while(1) {}
490 }
491
DebugMon_Handler(void)492 WEAK_AV void DebugMon_Handler(void)
493 { while(1) {}
494 }
495
PendSV_Handler(void)496 WEAK_AV void PendSV_Handler(void)
497 { while(1) {}
498 }
499
SysTick_Handler(void)500 WEAK_AV void SysTick_Handler(void)
501 { while(1) {}
502 }
503
504 //*****************************************************************************
505 // Processor ends up here if an unexpected interrupt occurs or a specific
506 // handler is not present in the application code.
507 //*****************************************************************************
IntDefaultHandler(void)508 WEAK_AV void IntDefaultHandler(void)
509 { while(1) {}
510 }
511
512 //*****************************************************************************
513 // Default application exception handlers. Override the ones here by defining
514 // your own handler routines in your application code. These routines call
515 // driver exception handlers or IntDefaultHandler() if no driver exception
516 // handler is included.
517 //*****************************************************************************
WDT_BOD_IRQHandler(void)518 WEAK void WDT_BOD_IRQHandler(void)
519 { WDT_BOD_DriverIRQHandler();
520 }
521
DMA0_IRQHandler(void)522 WEAK void DMA0_IRQHandler(void)
523 { DMA0_DriverIRQHandler();
524 }
525
GINT0_IRQHandler(void)526 WEAK void GINT0_IRQHandler(void)
527 { GINT0_DriverIRQHandler();
528 }
529
GINT1_IRQHandler(void)530 WEAK void GINT1_IRQHandler(void)
531 { GINT1_DriverIRQHandler();
532 }
533
PIN_INT0_IRQHandler(void)534 WEAK void PIN_INT0_IRQHandler(void)
535 { PIN_INT0_DriverIRQHandler();
536 }
537
PIN_INT1_IRQHandler(void)538 WEAK void PIN_INT1_IRQHandler(void)
539 { PIN_INT1_DriverIRQHandler();
540 }
541
PIN_INT2_IRQHandler(void)542 WEAK void PIN_INT2_IRQHandler(void)
543 { PIN_INT2_DriverIRQHandler();
544 }
545
PIN_INT3_IRQHandler(void)546 WEAK void PIN_INT3_IRQHandler(void)
547 { PIN_INT3_DriverIRQHandler();
548 }
549
UTICK0_IRQHandler(void)550 WEAK void UTICK0_IRQHandler(void)
551 { UTICK0_DriverIRQHandler();
552 }
553
MRT0_IRQHandler(void)554 WEAK void MRT0_IRQHandler(void)
555 { MRT0_DriverIRQHandler();
556 }
557
CTIMER0_IRQHandler(void)558 WEAK void CTIMER0_IRQHandler(void)
559 { CTIMER0_DriverIRQHandler();
560 }
561
CTIMER1_IRQHandler(void)562 WEAK void CTIMER1_IRQHandler(void)
563 { CTIMER1_DriverIRQHandler();
564 }
565
SCT0_IRQHandler(void)566 WEAK void SCT0_IRQHandler(void)
567 { SCT0_DriverIRQHandler();
568 }
569
CTIMER3_IRQHandler(void)570 WEAK void CTIMER3_IRQHandler(void)
571 { CTIMER3_DriverIRQHandler();
572 }
573
FLEXCOMM0_IRQHandler(void)574 WEAK void FLEXCOMM0_IRQHandler(void)
575 { FLEXCOMM0_DriverIRQHandler();
576 }
577
FLEXCOMM1_IRQHandler(void)578 WEAK void FLEXCOMM1_IRQHandler(void)
579 { FLEXCOMM1_DriverIRQHandler();
580 }
581
FLEXCOMM2_IRQHandler(void)582 WEAK void FLEXCOMM2_IRQHandler(void)
583 { FLEXCOMM2_DriverIRQHandler();
584 }
585
FLEXCOMM3_IRQHandler(void)586 WEAK void FLEXCOMM3_IRQHandler(void)
587 { FLEXCOMM3_DriverIRQHandler();
588 }
589
FLEXCOMM4_IRQHandler(void)590 WEAK void FLEXCOMM4_IRQHandler(void)
591 { FLEXCOMM4_DriverIRQHandler();
592 }
593
FLEXCOMM5_IRQHandler(void)594 WEAK void FLEXCOMM5_IRQHandler(void)
595 { FLEXCOMM5_DriverIRQHandler();
596 }
597
FLEXCOMM6_IRQHandler(void)598 WEAK void FLEXCOMM6_IRQHandler(void)
599 { FLEXCOMM6_DriverIRQHandler();
600 }
601
FLEXCOMM7_IRQHandler(void)602 WEAK void FLEXCOMM7_IRQHandler(void)
603 { FLEXCOMM7_DriverIRQHandler();
604 }
605
ADC0_IRQHandler(void)606 WEAK void ADC0_IRQHandler(void)
607 { ADC0_DriverIRQHandler();
608 }
609
Reserved39_IRQHandler(void)610 WEAK void Reserved39_IRQHandler(void)
611 { Reserved39_DriverIRQHandler();
612 }
613
ACMP_IRQHandler(void)614 WEAK void ACMP_IRQHandler(void)
615 { ACMP_DriverIRQHandler();
616 }
617
Reserved41_IRQHandler(void)618 WEAK void Reserved41_IRQHandler(void)
619 { Reserved41_DriverIRQHandler();
620 }
621
Reserved42_IRQHandler(void)622 WEAK void Reserved42_IRQHandler(void)
623 { Reserved42_DriverIRQHandler();
624 }
625
USB0_NEEDCLK_IRQHandler(void)626 WEAK void USB0_NEEDCLK_IRQHandler(void)
627 { USB0_NEEDCLK_DriverIRQHandler();
628 }
629
USB0_IRQHandler(void)630 WEAK void USB0_IRQHandler(void)
631 { USB0_DriverIRQHandler();
632 }
633
RTC_IRQHandler(void)634 WEAK void RTC_IRQHandler(void)
635 { RTC_DriverIRQHandler();
636 }
637
Reserved46_IRQHandler(void)638 WEAK void Reserved46_IRQHandler(void)
639 { Reserved46_DriverIRQHandler();
640 }
641
Reserved47_IRQHandler(void)642 WEAK void Reserved47_IRQHandler(void)
643 { Reserved47_DriverIRQHandler();
644 }
645
PIN_INT4_IRQHandler(void)646 WEAK void PIN_INT4_IRQHandler(void)
647 { PIN_INT4_DriverIRQHandler();
648 }
649
PIN_INT5_IRQHandler(void)650 WEAK void PIN_INT5_IRQHandler(void)
651 { PIN_INT5_DriverIRQHandler();
652 }
653
PIN_INT6_IRQHandler(void)654 WEAK void PIN_INT6_IRQHandler(void)
655 { PIN_INT6_DriverIRQHandler();
656 }
657
PIN_INT7_IRQHandler(void)658 WEAK void PIN_INT7_IRQHandler(void)
659 { PIN_INT7_DriverIRQHandler();
660 }
661
CTIMER2_IRQHandler(void)662 WEAK void CTIMER2_IRQHandler(void)
663 { CTIMER2_DriverIRQHandler();
664 }
665
CTIMER4_IRQHandler(void)666 WEAK void CTIMER4_IRQHandler(void)
667 { CTIMER4_DriverIRQHandler();
668 }
669
OS_EVENT_IRQHandler(void)670 WEAK void OS_EVENT_IRQHandler(void)
671 { OS_EVENT_DriverIRQHandler();
672 }
673
Reserved55_IRQHandler(void)674 WEAK void Reserved55_IRQHandler(void)
675 { Reserved55_DriverIRQHandler();
676 }
677
Reserved56_IRQHandler(void)678 WEAK void Reserved56_IRQHandler(void)
679 { Reserved56_DriverIRQHandler();
680 }
681
Reserved57_IRQHandler(void)682 WEAK void Reserved57_IRQHandler(void)
683 { Reserved57_DriverIRQHandler();
684 }
685
SDIO_IRQHandler(void)686 WEAK void SDIO_IRQHandler(void)
687 { SDIO_DriverIRQHandler();
688 }
689
Reserved59_IRQHandler(void)690 WEAK void Reserved59_IRQHandler(void)
691 { Reserved59_DriverIRQHandler();
692 }
693
Reserved60_IRQHandler(void)694 WEAK void Reserved60_IRQHandler(void)
695 { Reserved60_DriverIRQHandler();
696 }
697
Reserved61_IRQHandler(void)698 WEAK void Reserved61_IRQHandler(void)
699 { Reserved61_DriverIRQHandler();
700 }
701
USB1_PHY_IRQHandler(void)702 WEAK void USB1_PHY_IRQHandler(void)
703 { USB1_PHY_DriverIRQHandler();
704 }
705
USB1_IRQHandler(void)706 WEAK void USB1_IRQHandler(void)
707 { USB1_DriverIRQHandler();
708 }
709
USB1_NEEDCLK_IRQHandler(void)710 WEAK void USB1_NEEDCLK_IRQHandler(void)
711 { USB1_NEEDCLK_DriverIRQHandler();
712 }
713
SEC_HYPERVISOR_CALL_IRQHandler(void)714 WEAK void SEC_HYPERVISOR_CALL_IRQHandler(void)
715 { SEC_HYPERVISOR_CALL_DriverIRQHandler();
716 }
717
SEC_GPIO_INT0_IRQ0_IRQHandler(void)718 WEAK void SEC_GPIO_INT0_IRQ0_IRQHandler(void)
719 { SEC_GPIO_INT0_IRQ0_DriverIRQHandler();
720 }
721
SEC_GPIO_INT0_IRQ1_IRQHandler(void)722 WEAK void SEC_GPIO_INT0_IRQ1_IRQHandler(void)
723 { SEC_GPIO_INT0_IRQ1_DriverIRQHandler();
724 }
725
PLU_IRQHandler(void)726 WEAK void PLU_IRQHandler(void)
727 { PLU_DriverIRQHandler();
728 }
729
SEC_VIO_IRQHandler(void)730 WEAK void SEC_VIO_IRQHandler(void)
731 { SEC_VIO_DriverIRQHandler();
732 }
733
Reserved70_IRQHandler(void)734 WEAK void Reserved70_IRQHandler(void)
735 { Reserved70_DriverIRQHandler();
736 }
737
CASER_IRQHandler(void)738 WEAK void CASER_IRQHandler(void)
739 { CASER_DriverIRQHandler();
740 }
741
Reserved72_IRQHandler(void)742 WEAK void Reserved72_IRQHandler(void)
743 { Reserved72_DriverIRQHandler();
744 }
745
PQ_IRQHandler(void)746 WEAK void PQ_IRQHandler(void)
747 { PQ_DriverIRQHandler();
748 }
749
DMA1_IRQHandler(void)750 WEAK void DMA1_IRQHandler(void)
751 { DMA1_DriverIRQHandler();
752 }
753
FLEXCOMM8_IRQHandler(void)754 WEAK void FLEXCOMM8_IRQHandler(void)
755 { FLEXCOMM8_DriverIRQHandler();
756 }
757
758 //*****************************************************************************
759
760 #if defined (DEBUG)
761 #pragma GCC pop_options
762 #endif // (DEBUG)
763