]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Demo/CORTEX_R4F_RZ_T_GCC_IAR_ARM/src/main.c
Modify RZ/T e2studio directory structure to accommodate an IAR project.
[freertos] / FreeRTOS / Demo / CORTEX_R4F_RZ_T_GCC_IAR_ARM / src / main.c
index a90203650c7588f5295fbaec82de7cf99dabf90c..730e617a594a3ddecebef8a37e88b65831e074dd 100644 (file)
 /* Renesas includes. */\r
 #include "r_cg_macrodriver.h"\r
 #include "r_cg_icu.h"\r
-#include "r_cg_scifa.h"\r
 #include "r_cg_rspi.h"\r
 #include "r_system.h"\r
 #include "r_reset.h"\r
-#include "siochar.h"\r
 #include "r_cg_userdefine.h"\r
 \r
 /* Set mainCREATE_SIMPLE_BLINKY_DEMO_ONLY to one to run the simple blinky demo,\r
 or 0 to run the more comprehensive test and demo application. */\r
-#define mainCREATE_SIMPLE_BLINKY_DEMO_ONLY     1\r
+#define mainCREATE_SIMPLE_BLINKY_DEMO_ONLY     0\r
 \r
 /*-----------------------------------------------------------*/\r
 \r
 /*\r
- * The start up code does not include a routine to clear the BSS segment to 0\r
- * (as would be normal before calling main()), so the BSS is cleared manually\r
+ * The GCC start up code does not include a routine to clear the BSS segment to\r
+ * (as would be normal before calling main()), so the BSS is cleared manually\r
  * using the following function.\r
  */\r
 static void prvClearBSS( void );\r
@@ -176,19 +174,6 @@ int main( void )
 static void prvSetupHardware( void )\r
 {\r
        R_Systeminit();\r
-\r
-       /* Enable RSPI1 (serial peripheral interface). */\r
-       R_RSPI1_Start();\r
-\r
-       /* Configure the UART channel for communication with a host PC via on-board\r
-       RL78/G1C device. */\r
-       io_init_scifa2();\r
-\r
-       /* Enable SCIFA2 (serial communications interface with FIFO). */\r
-       R_SCIFA2_Start();\r
-\r
-       /* SW3 interrupts. */\r
-       R_ICU_IRQ12_Start();\r
 }\r
 /*-----------------------------------------------------------*/\r
 \r
@@ -251,13 +236,17 @@ void vApplicationTickHook( void )
 \r
 static void prvClearBSS( void )\r
 {\r
-extern uint32_t __bss_start__[];\r
-extern uint32_t __bss_end__[];\r
-size_t xSize;\r
+#ifdef __GNUC__\r
+       /* The GCC start up files seem to be missing code to clear the BSS, so it\r
+       is done manually here. */\r
+       extern uint32_t __bss_start__[];\r
+       extern uint32_t __bss_end__[];\r
+       size_t xSize;\r
 \r
        /* Zero out bss. */\r
        xSize = ( ( size_t ) __bss_end__ ) - ( ( size_t ) __bss_start__ );\r
        memset( ( void * ) __bss_start__, 0x00, xSize );\r
+#endif /* __GNUC__ */\r
 }\r
 \r
 \r