]> rtime.felk.cvut.cz Git - rpp-test-sw.git/blob - rpp-test-sw/commands/main.c
Remove unneeded type cast of printf format string
[rpp-test-sw.git] / rpp-test-sw / commands / main.c
1 /*\r
2  * Copyright (C) 2012-2014 Czech Technical University in Prague\r
3  *\r
4  * Created on: 15.3.2012\r
5  *\r
6  * Authors:\r
7  *     - Michal Horn\r
8  *     - Carlos Jenkins <carlos@jenkins.co.cr>\r
9  *\r
10  * This document contains proprietary information belonging to Czech\r
11  * Technical University in Prague. Passing on and copying of this\r
12  * document, and communication of its contents is not permitted\r
13  * without prior written authorization.\r
14  *\r
15  * File : main.c\r
16  *\r
17  * Abstract:\r
18  *      This file contains main function and Hook functions used by IDLE task.\r
19  *\r
20  */\r
21 \r
22 /* Include Files */\r
23 #include "rpp/rpp.h"\r
24 #include "cmdproc_freertos_tms570.h"\r
25 #include "version.h" // Generated by Eclipse in the pre-build step\r
26 \r
27 /** @fn void main(void)\r
28  *   @brief Application main function\r
29  *\r
30  *   This function is called after startup.\r
31  */\r
32 void main(void)\r
33 {\r
34         rpp_init();\r
35 \r
36         // Speed up the SCI\r
37         rpp_sci_setup(115200);\r
38 \r
39         rpp_sci_printf("\nRapid Prototyping Platform v00.01-001\n");\r
40         rpp_sci_printf("Test Software version " GIT_VERSION "\n");\r
41         rpp_sci_printf("Porsche Engineering 06/2013\n");\r
42 \r
43         initCmdProc(0);\r
44         vTaskStartScheduler();\r
45 \r
46         //We should never get here\r
47         while (1)\r
48                 ;\r
49 }\r
50 \r
51 #if configUSE_MALLOC_FAILED_HOOK == 1\r
52 /**\r
53  * FreeRTOS malloc() failed hook.\r
54  */\r
55 void vApplicationMallocFailedHook(void)\r
56 {\r
57         #ifdef DEBUG\r
58         rpp_sci_printf("ERROR: manual memory allocation failed.\r\n");\r
59         #endif\r
60 }\r
61 #endif\r
62 \r
63 \r
64 #if configCHECK_FOR_STACK_OVERFLOW > 0\r
65 /**\r
66  * FreeRTOS stack overflow hook.\r
67  */\r
68 void vApplicationStackOverflowHook(xTaskHandle xTask,\r
69                                                                    signed portCHAR *pcTaskName)\r
70 {\r
71         #ifdef DEBUG\r
72         rpp_sci_printf("ERROR: Stack overflow : \"%s\".\r\n", pcTaskName);\r
73         #endif\r
74 }\r
75 #endif\r