]> git.sur5r.net Git - freertos/commitdiff
Check in before attempting to remove absolute paths in PPC405 project.
authorRichardBarry <RichardBarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Fri, 7 Mar 2008 18:23:27 +0000 (18:23 +0000)
committerRichardBarry <RichardBarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Fri, 7 Mar 2008 18:23:27 +0000 (18:23 +0000)
git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@249 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

Demo/PPC405_Xilinx_Virtex4_GCC/RTOSDemo/main.c
Demo/PPC405_Xilinx_Virtex4_GCC/__xps/rtosdemo_compiler.opt
Demo/PPC405_Xilinx_Virtex4_GCC/system.xmp
Demo/PPC405_Xilinx_Virtex4_GCC/system_incl.make
Source/portable/GCC/PPC405_Xilinx/port.c

index c331c9df0f31e0978bab8923007450691b2e4d1a..45b3b701ca92970574b5f0b6587a606dc9c841d7 100644 (file)
@@ -139,7 +139,7 @@ discover an unexpected value. */
 static unsigned portBASE_TYPE xRegTestStatus = pdPASS;\r
 \r
 /* Counters used to ensure the regtest tasks are still running. */\r
-static unsigned portLONG ulRegTest1Counter = 0UL, ulRegTest2Counter = 0UL;\r
+static volatile unsigned portLONG ulRegTest1Counter = 0UL, ulRegTest2Counter = 0UL;\r
 \r
 /*-----------------------------------------------------------*/\r
 \r
@@ -332,20 +332,26 @@ static void prvSetupHardware( void )
 }\r
 /*-----------------------------------------------------------*/\r
 \r
-static void prvRegTest1Pass( void )\r
+void prvRegTest1Pass( void )\r
 {\r
+       /* Called from the inline assembler - this cannot be static\r
+       otherwise it can get optimised away. */\r
        ulRegTest1Counter++;\r
 }\r
 /*-----------------------------------------------------------*/\r
 \r
-static void prvRegTest2Pass( void )\r
+void prvRegTest2Pass( void )\r
 {\r
+       /* Called from the inline assembler - this cannot be static\r
+       otherwise it can get optimised away. */\r
        ulRegTest2Counter++;\r
 }\r
 /*-----------------------------------------------------------*/\r
 \r
-static void prvRegTestFail( void )\r
+void prvRegTestFail( void )\r
 {\r
+       /* Called from the inline assembler - this cannot be static\r
+       otherwise it can get optimised away. */\r
        xRegTestStatus = pdFAIL;\r
 }\r
 /*-----------------------------------------------------------*/\r
index 42e94113dad5dbb2d6ebed4cdc31d11e6bb17849..ae471e99f1566caed33f317f9d33f3711be1ebea 100644 (file)
@@ -3,7 +3,7 @@ RTOSDEMO_SOURCES = RTOSDemo/main.c RTOSDemo/serial/serial.c RTOSDemo/partest/par
 RTOSDEMO_HEADERS = RTOSDemo/FreeRTOSConfig.h \r
 RTOSDEMO_CC = powerpc-eabi-gcc\r
 RTOSDEMO_CC_SIZE = powerpc-eabi-size\r
-RTOSDEMO_CC_OPT = -O0\r
+RTOSDEMO_CC_OPT = -Os\r
 RTOSDEMO_CFLAGS = -D GCC_PPC405 -mregnames -Xlinker -Map=rtosdemo.map -Wall\r
 RTOSDEMO_CC_SEARCH = # -B\r
 RTOSDEMO_LIBPATH = -L./ppc405_0/lib/ # -L\r
index da90991780643cbd6ae954476c12da5bdf9c541e..6bb8f19d40ae98c7cd4747c9c074acb29b1fe87a 100644 (file)
@@ -61,7 +61,7 @@ Header: RTOSDemo/FreeRTOSConfig.h
 DefaultInit: EXECUTABLE\r
 InitBram: 0\r
 Active: 1\r
-CompilerOptLevel: 0\r
+CompilerOptLevel: 4\r
 GlobPtrOpt: 0\r
 DebugSym: 1\r
 ProfileFlag: 0\r
index dd7adf630171a9bee96e44f6f4202079fc7d67c2..60ae46e13b1a8a324baf0d695c03f2503b359a15 100644 (file)
@@ -115,7 +115,7 @@ RTOSDEMO_HEADERS = RTOSDemo/FreeRTOSConfig.h
 \r
 RTOSDEMO_CC = powerpc-eabi-gcc\r
 RTOSDEMO_CC_SIZE = powerpc-eabi-size\r
-RTOSDEMO_CC_OPT = -O0\r
+RTOSDEMO_CC_OPT = -Os\r
 RTOSDEMO_CFLAGS = -D GCC_PPC405 -mregnames -Xlinker -Map=rtosdemo.map -Wall\r
 RTOSDEMO_CC_SEARCH = # -B\r
 RTOSDEMO_LIBPATH = -L./ppc405_0/lib/ # -L\r
index 23acc26473759045f990f50ef0a5a44ab8bf3a94..ebe2b0263b210afaf1dc17e9769fbbb5f010b365 100644 (file)
@@ -105,66 +105,16 @@ portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, pdTASK_CODE
        *pxTopOfStack--;\r
 \r
        /* EABI stack frame. */\r
