2 * Copyright (C) 2012-2015 Czech Technical University in Prague
\r
4 * Created on: 15.3.2012
\r
8 * - Carlos Jenkins <carlos@jenkins.co.cr>
\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
18 * This file contains main function and Hook functions used by IDLE task.
\r
23 #include "rpp/rpp.h"
\r
25 #include "cmdproc_freertos.h"
\r
26 #include "version.h" // Generated by Makefile
\r
28 #if defined(TARGET_TMS570_HDK)
\r
29 #define TARGET_STR "TI HDK TMS570LS3137"
\r
30 #elif defined(TARGET_RM48_HDK)
\r
31 #define TARGET_STR "TI HDK RM48L952"
\r
32 #elif defined(TARGET_TMS570_HYDCTR)
\r
33 #define TARGET_STR "Eaton Hydraulics Controller"
\r
34 #elif defined(TARGET_POSIX)
\r
35 #define TARGET_STR "POSIX version"
\r
37 #error Unknown target
\r
40 /** @fn void main(void)
\r
41 * @brief Application main function
\r
43 * This function is called after startup.
\r
48 rpp_gio_init(RPP_GIO_PORT_ALL);
\r
52 rpp_sci_setup(115200);
\r
54 rpp_sci_printf("\n" TARGET_STR ", FreeRTOS %d.%d.%d\n", FREERTOS_VERSION_NUMBER_MAYOR, FREERTOS_VERSION_NUMBER_MINOR, FREERTOS_VERSION_NUMBER_REV);
\r
55 rpp_sci_printf("Test Software version " GIT_VERSION "\n");
\r
56 rpp_sci_printf("CTU in Prague 04/2015\n");
\r
59 vTaskStartScheduler();
\r
61 //We should never get here
\r
66 #if configUSE_MALLOC_FAILED_HOOK == 1
\r
68 * FreeRTOS malloc() failed hook.
\r
70 void vApplicationMallocFailedHook(void)
\r
73 rpp_sci_printf("ERROR: manual memory allocation failed.\r\n");
\r
79 #if configCHECK_FOR_STACK_OVERFLOW > 0
\r
81 * FreeRTOS stack overflow hook.
\r
83 void vApplicationStackOverflowHook(xTaskHandle xTask,
\r
84 signed portCHAR *pcTaskName)
\r
87 rpp_sci_printf("ERROR: Stack overflow : \"%s\".\r\n", pcTaskName);
\r