]> git.sur5r.net Git - freertos/blob - FreeRTOS/Demo/CORTEX_M0+_LPC51U68_GCC_IAR_KEIL/GCC_specific/startup_lpc51u68.c
Increase test coverage for queue sets.
[freertos] / FreeRTOS / Demo / CORTEX_M0+_LPC51U68_GCC_IAR_KEIL / GCC_specific / startup_lpc51u68.c
1 //*****************************************************************************\r
2 // LPC51U68 startup code for use with MCUXpresso IDE\r
3 //\r
4 // Version : 020818\r
5 //*****************************************************************************\r
6 //\r
7 // Copyright 2016-2018 NXP\r
8 //\r
9 // SPDX-License-Identifier: BSD-3-Clause\r
10 //*****************************************************************************\r
11 \r
12 #if defined (DEBUG)\r
13 #pragma GCC push_options\r
14 #pragma GCC optimize ("Og")\r
15 #endif // (DEBUG)\r
16 \r
17 #if defined (__cplusplus)\r
18 #ifdef __REDLIB__\r
19 #error Redlib does not support C++\r
20 #else\r
21 //*****************************************************************************\r
22 //\r
23 // The entry point for the C++ library startup\r
24 //\r
25 //*****************************************************************************\r
26 extern "C" {\r
27     extern void __libc_init_array(void);\r
28 }\r
29 #endif\r
30 #endif\r
31 \r
32 #define WEAK __attribute__ ((weak))\r
33 #define WEAK_AV __attribute__ ((weak, section(".after_vectors")))\r
34 #define ALIAS(f) __attribute__ ((weak, alias (#f)))\r
35 \r
36 //*****************************************************************************\r
37 #if defined (__cplusplus)\r
38 extern "C" {\r
39 #endif\r
40 \r
41 //*****************************************************************************\r
42 // Variable to store CRP value in. Will be placed automatically\r
43 // by the linker when "Enable Code Read Protect" selected.\r
44 // See crp.h header for more information\r
45 //*****************************************************************************\r
46 //*****************************************************************************\r
47 // Declaration of external SystemInit function\r
48 //*****************************************************************************\r
49 #if defined (__USE_CMSIS)\r
50 extern void SystemInit(void);\r
51 #endif // (__USE_CMSIS)\r
52 \r
53 //*****************************************************************************\r
54 // Forward declaration of the core exception handlers.\r
55 // When the application defines a handler (with the same name), this will\r
56 // automatically take precedence over these weak definitions.\r
57 // If your application is a C++ one, then any interrupt handlers defined\r
58 // in C++ files within in your main application will need to have C linkage\r
59 // rather than C++ linkage. To do this, make sure that you are using extern "C"\r
60 // { .... } around the interrupt handler within your main application code.\r
61 //*****************************************************************************\r
62      void ResetISR(void);\r
63 WEAK void NMI_Handler(void);\r
64 WEAK void HardFault_Handler(void);\r
65 WEAK void SVC_Handler(void);\r
66 WEAK void PendSV_Handler(void);\r
67 WEAK void SysTick_Handler(void);\r
68 WEAK void IntDefaultHandler(void);\r
69 \r
70 //*****************************************************************************\r
71 // Forward declaration of the application IRQ handlers. When the application\r
72 // defines a handler (with the same name), this will automatically take\r
73 // precedence over weak definitions below\r
74 //*****************************************************************************\r
75 WEAK void WDT_BOD_IRQHandler(void);\r
76 WEAK void DMA0_IRQHandler(void);\r
77 WEAK void GINT0_IRQHandler(void);\r
78 WEAK void GINT1_IRQHandler(void);\r
79 WEAK void PIN_INT0_IRQHandler(void);\r
80 WEAK void PIN_INT1_IRQHandler(void);\r
81 WEAK void PIN_INT2_IRQHandler(void);\r
82 WEAK void PIN_INT3_IRQHandler(void);\r
83 WEAK void UTICK0_IRQHandler(void);\r
84 WEAK void MRT0_IRQHandler(void);\r
85 WEAK void CTIMER0_IRQHandler(void);\r
86 WEAK void CTIMER1_IRQHandler(void);\r
87 WEAK void SCT0_IRQHandler(void);\r
88 WEAK void CTIMER3_IRQHandler(void);\r
89 WEAK void FLEXCOMM0_IRQHandler(void);\r
90 WEAK void FLEXCOMM1_IRQHandler(void);\r
91 WEAK void FLEXCOMM2_IRQHandler(void);\r
92 WEAK void FLEXCOMM3_IRQHandler(void);\r
93 WEAK void FLEXCOMM4_IRQHandler(void);\r
94 WEAK void FLEXCOMM5_IRQHandler(void);\r
95 WEAK void FLEXCOMM6_IRQHandler(void);\r
96 WEAK void FLEXCOMM7_IRQHandler(void);\r
97 WEAK void ADC0_SEQA_IRQHandler(void);\r
98 WEAK void ADC0_SEQB_IRQHandler(void);\r
99 WEAK void ADC0_THCMP_IRQHandler(void);\r
100 WEAK void Reserved41_IRQHandler(void);\r
101 WEAK void Reserved42_IRQHandler(void);\r
102 WEAK void USB0_NEEDCLK_IRQHandler(void);\r
103 WEAK void USB0_IRQHandler(void);\r
104 WEAK void RTC_IRQHandler(void);\r
105 \r
106 //*****************************************************************************\r
107 // Forward declaration of the driver IRQ handlers. These are aliased\r
108 // to the IntDefaultHandler, which is a 'forever' loop. When the driver\r
109 // defines a handler (with the same name), this will automatically take\r
110 // precedence over these weak definitions\r
111 //*****************************************************************************\r
112 void WDT_BOD_DriverIRQHandler(void) ALIAS(IntDefaultHandler);\r
113 void DMA0_DriverIRQHandler(void) ALIAS(IntDefaultHandler);\r
114 void GINT0_DriverIRQHandler(void) ALIAS(IntDefaultHandler);\r
115 void GINT1_DriverIRQHandler(void) ALIAS(IntDefaultHandler);\r
116 void PIN_INT0_DriverIRQHandler(void) ALIAS(IntDefaultHandler);\r
117 void PIN_INT1_DriverIRQHandler(void) ALIAS(IntDefaultHandler);\r
118 void PIN_INT2_DriverIRQHandler(void) ALIAS(IntDefaultHandler);\r
119 void PIN_INT3_DriverIRQHandler(void) ALIAS(IntDefaultHandler);\r
120 void UTICK0_DriverIRQHandler(void) ALIAS(IntDefaultHandler);\r
121 void MRT0_DriverIRQHandler(void) ALIAS(IntDefaultHandler);\r
122 void CTIMER0_DriverIRQHandler(void) ALIAS(IntDefaultHandler);\r
123 void CTIMER1_DriverIRQHandler(void) ALIAS(IntDefaultHandler);\r
124 void SCT0_DriverIRQHandler(void) ALIAS(IntDefaultHandler);\r
125 void CTIMER3_DriverIRQHandler(void) ALIAS(IntDefaultHandler);\r
126 void FLEXCOMM0_DriverIRQHandler(void) ALIAS(IntDefaultHandler);\r
127 void FLEXCOMM1_DriverIRQHandler(void) ALIAS(IntDefaultHandler);\r
128 void FLEXCOMM2_DriverIRQHandler(void) ALIAS(IntDefaultHandler);\r
129 void FLEXCOMM3_DriverIRQHandler(void) ALIAS(IntDefaultHandler);\r
130 void FLEXCOMM4_DriverIRQHandler(void) ALIAS(IntDefaultHandler);\r
131 void FLEXCOMM5_DriverIRQHandler(void) ALIAS(IntDefaultHandler);\r
132 void FLEXCOMM6_DriverIRQHandler(void) ALIAS(IntDefaultHandler);\r
133 void FLEXCOMM7_DriverIRQHandler(void) ALIAS(IntDefaultHandler);\r
134 void ADC0_SEQA_DriverIRQHandler(void) ALIAS(IntDefaultHandler);\r
135 void ADC0_SEQB_DriverIRQHandler(void) ALIAS(IntDefaultHandler);\r
136 void ADC0_THCMP_DriverIRQHandler(void) ALIAS(IntDefaultHandler);\r
137 void Reserved41_DriverIRQHandler(void) ALIAS(IntDefaultHandler);\r
138 void Reserved42_DriverIRQHandler(void) ALIAS(IntDefaultHandler);\r
139 void USB0_NEEDCLK_DriverIRQHandler(void) ALIAS(IntDefaultHandler);\r
140 void USB0_DriverIRQHandler(void) ALIAS(IntDefaultHandler);\r
141 void RTC_DriverIRQHandler(void) ALIAS(IntDefaultHandler);\r
142 \r
143 //*****************************************************************************\r
144 // The entry point for the application.\r
145 // __main() is the entry point for Redlib based applications\r
146 // main() is the entry point for Newlib based applications\r
147 //*****************************************************************************\r
148 #if defined (__REDLIB__)\r
149 extern void __main(void);\r
150 #endif\r
151 extern int main(void);\r
152 \r
153 //*****************************************************************************\r
154 // External declaration for the pointer to the stack top from the Linker Script\r
155 //*****************************************************************************\r
156 extern void _vStackTop(void);\r
157 //*****************************************************************************\r
158 // External declaration for LPC MCU vector table checksum from  Linker Script\r
159 //*****************************************************************************\r
160 WEAK extern void __valid_user_code_checksum();\r
161 \r
162 //*****************************************************************************\r
163 //*****************************************************************************\r
164 #if defined (__cplusplus)\r
165 } // extern "C"\r
166 #endif\r
167 //*****************************************************************************\r
168 // The vector table.\r
169 // This relies on the linker script to place at correct location in memory.\r
170 //*****************************************************************************\r
171 extern void (* const g_pfnVectors[])(void);\r
172 extern void * __Vectors __attribute__ ((alias ("g_pfnVectors")));\r
173 \r
174 __attribute__ ((used, section(".isr_vector")))\r
175 void (* const g_pfnVectors[])(void) = {\r
176     // Core Level - CM0P\r
177     &_vStackTop,                       // The initial stack pointer\r
178     ResetISR,                          // The reset handler\r
179     NMI_Handler,                       // The NMI handler\r
180     HardFault_Handler,                 // The hard fault handler\r
181     0,                                 // Reserved\r
182     0,                                 // Reserved\r
183     0,                                 // Reserved\r
184     __valid_user_code_checksum,        // LPC MCU checksum\r
185     0,                                 // ECRP\r
186     0,                                 // Reserved\r
187     0,                                 // Reserved\r
188     SVC_Handler,                       // SVCall handler\r
189     0,                                 // Reserved\r
190     0,                                 // Reserved\r
191     PendSV_Handler,                    // The PendSV handler\r
192     SysTick_Handler,                   // The SysTick handler\r
193 \r
194     // Chip Level - LPC51U68\r
195     WDT_BOD_IRQHandler,       // 16: Windowed watchdog timer, Brownout detect\r
196     DMA0_IRQHandler,          // 17: DMA controller\r
197     GINT0_IRQHandler,         // 18: GPIO group 0\r
198     GINT1_IRQHandler,         // 19: GPIO group 1\r
199     PIN_INT0_IRQHandler,      // 20: Pin interrupt 0 or pattern match engine slice 0\r
200     PIN_INT1_IRQHandler,      // 21: Pin interrupt 1or pattern match engine slice 1\r
201     PIN_INT2_IRQHandler,      // 22: Pin interrupt 2 or pattern match engine slice 2\r
202     PIN_INT3_IRQHandler,      // 23: Pin interrupt 3 or pattern match engine slice 3\r
203     UTICK0_IRQHandler,        // 24: Micro-tick Timer\r
204     MRT0_IRQHandler,          // 25: Multi-rate timer\r
205     CTIMER0_IRQHandler,       // 26: Standard counter/timer CTIMER0\r
206     CTIMER1_IRQHandler,       // 27: Standard counter/timer CTIMER1\r
207     SCT0_IRQHandler,          // 28: SCTimer/PWM\r
208     CTIMER3_IRQHandler,       // 29: Standard counter/timer CTIMER3\r
209     FLEXCOMM0_IRQHandler,     // 30: Flexcomm Interface 0 (USART, SPI, I2C)\r
210     FLEXCOMM1_IRQHandler,     // 31: Flexcomm Interface 1 (USART, SPI, I2C)\r
211     FLEXCOMM2_IRQHandler,     // 32: Flexcomm Interface 2 (USART, SPI, I2C)\r
212     FLEXCOMM3_IRQHandler,     // 33: Flexcomm Interface 3 (USART, SPI, I2C)\r
213     FLEXCOMM4_IRQHandler,     // 34: Flexcomm Interface 4 (USART, SPI, I2C)\r
214     FLEXCOMM5_IRQHandler,     // 35: Flexcomm Interface 5 (USART, SPI, I2C)\r
215     FLEXCOMM6_IRQHandler,     // 36: Flexcomm Interface 6 (USART, SPI, I2C, I2S)\r
216     FLEXCOMM7_IRQHandler,     // 37: Flexcomm Interface 7 (USART, SPI, I2C, I2S)\r
217     ADC0_SEQA_IRQHandler,     // 38: ADC0 sequence A completion.\r
218     ADC0_SEQB_IRQHandler,     // 39: ADC0 sequence B completion.\r
219     ADC0_THCMP_IRQHandler,    // 40: ADC0 threshold compare and error.\r
220     Reserved41_IRQHandler,    // 41: Reserved interrupt\r
221     Reserved42_IRQHandler,    // 42: Reserved interrupt\r
222     USB0_NEEDCLK_IRQHandler,  // 43: USB Activity Wake-up Interrupt\r
223     USB0_IRQHandler,          // 44: USB device\r
224     RTC_IRQHandler,           // 45: RTC alarm and wake-up interrupts\r
225 }; /* End of g_pfnVectors */\r
226 \r
227 //*****************************************************************************\r
228 // Functions to carry out the initialization of RW and BSS data sections. These\r
229 // are written as separate functions rather than being inlined within the\r
230 // ResetISR() function in order to cope with MCUs with multiple banks of\r
231 // memory.\r
232 //*****************************************************************************\r
233 __attribute__ ((section(".after_vectors.init_data")))\r
234 void data_init(unsigned int romstart, unsigned int start, unsigned int len) {\r
235     unsigned int *pulDest = (unsigned int*) start;\r
236     unsigned int *pulSrc = (unsigned int*) romstart;\r
237     unsigned int loop;\r
238     for (loop = 0; loop < len; loop = loop + 4)\r
239         *pulDest++ = *pulSrc++;\r
240 }\r
241 \r
242 __attribute__ ((section(".after_vectors.init_bss")))\r
243 void bss_init(unsigned int start, unsigned int len) {\r
244     unsigned int *pulDest = (unsigned int*) start;\r
245     unsigned int loop;\r
246     for (loop = 0; loop < len; loop = loop + 4)\r
247         *pulDest++ = 0;\r
248 }\r
249 \r
250 //*****************************************************************************\r
251 // The following symbols are constructs generated by the linker, indicating\r
252 // the location of various points in the "Global Section Table". This table is\r
253 // created by the linker via the Code Red managed linker script mechanism. It\r
254 // contains the load address, execution address and length of each RW data\r
255 // section and the execution and length of each BSS (zero initialized) section.\r
256 //*****************************************************************************\r
257 extern unsigned int __data_section_table;\r
258 extern unsigned int __data_section_table_end;\r
259 extern unsigned int __bss_section_table;\r
260 extern unsigned int __bss_section_table_end;\r
261 \r
262 //*****************************************************************************\r
263 // Reset entry point for your code.\r
264 // Sets up a simple runtime environment and initializes the C/C++\r
265 // library.\r
266 //*****************************************************************************\r
267 __attribute__ ((section(".after_vectors.reset")))\r
268 void ResetISR(void) {\r
269 \r
270     // Disable interrupts\r
271     __asm volatile ("cpsid i");\r
272 \r
273     // Enable SRAM clock used by Stack\r
274     __asm volatile ("LDR R0, =0x40000220\n\t"\r
275                     "MOV R1, #56\n\t"\r
276                     "STR R1, [R0]");\r
277 \r
278 #if defined (__USE_CMSIS)\r
279 // If __USE_CMSIS defined, then call CMSIS SystemInit code\r
280     SystemInit();\r
281 \r
282 #endif // (__USE_CMSIS)\r
283 \r
284     //\r
285     // Copy the data sections from flash to SRAM.\r
286     //\r
287     unsigned int LoadAddr, ExeAddr, SectionLen;\r
288     unsigned int *SectionTableAddr;\r
289 \r
290     // Load base address of Global Section Table\r
291     SectionTableAddr = &__data_section_table;\r
292 \r
293     // Copy the data sections from flash to SRAM.\r
294     while (SectionTableAddr < &__data_section_table_end) {\r
295         LoadAddr = *SectionTableAddr++;\r
296         ExeAddr = *SectionTableAddr++;\r
297         SectionLen = *SectionTableAddr++;\r
298         data_init(LoadAddr, ExeAddr, SectionLen);\r
299     }\r
300 \r
301     // At this point, SectionTableAddr = &__bss_section_table;\r
302     // Zero fill the bss segment\r
303     while (SectionTableAddr < &__bss_section_table_end) {\r
304         ExeAddr = *SectionTableAddr++;\r
305         SectionLen = *SectionTableAddr++;\r
306         bss_init(ExeAddr, SectionLen);\r
307     }\r
308 \r
309 #if !defined (__USE_CMSIS)\r
310 // Assume that if __USE_CMSIS defined, then CMSIS SystemInit code\r
311 // will setup the VTOR register\r
312 \r
313     // Check to see if we are running the code from a non-zero\r
314     // address (eg RAM, external flash), in which case we need\r
315     // to modify the VTOR register to tell the CPU that the\r
316     // vector table is located at a non-0x0 address.\r
317     unsigned int * pSCB_VTOR = (unsigned int *) 0xE000ED08;\r
318     if ((unsigned int *)g_pfnVectors!=(unsigned int *) 0x00000000) {\r
319         *pSCB_VTOR = (unsigned int)g_pfnVectors;\r
320     }\r
321 #endif // (__USE_CMSIS)\r
322 \r
323 #if defined (__cplusplus)\r
324     //\r
325     // Call C++ library initialisation\r
326     //\r
327     __libc_init_array();\r
328 #endif\r
329 \r
330     // Reenable interrupts\r
331     __asm volatile ("cpsie i");\r
332 \r
333 #if defined (__REDLIB__)\r
334     // Call the Redlib library, which in turn calls main()\r
335     __main();\r
336 #else\r
337     main();\r
338 #endif\r
339 \r
340     //\r
341     // main() shouldn't return, but if it does, we'll just enter an infinite loop\r
342     //\r
343     while (1) {\r
344         ;\r
345     }\r
346 }\r
347 \r
348 //*****************************************************************************\r
349 // Default core exception handlers. Override the ones here by defining your own\r
350 // handler routines in your application code.\r
351 //*****************************************************************************\r
352 WEAK_AV void NMI_Handler(void)\r
353 { while(1) {}\r
354 }\r
355 \r
356 WEAK_AV void HardFault_Handler(void)\r
357 { while(1) {}\r
358 }\r
359 \r
360 WEAK_AV void SVC_Handler(void)\r
361 { while(1) {}\r
362 }\r
363 \r
364 WEAK_AV void PendSV_Handler(void)\r
365 { while(1) {}\r
366 }\r
367 \r
368 WEAK_AV void SysTick_Handler(void)\r
369 { while(1) {}\r
370 }\r
371 \r
372 //*****************************************************************************\r
373 // Processor ends up here if an unexpected interrupt occurs or a specific\r
374 // handler is not present in the application code.\r
375 //*****************************************************************************\r
376 WEAK_AV void IntDefaultHandler(void)\r
377 { while(1) {}\r
378 }\r
379 \r
380 //*****************************************************************************\r
381 // Default application exception handlers. Override the ones here by defining\r
382 // your own handler routines in your application code. These routines call\r
383 // driver exception handlers or IntDefaultHandler() if no driver exception\r
384 // handler is included.\r
385 //*****************************************************************************\r
386 WEAK_AV void WDT_BOD_IRQHandler(void)\r
387 {   WDT_BOD_DriverIRQHandler();\r
388 }\r
389 \r
390 WEAK_AV void DMA0_IRQHandler(void)\r
391 {   DMA0_DriverIRQHandler();\r
392 }\r
393 \r
394 WEAK_AV void GINT0_IRQHandler(void)\r
395 {   GINT0_DriverIRQHandler();\r
396 }\r
397 \r
398 WEAK_AV void GINT1_IRQHandler(void)\r
399 {   GINT1_DriverIRQHandler();\r
400 }\r
401 \r
402 WEAK_AV void PIN_INT0_IRQHandler(void)\r
403 {   PIN_INT0_DriverIRQHandler();\r
404 }\r
405 \r
406 WEAK_AV void PIN_INT1_IRQHandler(void)\r
407 {   PIN_INT1_DriverIRQHandler();\r
408 }\r
409 \r
410 WEAK_AV void PIN_INT2_IRQHandler(void)\r
411 {   PIN_INT2_DriverIRQHandler();\r
412 }\r
413 \r
414 WEAK_AV void PIN_INT3_IRQHandler(void)\r
415 {   PIN_INT3_DriverIRQHandler();\r
416 }\r
417 \r
418 WEAK_AV void UTICK0_IRQHandler(void)\r
419 {   UTICK0_DriverIRQHandler();\r
420 }\r
421 \r
422 WEAK_AV void MRT0_IRQHandler(void)\r
423 {   MRT0_DriverIRQHandler();\r
424 }\r
425 \r
426 WEAK_AV void CTIMER0_IRQHandler(void)\r
427 {   CTIMER0_DriverIRQHandler();\r
428 }\r
429 \r
430 WEAK_AV void CTIMER1_IRQHandler(void)\r
431 {   CTIMER1_DriverIRQHandler();\r
432 }\r
433 \r
434 WEAK_AV void SCT0_IRQHandler(void)\r
435 {   SCT0_DriverIRQHandler();\r
436 }\r
437 \r
438 WEAK_AV void CTIMER3_IRQHandler(void)\r
439 {   CTIMER3_DriverIRQHandler();\r
440 }\r
441 \r
442 WEAK_AV void FLEXCOMM0_IRQHandler(void)\r
443 {   FLEXCOMM0_DriverIRQHandler();\r
444 }\r
445 \r
446 WEAK_AV void FLEXCOMM1_IRQHandler(void)\r
447 {   FLEXCOMM1_DriverIRQHandler();\r
448 }\r
449 \r
450 WEAK_AV void FLEXCOMM2_IRQHandler(void)\r
451 {   FLEXCOMM2_DriverIRQHandler();\r
452 }\r
453 \r
454 WEAK_AV void FLEXCOMM3_IRQHandler(void)\r
455 {   FLEXCOMM3_DriverIRQHandler();\r
456 }\r
457 \r
458 WEAK_AV void FLEXCOMM4_IRQHandler(void)\r
459 {   FLEXCOMM4_DriverIRQHandler();\r
460 }\r
461 \r
462 WEAK_AV void FLEXCOMM5_IRQHandler(void)\r
463 {   FLEXCOMM5_DriverIRQHandler();\r
464 }\r
465 \r
466 WEAK_AV void FLEXCOMM6_IRQHandler(void)\r
467 {   FLEXCOMM6_DriverIRQHandler();\r
468 }\r
469 \r
470 WEAK_AV void FLEXCOMM7_IRQHandler(void)\r
471 {   FLEXCOMM7_DriverIRQHandler();\r
472 }\r
473 \r
474 WEAK_AV void ADC0_SEQA_IRQHandler(void)\r
475 {   ADC0_SEQA_DriverIRQHandler();\r
476 }\r
477 \r
478 WEAK_AV void ADC0_SEQB_IRQHandler(void)\r
479 {   ADC0_SEQB_DriverIRQHandler();\r
480 }\r
481 \r
482 WEAK_AV void ADC0_THCMP_IRQHandler(void)\r
483 {   ADC0_THCMP_DriverIRQHandler();\r
484 }\r
485 \r
486 WEAK_AV void Reserved41_IRQHandler(void)\r
487 {   Reserved41_DriverIRQHandler();\r
488 }\r
489 \r
490 WEAK_AV void Reserved42_IRQHandler(void)\r
491 {   Reserved42_DriverIRQHandler();\r
492 }\r
493 \r
494 WEAK_AV void USB0_NEEDCLK_IRQHandler(void)\r
495 {   USB0_NEEDCLK_DriverIRQHandler();\r
496 }\r
497 \r
498 WEAK_AV void USB0_IRQHandler(void)\r
499 {   USB0_DriverIRQHandler();\r
500 }\r
501 \r
502 WEAK_AV void RTC_IRQHandler(void)\r
503 {   RTC_DriverIRQHandler();\r
504 }\r
505 \r
506 //*****************************************************************************\r
507 \r
508 #if defined (DEBUG)\r
509 #pragma GCC pop_options\r
510 #endif // (DEBUG)\r