]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Demo/RX200_RX231-RSK_GCC_e2studio_IAR/src/main.c
Final tidy up before tagging V8.2.3.
[freertos] / FreeRTOS / Demo / RX200_RX231-RSK_GCC_e2studio_IAR / src / main.c
index 409c03775f549d57996385a9eff77c51b81c26b1..cc644d4801a3fd67be2f167994a57381d95e0082 100644 (file)
@@ -1,5 +1,5 @@
 /*\r
-    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.\r
+    FreeRTOS V8.2.3 - Copyright (C) 2015 Real Time Engineers Ltd.\r
     All rights reserved\r
 \r
     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
@@ -8,7 +8,7 @@
 \r
     FreeRTOS is free software; you can redistribute it and/or modify it under\r
     the terms of the GNU General Public License (version 2) as published by the\r
-    Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.\r
+    Free Software Foundation >>>> AND MODIFIED BY <<<< the FreeRTOS exception.\r
 \r
     ***************************************************************************\r
     >>!   NOTE: The modification to the GPL is included to allow you to     !<<\r
@@ -83,6 +83,8 @@
  * THE http://www.FreeRTOS.org WEB SITE FOR FULL INFORMATION ON USING THIS DEMO\r
  * APPLICATION, AND ITS ASSOCIATE FreeRTOS ARCHITECTURE PORT!\r
  *\r
+ * http://www.freertos.org/RX231_RTOS_Renesas_GCC_IAR.html\r
+ *\r
  */\r
 \r
 /* Scheduler include files. */\r
@@ -120,6 +122,7 @@ void vApplicationTickHook( void );
 \r
 /*-----------------------------------------------------------*/\r
 \r
+/* See http://www.freertos.org/RX231_RTOS_Renesas_GCC_IAR.html */\r
 int main( void )\r
 {\r
        /* Configure the hardware ready to run the demo. */\r
@@ -214,7 +217,9 @@ void vApplicationTickHook( void )
 /*-----------------------------------------------------------*/\r
 \r
 /* The RX port uses this callback function to configure its tick interrupt.\r
-This allows the application to choose the tick interrupt source. */\r
+This allows the application to choose the tick interrupt source.\r
+***NOTE***: configTICK_VECTOR must be set in FreeRTOSConfig.h to be correct for\r
+whichever vector is used. */\r
 void vApplicationSetupTimerInterrupt( void )\r
 {\r
 const uint32_t ulEnableRegisterWrite = 0xA50BUL, ulDisableRegisterWrite = 0xA500UL;\r
@@ -246,6 +251,26 @@ const uint32_t ulEnableRegisterWrite = 0xA50BUL, ulDisableRegisterWrite = 0xA500
     /* Reneable register protection. */\r
     SYSTEM.PRCR.WORD = ulDisableRegisterWrite;\r
 }\r
+/*-----------------------------------------------------------*/\r
+\r
+#ifdef __ICCRX__\r
+\r
+       #include <intrinsics.h>\r
+\r
+       /* Called from the C start up code when compiled with IAR. */\r
+       #pragma diag_suppress = Pm011\r
+       int __low_level_init(void)\r
+       #pragma diag_default = Pm011\r
+       {\r
+       extern void R_Systeminit( void );\r
+\r
+               __disable_interrupt();\r
+               R_Systeminit();\r
+\r
+               return (int)(1U);\r
+       }\r
+\r
+#endif /* __ICCRX__ */\r
 \r
 \r
 \r