]> rtime.felk.cvut.cz Git - pes-rpp/rpp-test-sw.git/blob - rpp/lib/apps/test/src/main.c
Minor change - welcome text with newer version number and actual date.
[pes-rpp/rpp-test-sw.git] / rpp / lib / apps / test / src / main.c
1 /** @file sys_main.c \r
2 *   @brief Application main file\r
3 *   @date 15.Mar.2012\r
4 *   @version 03.01.00\r
5 *\r
6 *   This file contains an empty main function,\r
7 *   which can be used for the application.\r
8 */\r
9 \r
10 /* (c) Texas Instruments 2009-2012, All rights reserved. */\r
11 \r
12 /* USER CODE BEGIN (0) */\r
13 /* USER CODE END */\r
14 \r
15 /* Include Files */\r
16 #include "rpp/rpp.h"\r
17 #include "cmdproc_freertos_tms570.h"\r
18 \r
19 /** @fn void main(void)\r
20 *   @brief Application main function\r
21 *   @note This function is empty by default.\r
22 *\r
23 *   This function is called after startup.\r
24 *   The user can use this function to implement the application.\r
25 */\r
26 \r
27 /* USER CODE BEGIN (2) */\r
28 /* USER CODE END */\r
29 \r
30 \r
31 \r
32 void main(void)\r
33 {\r
34 /* USER CODE BEGIN (3) */\r
35         rpp_init();\r
36         _enable_IRQ();\r
37         initCmdProc(1, (uint8_t*)"\r\n----\r\n  Rapid Prototyping Platform v00.02-001\r\n  Porsche Engineering 06/2013\r\n----\r\n\r\nType commands", (uint8_t *)"\r\n--> ");\r
38         vTaskStartScheduler();\r
39 \r
40         //We should never get here\r
41         while(1)\r
42                 ;\r
43 /* USER CODE END */\r
44 }\r
45 \r
46 #if configUSE_MALLOC_FAILED_HOOK == 1\r
47 /**\r
48  * FreeRTOS malloc() failed hook.\r
49  */\r
50 void vApplicationMallocFailedHook(void) {\r
51     #ifdef DEBUG\r
52     rpp_sci_printf((const char*)\r
53             "ERROR: manual memory allocation failed.\r\n"\r
54         );\r
55     #endif\r
56 }\r
57 #endif\r
58 \r
59 \r
60 #if configCHECK_FOR_STACK_OVERFLOW > 0\r
61 /**\r
62  * FreeRTOS stack overflow hook.\r
63  */\r
64 void vApplicationStackOverflowHook(xTaskHandle xTask,\r
65                                    signed portCHAR *pcTaskName) {\r
66     #ifdef DEBUG\r
67     rpp_sci_printf((const char*)\r
68             "ERROR: Stack overflow : \"%s\".\r\n", pcTaskName\r
69         );\r
70     #endif\r
71 }\r
72 #endif\r
73 \r
74 \r
75 \r
76 /* USER CODE BEGIN (4) */\r
77 /* USER CODE END */\r