-       *pxTopOfStack = 0x31313131UL;   /* R31. */\r
-       pxTopOfStack--;\r
-       *pxTopOfStack = 0x30303030UL;   /* R30. */\r
-       pxTopOfStack--;\r
-       *pxTopOfStack = 0x29292929UL;   /* R29. */\r
-       pxTopOfStack--;\r
-       *pxTopOfStack = 0x28282828UL;   /* R28. */\r
-       pxTopOfStack--;\r
-       *pxTopOfStack = 0x27272727UL;   /* R27. */\r
-       pxTopOfStack--;\r
-       *pxTopOfStack = 0x26262626UL;   /* R26. */\r
-       pxTopOfStack--;\r
-       *pxTopOfStack = 0x25252525UL;   /* R25. */\r
-       pxTopOfStack--;\r
-       *pxTopOfStack = 0x24242424UL;   /* R24. */\r
-       pxTopOfStack--;\r
-       *pxTopOfStack = 0x23232323UL;   /* R23. */\r
-       pxTopOfStack--;\r
-       *pxTopOfStack = 0x22222222UL;   /* R22. */\r
-       pxTopOfStack--;\r
-       *pxTopOfStack = 0x21212121UL;   /* R21. */\r
-       pxTopOfStack--;\r
-       *pxTopOfStack = 0x20202020UL;   /* R20. */\r
-       pxTopOfStack--;\r
-       *pxTopOfStack = 0x19191919UL;   /* R19. */\r
-       pxTopOfStack--;\r
-       *pxTopOfStack = 0x18181818UL;   /* R18. */\r
-       pxTopOfStack--;\r
-       *pxTopOfStack = 0x17171717UL;   /* R17. */\r
-       pxTopOfStack--;\r
-       *pxTopOfStack = 0x16161616UL;   /* R16. */\r
-       pxTopOfStack--;\r
-       *pxTopOfStack = 0x15151515UL;   /* R15. */\r
-       pxTopOfStack--;\r
-       *pxTopOfStack = 0x14141414UL;   /* R14. */\r
-       pxTopOfStack--;\r
-       *pxTopOfStack = 0x13131313UL;   /* R13. */\r
-       pxTopOfStack--;\r
-       *pxTopOfStack = 0x12121212UL;   /* R12. */\r
-       pxTopOfStack--;\r
-       *pxTopOfStack = 0x11111111UL;   /* R11. */\r
-       pxTopOfStack--;\r
-       *pxTopOfStack = 0x10101010UL;   /* R10. */\r
-       pxTopOfStack--;\r
-       *pxTopOfStack = 0x09090909UL;   /* R9. */\r
-       pxTopOfStack--;\r
-       *pxTopOfStack = 0x08080808UL;   /* R8. */\r
-       pxTopOfStack--;\r
-       *pxTopOfStack = 0x07070707UL;   /* R7. */\r
-       pxTopOfStack--;\r
-       *pxTopOfStack = 0x06060606UL;   /* R6. */\r
-       pxTopOfStack--;\r
-       *pxTopOfStack = 0x05050505UL;   /* R5. */\r
-       pxTopOfStack--;\r
-       *pxTopOfStack = 0x04040404UL;   /* R4. */\r
-       pxTopOfStack--;\r
+       pxTopOfStack -= 28;     /* R31 to R4 inclusive. */\r
+\r
+       /* Parameters in R3. */\r
        *pxTopOfStack = ( portSTACK_TYPE ) pvParameters;\r
        pxTopOfStack--;\r
        *pxTopOfStack = 0x02020202UL;   /* R2. */\r
        pxTopOfStack--;\r
+\r
+       /* R1 is the stack pointer so is omitted. */\r
+\r
        *pxTopOfStack = 0x10000001UL;;  /* R0. */\r
        pxTopOfStack--;\r
        *pxTopOfStack = 0x00000000UL;   /* USPRG0. */\r
@@ -175,13 +125,13 @@ portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, pdTASK_CODE
        pxTopOfStack--;\r
        *pxTopOfStack = 0x00000000UL;   /* CTR. */\r
        pxTopOfStack--;\r
-       *pxTopOfStack = ( portSTACK_TYPE ) vPortStartFirstTask; /* LR. */\r
+       *pxTopOfStack = ( portSTACK_TYPE ) vPortEndScheduler;   /* LR. */\r
        pxTopOfStack--;\r
        *pxTopOfStack = ( portSTACK_TYPE ) pxCode; /* SRR0. */\r
        pxTopOfStack--;\r
        *pxTopOfStack = portINITIAL_MSR;/* SRR1. */\r
        pxTopOfStack--;\r
-       *pxTopOfStack = ( portSTACK_TYPE ) vPortStartFirstTask;/* Next LR. */\r
+       *pxTopOfStack = ( portSTACK_TYPE ) vPortEndScheduler;/* Next LR. */\r
        pxTopOfStack--;\r
        *pxTopOfStack = 0x00000000UL;;/* Backchain. */\r
 \r
@@ -203,6 +153,7 @@ portBASE_TYPE xPortStartScheduler( void )
 void vPortEndScheduler( void )\r
 {\r
        /* Not implemented. */\r
+       for( ;; );\r
 }\r
 /*-----------------------------------------------------------*/\r
 \r