]> rtime.felk.cvut.cz Git - pes-rpp/rpp-test-sw.git/blobdiff - rpp-test-sw/commands/main.c
Compile with Makefile instead of CSS
[pes-rpp/rpp-test-sw.git] / rpp-test-sw / commands / main.c
index c3f9d2be776814ef8fe163b6d31e0f153c2f6483..22ccb041b20950c1cee39fb22cd7959e26b0d7d2 100644 (file)
@@ -1,5 +1,5 @@
 /*\r
- * Copyright (C) 2012-2013 Czech Technical University in Prague\r
+ * Copyright (C) 2012-2015 Czech Technical University in Prague\r
  *\r
  * Created on: 15.3.2012\r
  *\r
@@ -7,18 +7,10 @@
  *     - Michal Horn\r
  *     - Carlos Jenkins <carlos@jenkins.co.cr>\r
  *\r
- * This program is free software; you can redistribute it and/or modify\r
- * it under the terms of the GNU General Public License as published by\r
- * the Free Software Foundation; either version 2 of the License, or\r
- * (at your option) any later version.\r
- *\r
- * This program is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
- * GNU General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU General Public License\r
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.\r
+ * This document contains proprietary information belonging to Czech\r
+ * Technical University in Prague. Passing on and copying of this\r
+ * document, and communication of its contents is not permitted\r
+ * without prior written authorization.\r
  *\r
  * File : main.c\r
  *\r
 \r
 /* Include Files */\r
 #include "rpp/rpp.h"\r
-#include "cmdproc_freertos_tms570.h"\r
-#include "version.h" // Generated by Eclipse in the pre-build step\r
+#include "os/os.h"\r
+#include "cmdproc_freertos.h"\r
+#include "version.h" // Generated by Makefile\r
+\r
+#if defined(TARGET_TMS570_HDK)\r
+#define TARGET_STR "TI HDK TMS570LS3137"\r
+#elif defined(TARGET_RM48_HDK)\r
+#define TARGET_STR "TI HDK RM48L952"\r
+#endif\r
 \r
 /** @fn void main(void)\r
  *   @brief Application main function\r
  */\r
 void main(void)\r
 {\r
-       rpp_init();\r
+       rpp_adc_init();\r
+       rpp_gio_init(RPP_GIO_PORT_ALL);\r
+       rpp_sci_init();\r
 \r
        // Speed up the SCI\r
        rpp_sci_setup(115200);\r
 \r
-       rpp_sci_printf("\nRapid Prototyping Platform v00.01-001\n");\r
+       rpp_sci_printf("\n" TARGET_STR ", FreeRTOS %d.%d.%d\n", FREERTOS_VERSION_NUMBER_MAYOR, FREERTOS_VERSION_NUMBER_MINOR, FREERTOS_VERSION_NUMBER_REV);\r
        rpp_sci_printf("Test Software version " GIT_VERSION "\n");\r
-       rpp_sci_printf("Porsche Engineering 06/2013\n");\r
+       rpp_sci_printf("CTU in Prague 04/2015\n");\r
 \r
        initCmdProc(0);\r
        vTaskStartScheduler();\r
@@ -63,9 +64,7 @@ void main(void)
 void vApplicationMallocFailedHook(void)\r
 {\r
        #ifdef DEBUG\r
-       rpp_sci_printf((const char*)\r
-                                  "ERROR: manual memory allocation failed.\r\n"\r
-                                  );\r
+       rpp_sci_printf("ERROR: manual memory allocation failed.\r\n");\r
        #endif\r
 }\r
 #endif\r
@@ -79,9 +78,7 @@ void vApplicationStackOverflowHook(xTaskHandle xTask,
                                                                   signed portCHAR *pcTaskName)\r
 {\r
        #ifdef DEBUG\r
-       rpp_sci_printf((const char*)\r
-                                  "ERROR: Stack overflow : \"%s\".\r\n", pcTaskName\r
-                                  );\r
+       rpp_sci_printf("ERROR: Stack overflow : \"%s\".\r\n", pcTaskName);\r
        #endif\r
 }\r
 #endif\r