aboutsummaryrefslogtreecommitdiff
path: root/lib/chibios-contrib/ext/mcux-sdk/devices/K32L3A60/mcuxpresso/startup_k32l3a60_cm0plus.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chibios-contrib/ext/mcux-sdk/devices/K32L3A60/mcuxpresso/startup_k32l3a60_cm0plus.cpp')
-rw-r--r--lib/chibios-contrib/ext/mcux-sdk/devices/K32L3A60/mcuxpresso/startup_k32l3a60_cm0plus.cpp748
1 files changed, 748 insertions, 0 deletions
diff --git a/lib/chibios-contrib/ext/mcux-sdk/devices/K32L3A60/mcuxpresso/startup_k32l3a60_cm0plus.cpp b/lib/chibios-contrib/ext/mcux-sdk/devices/K32L3A60/mcuxpresso/startup_k32l3a60_cm0plus.cpp
new file mode 100644
index 000000000..159f3acf4
--- /dev/null
+++ b/lib/chibios-contrib/ext/mcux-sdk/devices/K32L3A60/mcuxpresso/startup_k32l3a60_cm0plus.cpp
@@ -0,0 +1,748 @@
1//*****************************************************************************
2// K32L3A60_cm0plus startup code for use with MCUXpresso IDE
3//
4// Version : 160420
5//*****************************************************************************
6//
7// Copyright 2016-2020 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//*****************************************************************************
27extern "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)
39extern "C" {
40#endif
41
42//*****************************************************************************
43// Declaration of external SystemInit function
44//*****************************************************************************
45#if defined (__USE_CMSIS)
46extern void SystemInit(void);
47#endif // (__USE_CMSIS)
48
49//*****************************************************************************
50// Forward declaration of the core exception handlers.
51// When the application defines a handler (with the same name), this will
52// automatically take precedence over these weak definitions.
53// If your application is a C++ one, then any interrupt handlers defined
54// in C++ files within in your main application will need to have C linkage
55// rather than C++ linkage. To do this, make sure that you are using extern "C"
56// { .... } around the interrupt handler within your main application code.
57//*****************************************************************************
58 void ResetISR(void);
59WEAK void NMI_Handler(void);
60WEAK void HardFault_Handler(void);
61WEAK void SVC_Handler(void);
62WEAK void PendSV_Handler(void);
63WEAK void SysTick_Handler(void);
64WEAK void IntDefaultHandler(void);
65
66//*****************************************************************************
67// Forward declaration of the application IRQ handlers. When the application
68// defines a handler (with the same name), this will automatically take
69// precedence over weak definitions below
70//*****************************************************************************
71WEAK void CTI1_IRQHandler(void);
72WEAK void DMA1_04_IRQHandler(void);
73WEAK void DMA1_15_IRQHandler(void);
74WEAK void DMA1_26_IRQHandler(void);
75WEAK void DMA1_37_IRQHandler(void);
76WEAK void DMA1_Error_IRQHandler(void);
77WEAK void MSMC_IRQHandler(void);
78WEAK void LLWU1_IRQHandler(void);
79WEAK void MUB_IRQHandler(void);
80WEAK void WDOG1_IRQHandler(void);
81WEAK void CAU3_Task_Complete_IRQHandler(void);
82WEAK void CAU3_Security_Violation_IRQHandler(void);
83WEAK void TRNG_IRQHandler(void);
84WEAK void LPIT1_IRQHandler(void);
85WEAK void LPTMR2_IRQHandler(void);
86WEAK void TPM3_IRQHandler(void);
87WEAK void LPI2C3_IRQHandler(void);
88WEAK void Reserved33_IRQHandler(void);
89WEAK void Reserved34_IRQHandler(void);
90WEAK void LPSPI3_IRQHandler(void);
91WEAK void LPUART3_IRQHandler(void);
92WEAK void PORTE_IRQHandler(void);
93WEAK void LPCMP1_IRQHandler(void);
94WEAK void RTC_IRQHandler(void);
95WEAK void INTMUX1_0_IRQHandler(void);
96WEAK void INTMUX1_1_IRQHandler(void);
97WEAK void INTMUX1_2_IRQHandler(void);
98WEAK void INTMUX1_3_IRQHandler(void);
99WEAK void INTMUX1_4_IRQHandler(void);
100WEAK void INTMUX1_5_IRQHandler(void);
101WEAK void INTMUX1_6_IRQHandler(void);
102WEAK void INTMUX1_7_IRQHandler(void);
103WEAK void EWM_IRQHandler(void);
104WEAK void FTFE_Command_Complete_IRQHandler(void);
105WEAK void FTFE_Read_Collision_IRQHandler(void);
106WEAK void SPM_IRQHandler(void);
107WEAK void SCG_IRQHandler(void);
108WEAK void LPIT0_IRQHandler(void);
109WEAK void LPTMR0_IRQHandler(void);
110WEAK void LPTMR1_IRQHandler(void);
111WEAK void TPM0_IRQHandler(void);
112WEAK void TPM1_IRQHandler(void);
113WEAK void TPM2_IRQHandler(void);
114WEAK void EMVSIM0_IRQHandler(void);
115WEAK void FLEXIO0_IRQHandler(void);
116WEAK void LPI2C0_IRQHandler(void);
117WEAK void LPI2C1_IRQHandler(void);
118WEAK void LPI2C2_IRQHandler(void);
119WEAK void I2S0_IRQHandler(void);
120WEAK void USDHC0_IRQHandler(void);
121WEAK void LPSPI0_IRQHandler(void);
122WEAK void LPSPI1_IRQHandler(void);
123WEAK void LPSPI2_IRQHandler(void);
124WEAK void LPUART0_IRQHandler(void);
125WEAK void LPUART1_IRQHandler(void);
126WEAK void LPUART2_IRQHandler(void);
127WEAK void USB0_IRQHandler(void);
128WEAK void PORTA_IRQHandler(void);
129WEAK void PORTB_IRQHandler(void);
130WEAK void PORTC_IRQHandler(void);
131WEAK void PORTD_IRQHandler(void);
132WEAK void LPADC0_IRQHandler(void);
133WEAK void LPCMP0_IRQHandler(void);
134WEAK void LPDAC0_IRQHandler(void);
135
136//*****************************************************************************
137// Forward declaration of the driver IRQ handlers. These are aliased
138// to the IntDefaultHandler, which is a 'forever' loop. When the driver
139// defines a handler (with the same name), this will automatically take
140// precedence over these weak definitions
141//*****************************************************************************
142void CTI1_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
143void DMA1_04_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
144void DMA1_15_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
145void DMA1_26_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
146void DMA1_37_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
147void DMA1_Error_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
148void MSMC_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
149void LLWU1_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
150void MUB_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
151void WDOG1_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
152void CAU3_Task_Complete_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
153void CAU3_Security_Violation_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
154void TRNG_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
155void LPIT1_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
156void LPTMR2_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
157void TPM3_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
158void LPI2C3_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
159void Reserved33_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
160void Reserved34_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
161void LPSPI3_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
162void LPUART3_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
163void PORTE_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
164void LPCMP1_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
165void RTC_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
166void INTMUX1_0_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
167void INTMUX1_1_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
168void INTMUX1_2_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
169void INTMUX1_3_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
170void INTMUX1_4_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
171void INTMUX1_5_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
172void INTMUX1_6_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
173void INTMUX1_7_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
174void EWM_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
175void FTFE_Command_Complete_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
176void FTFE_Read_Collision_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
177void SPM_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
178void SCG_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
179void LPIT0_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
180void LPTMR0_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
181void LPTMR1_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
182void TPM0_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
183void TPM1_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
184void TPM2_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
185void EMVSIM0_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
186void FLEXIO0_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
187void LPI2C0_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
188void LPI2C1_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
189void LPI2C2_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
190void I2S0_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
191void USDHC0_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
192void LPSPI0_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
193void LPSPI1_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
194void LPSPI2_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
195void LPUART0_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
196void LPUART1_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
197void LPUART2_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
198void USB0_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
199void PORTA_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
200void PORTB_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
201void PORTC_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
202void PORTD_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
203void LPADC0_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
204void LPCMP0_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
205void LPDAC0_DriverIRQHandler(void) ALIAS(IntDefaultHandler);
206
207//*****************************************************************************
208// The entry point for the application.
209// __main() is the entry point for Redlib based applications
210// main() is the entry point for Newlib based applications
211//*****************************************************************************
212#if defined (__REDLIB__)
213extern void __main(void);
214#endif
215extern int main(void);
216
217//*****************************************************************************
218// External declaration for the pointer to the stack top from the Linker Script
219//*****************************************************************************
220extern void _vStackTop(void);
221//*****************************************************************************
222#if defined (__cplusplus)
223} // extern "C"
224#endif
225//*****************************************************************************
226// The vector table.
227// This relies on the linker script to place at correct location in memory.
228//*****************************************************************************
229
230
231
232extern void (* const g_pfnVectors[])(void);
233extern void * __Vectors __attribute__ ((alias ("g_pfnVectors")));
234
235__attribute__ ((used, section(".isr_vector")))
236void (* const g_pfnVectors[])(void) = {
237 // Core Level - CM0P
238 &_vStackTop, // The initial stack pointer
239 ResetISR, // The reset handler
240 NMI_Handler, // The NMI handler
241 HardFault_Handler, // The hard fault handler
242 0, // Reserved
243 0, // Reserved
244 0, // Reserved
245 0, // Reserved
246 0, // Reserved
247 0, // Reserved
248 0, // Reserved
249 SVC_Handler, // SVCall handler
250 0, // Reserved
251 0, // Reserved
252 PendSV_Handler, // The PendSV handler
253 SysTick_Handler, // The SysTick handler
254
255 // Chip Level - K32L3A60_cm0plus
256 CTI1_IRQHandler, // 16: Cross Trigger Interface 1
257 DMA1_04_IRQHandler, // 17: DMA1 channel 0/4 transfer complete
258 DMA1_15_IRQHandler, // 18: DMA1 channel 1/5 transfer complete
259 DMA1_26_IRQHandler, // 19: DMA1 channel 2/6 transfer complete
260 DMA1_37_IRQHandler, // 20: DMA1 channel 3/7 transfer complete
261 DMA1_Error_IRQHandler, // 21: DMA1 channel 0-7 error interrupt
262 MSMC_IRQHandler, // 22: MSMC (SMC1) interrupt
263 LLWU1_IRQHandler, // 23: Low leakage wakeup 1
264 MUB_IRQHandler, // 24: MU Side B interrupt
265 WDOG1_IRQHandler, // 25: WDOG1 interrupt
266 CAU3_Task_Complete_IRQHandler, // 26: Cryptographic Acceleration Unit version 3 Task Complete
267 CAU3_Security_Violation_IRQHandler, // 27: Cryptographic Acceleration Unit version 3 Security Violation
268 TRNG_IRQHandler, // 28: TRNG interrupt
269 LPIT1_IRQHandler, // 29: LPIT1 interrupt
270 LPTMR2_IRQHandler, // 30: LPTMR2 interrupt
271 TPM3_IRQHandler, // 31: TPM3 single interrupt vector for all sources
272 LPI2C3_IRQHandler, // 32: LPI2C3 interrupt
273 Reserved33_IRQHandler, // 33: Reserved interrupt
274 Reserved34_IRQHandler, // 34: Reserved interrupt
275 LPSPI3_IRQHandler, // 35: LPSPI3 single interrupt vector for all sources
276 LPUART3_IRQHandler, // 36: LPUART3 status and error
277 PORTE_IRQHandler, // 37: PORTE Pin detect
278 LPCMP1_IRQHandler, // 38: LPCMP1 interrupt
279 RTC_IRQHandler, // 39: RTC
280 INTMUX1_0_IRQHandler, // 40: INTMUX1 channel0 interrupt
281 INTMUX1_1_IRQHandler, // 41: INTMUX1 channel1 interrupt
282 INTMUX1_2_IRQHandler, // 42: INTMUX1 channel2 interrupt
283 INTMUX1_3_IRQHandler, // 43: INTMUX1 channel3 interrupt
284 INTMUX1_4_IRQHandler, // 44: INTMUX1 channel4 interrupt
285 INTMUX1_5_IRQHandler, // 45: INTMUX1 channel5 interrupt
286 INTMUX1_6_IRQHandler, // 46: INTMUX1 channel6 interrupt
287 INTMUX1_7_IRQHandler, // 47: INTMUX1 channel7 interrupt
288 EWM_IRQHandler, // 48: EWM interrupt (INTMUX1 source IRQ0)
289 FTFE_Command_Complete_IRQHandler, // 49: FTFE interrupt (INTMUX1 source IRQ1)
290 FTFE_Read_Collision_IRQHandler, // 50: FTFE interrupt (INTMUX1 source IRQ2)
291 SPM_IRQHandler, // 51: SPM (INTMUX1 source IRQ3)
292 SCG_IRQHandler, // 52: SCG interrupt (INTMUX1 source IRQ4)
293 LPIT0_IRQHandler, // 53: LPIT0 interrupt (INTMUX1 source IRQ5)
294 LPTMR0_IRQHandler, // 54: LPTMR0 interrupt (INTMUX1 source IRQ6)
295 LPTMR1_IRQHandler, // 55: LPTMR1 interrupt (INTMUX1 source IRQ7)
296 TPM0_IRQHandler, // 56: TPM0 single interrupt vector for all sources (INTMUX1 source IRQ8)
297 TPM1_IRQHandler, // 57: TPM1 single interrupt vector for all sources (INTMUX1 source IRQ9)
298 TPM2_IRQHandler, // 58: TPM2 single interrupt vector for all sources (INTMUX1 source IRQ10)
299 EMVSIM0_IRQHandler, // 59: EMVSIM0 interrupt (INTMUX1 source IRQ11)
300 FLEXIO0_IRQHandler, // 60: FLEXIO0 (INTMUX1 source IRQ12)
301 LPI2C0_IRQHandler, // 61: LPI2C0 interrupt (INTMUX1 source IRQ13)
302 LPI2C1_IRQHandler, // 62: LPI2C1 interrupt (INTMUX1 source IRQ14)
303 LPI2C2_IRQHandler, // 63: LPI2C2 interrupt (INTMUX1 source IRQ15)
304 I2S0_IRQHandler, // 64: I2S0 interrupt (INTMUX1 source IRQ16)
305 USDHC0_IRQHandler, // 65: SDHC0 interrupt (INTMUX1 source IRQ17)
306 LPSPI0_IRQHandler, // 66: LPSPI0 single interrupt vector for all sources (INTMUX1 source IRQ18)
307 LPSPI1_IRQHandler, // 67: LPSPI1 single interrupt vector for all sources (INTMUX1 source IRQ19)
308 LPSPI2_IRQHandler, // 68: LPSPI2 single interrupt vector for all sources (INTMUX1 source IRQ20)
309 LPUART0_IRQHandler, // 69: LPUART0 status and error (INTMUX1 source IRQ21)
310 LPUART1_IRQHandler, // 70: LPUART1 status and error (INTMUX1 source IRQ22)
311 LPUART2_IRQHandler, // 71: LPUART2 status and error (INTMUX1 source IRQ23)
312 USB0_IRQHandler, // 72: USB0 interrupt (INTMUX1 source IRQ24)
313 PORTA_IRQHandler, // 73: PORTA Pin detect (INTMUX1 source IRQ25)
314 PORTB_IRQHandler, // 74: PORTB Pin detect (INTMUX1 source IRQ26)
315 PORTC_IRQHandler, // 75: PORTC Pin detect (INTMUX1 source IRQ27)
316 PORTD_IRQHandler, // 76: PORTD Pin detect (INTMUX1 source IRQ28)
317 LPADC0_IRQHandler, // 77: LPADC0 interrupt (INTMUX1 source IRQ29)
318 LPCMP0_IRQHandler, // 78: LPCMP0 interrupt (INTMUX1 source IRQ30)
319 LPDAC0_IRQHandler, // 79: LPDAC0 interrupt (INTMUX1 source IRQ31)
320
321
322}; /* End of g_pfnVectors */
323
324//*****************************************************************************
325// Functions to carry out the initialization of RW and BSS data sections. These
326// are written as separate functions rather than being inlined within the
327// ResetISR() function in order to cope with MCUs with multiple banks of
328// memory.
329//*****************************************************************************
330__attribute__ ((section(".after_vectors.init_data")))
331void data_init(unsigned int romstart, unsigned int start, unsigned int len) {
332 unsigned int *pulDest = (unsigned int*) start;
333 unsigned int *pulSrc = (unsigned int*) romstart;
334 unsigned int loop;
335 for (loop = 0; loop < len; loop = loop + 4)
336 *pulDest++ = *pulSrc++;
337}
338
339__attribute__ ((section(".after_vectors.init_bss")))
340void bss_init(unsigned int start, unsigned int len) {
341 unsigned int *pulDest = (unsigned int*) start;
342 unsigned int loop;
343 for (loop = 0; loop < len; loop = loop + 4)
344 *pulDest++ = 0;
345}
346
347//*****************************************************************************
348// The following symbols are constructs generated by the linker, indicating
349// the location of various points in the "Global Section Table". This table is
350// created by the linker via the Code Red managed linker script mechanism. It
351// contains the load address, execution address and length of each RW data
352// section and the execution and length of each BSS (zero initialized) section.
353//*****************************************************************************
354extern unsigned int __data_section_table;
355extern unsigned int __data_section_table_end;
356extern unsigned int __bss_section_table;
357extern unsigned int __bss_section_table_end;
358
359//*****************************************************************************
360// Reset entry point for your code.
361// Sets up a simple runtime environment and initializes the C/C++
362// library.
363//*****************************************************************************
364__attribute__ ((section(".after_vectors.reset")))
365void ResetISR(void) {
366
367 // Disable interrupts
368 __asm volatile ("cpsid i");
369
370
371#if defined (__USE_CMSIS)
372// If __USE_CMSIS defined, then call CMSIS SystemInit code
373 SystemInit();
374
375#else
376 // Disable Watchdog
377 // Write watchdog update key to unlock
378 *((volatile unsigned int *)0x41026004) = 0xD928C520;
379 // Set timeout value
380 *((volatile unsigned int *)0x41026008) = 0xFFFF;
381 // Now disable watchdog via control register
382 volatile unsigned int *WDOG_CS = (unsigned int *) 0x41026000;
383 *WDOG_CS = (*WDOG_CS & ~(1 << 7)) | (1 << 5);
384#endif // (__USE_CMSIS)
385
386 //
387 // Copy the data sections from flash to SRAM.
388 //
389 unsigned int LoadAddr, ExeAddr, SectionLen;
390 unsigned int *SectionTableAddr;
391
392 // Load base address of Global Section Table
393 SectionTableAddr = &__data_section_table;
394
395 // Copy the data sections from flash to SRAM.
396 while (SectionTableAddr < &__data_section_table_end) {
397 LoadAddr = *SectionTableAddr++;
398 ExeAddr = *SectionTableAddr++;
399 SectionLen = *SectionTableAddr++;
400 data_init(LoadAddr, ExeAddr, SectionLen);
401 }
402
403 // At this point, SectionTableAddr = &__bss_section_table;
404 // Zero fill the bss segment
405 while (SectionTableAddr < &__bss_section_table_end) {
406 ExeAddr = *SectionTableAddr++;
407 SectionLen = *SectionTableAddr++;
408 bss_init(ExeAddr, SectionLen);
409 }
410
411
412#if !defined (__USE_CMSIS)
413// Assume that if __USE_CMSIS defined, then CMSIS SystemInit code
414// will setup the VTOR register
415
416 // Check to see if we are running the code from a non-zero
417 // address (eg RAM, external flash), in which case we need
418 // to modify the VTOR register to tell the CPU that the
419 // vector table is located at a non-0x0 address.
420 unsigned int * pSCB_VTOR = (unsigned int *) 0xE000ED08;
421 if ((unsigned int *)g_pfnVectors!=(unsigned int *) 0x00000000) {
422 *pSCB_VTOR = (unsigned int)g_pfnVectors;
423 }
424#endif // (__USE_CMSIS)
425#if defined (__cplusplus)
426 //
427 // Call C++ library initialisation
428 //
429 __libc_init_array();
430#endif
431
432 // Reenable interrupts
433 __asm volatile ("cpsie i");
434
435#if defined (__REDLIB__)
436 // Call the Redlib library, which in turn calls main()
437 __main();
438#else
439 main();
440#endif
441
442 //
443 // main() shouldn't return, but if it does, we'll just enter an infinite loop
444 //
445 while (1) {
446 ;
447 }
448}
449
450//*****************************************************************************
451// Default core exception handlers. Override the ones here by defining your own
452// handler routines in your application code.
453//*****************************************************************************
454WEAK_AV void NMI_Handler(void)
455{ while(1) {}
456}
457
458WEAK_AV void HardFault_Handler(void)
459{ while(1) {}
460}
461
462WEAK_AV void SVC_Handler(void)
463{ while(1) {}
464}
465
466WEAK_AV void PendSV_Handler(void)
467{ while(1) {}
468}
469
470WEAK_AV void SysTick_Handler(void)
471{ while(1) {}
472}
473
474//*****************************************************************************
475// Processor ends up here if an unexpected interrupt occurs or a specific
476// handler is not present in the application code.
477//*****************************************************************************
478WEAK_AV void IntDefaultHandler(void)
479{ while(1) {}
480}
481
482//*****************************************************************************
483// Default application exception handlers. Override the ones here by defining
484// your own handler routines in your application code. These routines call
485// driver exception handlers or IntDefaultHandler() if no driver exception
486// handler is included.
487//*****************************************************************************
488WEAK_AV void CTI1_IRQHandler(void)
489{ CTI1_DriverIRQHandler();
490}
491
492WEAK_AV void DMA1_04_IRQHandler(void)
493{ DMA1_04_DriverIRQHandler();
494}
495
496WEAK_AV void DMA1_15_IRQHandler(void)
497{ DMA1_15_DriverIRQHandler();
498}
499
500WEAK_AV void DMA1_26_IRQHandler(void)
501{ DMA1_26_DriverIRQHandler();
502}
503
504WEAK_AV void DMA1_37_IRQHandler(void)
505{ DMA1_37_DriverIRQHandler();
506}
507
508WEAK_AV void DMA1_Error_IRQHandler(void)
509{ DMA1_Error_DriverIRQHandler();
510}
511
512WEAK_AV void MSMC_IRQHandler(void)
513{ MSMC_DriverIRQHandler();
514}
515
516WEAK_AV void LLWU1_IRQHandler(void)
517{ LLWU1_DriverIRQHandler();
518}
519
520WEAK_AV void MUB_IRQHandler(void)
521{ MUB_DriverIRQHandler();
522}
523
524WEAK_AV void WDOG1_IRQHandler(void)
525{ WDOG1_DriverIRQHandler();
526}
527
528WEAK_AV void CAU3_Task_Complete_IRQHandler(void)
529{ CAU3_Task_Complete_DriverIRQHandler();
530}
531
532WEAK_AV void CAU3_Security_Violation_IRQHandler(void)
533{ CAU3_Security_Violation_DriverIRQHandler();
534}
535
536WEAK_AV void TRNG_IRQHandler(void)
537{ TRNG_DriverIRQHandler();
538}
539
540WEAK_AV void LPIT1_IRQHandler(void)
541{ LPIT1_DriverIRQHandler();
542}
543
544WEAK_AV void LPTMR2_IRQHandler(void)
545{ LPTMR2_DriverIRQHandler();
546}
547
548WEAK_AV void TPM3_IRQHandler(void)
549{ TPM3_DriverIRQHandler();
550}
551
552WEAK_AV void LPI2C3_IRQHandler(void)
553{ LPI2C3_DriverIRQHandler();
554}
555
556WEAK_AV void Reserved33_IRQHandler(void)
557{ Reserved33_DriverIRQHandler();
558}
559
560WEAK_AV void Reserved34_IRQHandler(void)
561{ Reserved34_DriverIRQHandler();
562}
563
564WEAK_AV void LPSPI3_IRQHandler(void)
565{ LPSPI3_DriverIRQHandler();
566}
567
568WEAK_AV void LPUART3_IRQHandler(void)
569{ LPUART3_DriverIRQHandler();
570}
571
572WEAK_AV void PORTE_IRQHandler(void)
573{ PORTE_DriverIRQHandler();
574}
575
576WEAK_AV void LPCMP1_IRQHandler(void)
577{ LPCMP1_DriverIRQHandler();
578}
579
580WEAK_AV void RTC_IRQHandler(void)
581{ RTC_DriverIRQHandler();
582}
583
584WEAK_AV void INTMUX1_0_IRQHandler(void)
585{ INTMUX1_0_DriverIRQHandler();
586}
587
588WEAK_AV void INTMUX1_1_IRQHandler(void)
589{ INTMUX1_1_DriverIRQHandler();
590}
591
592WEAK_AV void INTMUX1_2_IRQHandler(void)
593{ INTMUX1_2_DriverIRQHandler();
594}
595
596WEAK_AV void INTMUX1_3_IRQHandler(void)
597{ INTMUX1_3_DriverIRQHandler();
598}
599
600WEAK_AV void INTMUX1_4_IRQHandler(void)
601{ INTMUX1_4_DriverIRQHandler();
602}
603
604WEAK_AV void INTMUX1_5_IRQHandler(void)
605{ INTMUX1_5_DriverIRQHandler();
606}
607
608WEAK_AV void INTMUX1_6_IRQHandler(void)
609{ INTMUX1_6_DriverIRQHandler();
610}
611
612WEAK_AV void INTMUX1_7_IRQHandler(void)
613{ INTMUX1_7_DriverIRQHandler();
614}
615
616WEAK_AV void EWM_IRQHandler(void)
617{ EWM_DriverIRQHandler();
618}
619
620WEAK_AV void FTFE_Command_Complete_IRQHandler(void)
621{ FTFE_Command_Complete_DriverIRQHandler();
622}
623
624WEAK_AV void FTFE_Read_Collision_IRQHandler(void)
625{ FTFE_Read_Collision_DriverIRQHandler();
626}
627
628WEAK_AV void SPM_IRQHandler(void)
629{ SPM_DriverIRQHandler();
630}
631
632WEAK_AV void SCG_IRQHandler(void)
633{ SCG_DriverIRQHandler();
634}
635
636WEAK_AV void LPIT0_IRQHandler(void)
637{ LPIT0_DriverIRQHandler();
638}
639
640WEAK_AV void LPTMR0_IRQHandler(void)
641{ LPTMR0_DriverIRQHandler();
642}
643
644WEAK_AV void LPTMR1_IRQHandler(void)
645{ LPTMR1_DriverIRQHandler();
646}
647
648WEAK_AV void TPM0_IRQHandler(void)
649{ TPM0_DriverIRQHandler();
650}
651
652WEAK_AV void TPM1_IRQHandler(void)
653{ TPM1_DriverIRQHandler();
654}
655
656WEAK_AV void TPM2_IRQHandler(void)
657{ TPM2_DriverIRQHandler();
658}
659
660WEAK_AV void EMVSIM0_IRQHandler(void)
661{ EMVSIM0_DriverIRQHandler();
662}
663
664WEAK_AV void FLEXIO0_IRQHandler(void)
665{ FLEXIO0_DriverIRQHandler();
666}
667
668WEAK_AV void LPI2C0_IRQHandler(void)
669{ LPI2C0_DriverIRQHandler();
670}
671
672WEAK_AV void LPI2C1_IRQHandler(void)
673{ LPI2C1_DriverIRQHandler();
674}
675
676WEAK_AV void LPI2C2_IRQHandler(void)
677{ LPI2C2_DriverIRQHandler();
678}
679
680WEAK_AV void I2S0_IRQHandler(void)
681{ I2S0_DriverIRQHandler();
682}
683
684WEAK_AV void USDHC0_IRQHandler(void)
685{ USDHC0_DriverIRQHandler();
686}
687
688WEAK_AV void LPSPI0_IRQHandler(void)
689{ LPSPI0_DriverIRQHandler();
690}
691
692WEAK_AV void LPSPI1_IRQHandler(void)
693{ LPSPI1_DriverIRQHandler();
694}
695
696WEAK_AV void LPSPI2_IRQHandler(void)
697{ LPSPI2_DriverIRQHandler();
698}
699
700WEAK_AV void LPUART0_IRQHandler(void)
701{ LPUART0_DriverIRQHandler();
702}
703
704WEAK_AV void LPUART1_IRQHandler(void)
705{ LPUART1_DriverIRQHandler();
706}
707
708WEAK_AV void LPUART2_IRQHandler(void)
709{ LPUART2_DriverIRQHandler();
710}
711
712WEAK_AV void USB0_IRQHandler(void)
713{ USB0_DriverIRQHandler();
714}
715
716WEAK_AV void PORTA_IRQHandler(void)
717{ PORTA_DriverIRQHandler();
718}
719
720WEAK_AV void PORTB_IRQHandler(void)
721{ PORTB_DriverIRQHandler();
722}
723
724WEAK_AV void PORTC_IRQHandler(void)
725{ PORTC_DriverIRQHandler();
726}
727
728WEAK_AV void PORTD_IRQHandler(void)
729{ PORTD_DriverIRQHandler();
730}
731
732WEAK_AV void LPADC0_IRQHandler(void)
733{ LPADC0_DriverIRQHandler();
734}
735
736WEAK_AV void LPCMP0_IRQHandler(void)
737{ LPCMP0_DriverIRQHandler();
738}
739
740WEAK_AV void LPDAC0_IRQHandler(void)
741{ LPDAC0_DriverIRQHandler();
742}
743
744//*****************************************************************************
745
746#if defined (DEBUG)
747#pragma GCC pop_options
748#endif // (DEBUG)