]> git.sur5r.net Git - freertos/commitdiff
Add clobber list to asm sections to allow use with higher optimisation.
authorrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Mon, 5 Oct 2009 20:26:11 +0000 (20:26 +0000)
committerrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Mon, 5 Oct 2009 20:26:11 +0000 (20:26 +0000)
git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@909 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

Demo/CORTEX_MPU_LM3Sxxxx_Rowley/FreeRTOSConfig.h
Demo/CORTEX_MPU_LM3Sxxxx_Rowley/main.c
Demo/CORTEX_MPU_LPC1768_GCC_RedSuite/src/FreeRTOSConfig.h
Demo/CORTEX_MPU_LPC1768_GCC_RedSuite/src/main.c

index a48682e4b9f54ca5dc768298d24a0ac34940082f..4b4fc644cd0bd1db9b3db8d456e3d6813bf23a53 100644 (file)
@@ -67,7 +67,7 @@
 #define configCPU_CLOCK_HZ                             ( ( unsigned long ) 50000000 )\r
 #define configTICK_RATE_HZ                             ( ( portTickType ) 1000 )\r
 #define configMINIMAL_STACK_SIZE               ( ( unsigned short ) 100 )\r
-#define configTOTAL_HEAP_SIZE                  ( ( size_t ) ( 24000 ) )\r
+#define configTOTAL_HEAP_SIZE                  ( ( size_t ) ( 1024 ) )\r
 #define configMAX_TASK_NAME_LEN                        ( 12 )\r
 #define configUSE_TRACE_FACILITY               1\r
 #define configUSE_16_BIT_TICKS                 0\r
index 3a5491a340f24e3cd66e62e2f68807c5a2487863..046b65b4791bceb688ac635d55e85002762cf944 100644 (file)
@@ -298,6 +298,12 @@ int main( void )
     xTaskCreateRestricted( &xRegTest2Parameters, NULL );\r
        xTaskCreateRestricted( &xCheckTaskParameters, NULL );\r
 \r
+       /* Print out the amount of free heap space so configTOTAL_HEAP_SIZE can be\r
+       tuned.  The heap size is set to be very small in this example and will need\r
+       to be increased before many more tasks, queues or semaphores can be \r
+       created. */\r
+       debug_printf( "There are %d bytes of unused heap space, although the idle task is yet to be created.\r\n", xPortGetFreeHeapSize() );\r
+\r
        /* Start the scheduler. */\r
        vTaskStartScheduler();\r
 \r
@@ -513,6 +519,7 @@ xQueueHandle xQueue = xFileScopeCheckQueue;
                        "               BNE     prvDeleteMe                     \n"\r
                        "               CMP     R12, #112                       \n"\r
                        "               BNE     prvDeleteMe                     \n"\r
+                       :::"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r8", "r9", "r10", "r11", "r12"\r
                );\r
 \r
                /* Send mainREG_TEST_1_STILL_EXECUTING to the check task to indicate that this \r
@@ -576,6 +583,7 @@ xQueueHandle xQueue = ( xQueueHandle ) pvParameters;
                        "               BNE     prvDeleteMe                     \n"\r
                        "               CMP     R12, #12                        \n"\r
                        "               BNE     prvDeleteMe                     \n"\r
+            :::"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r8", "r9", "r10", "r11", "r12"\r
                );\r
 \r
                /* Send mainREG_TEST_2_STILL_EXECUTING to the check task to indicate that this \r
@@ -684,14 +692,14 @@ int uipprintf( const char *fmt, ... )
 \r
 void hard_fault_handler(unsigned int * hardfault_args)\r
 {\r
-unsigned int stacked_r0;\r
-unsigned int stacked_r1;\r
-unsigned int stacked_r2;\r
-unsigned int stacked_r3;\r
-unsigned int stacked_r12;\r
-unsigned int stacked_lr;\r
-unsigned int stacked_pc;\r
-unsigned int stacked_psr;\r
+volatile unsigned int stacked_r0;\r
+volatile unsigned int stacked_r1;\r
+volatile unsigned int stacked_r2;\r
+volatile unsigned int stacked_r3;\r
+volatile unsigned int stacked_r12;\r
+volatile unsigned int stacked_lr;\r
+volatile unsigned int stacked_pc;\r
+volatile unsigned int stacked_psr;\r
 \r
        stacked_r0 = ((unsigned long) hardfault_args[0]);\r
        stacked_r1 = ((unsigned long) hardfault_args[1]);\r
index a91b03e1b8f3e17c551393e58089cecd7ee1dcd9..33df0fb6e838bbeecb8ea3083bc06bd48198b645 100644 (file)
@@ -68,7 +68,7 @@
 #define configCPU_CLOCK_HZ                     ( ( unsigned long ) 99000000 )\r
 #define configTICK_RATE_HZ                     ( ( portTickType ) 1000 )\r
 #define configMINIMAL_STACK_SIZE       ( ( unsigned short ) 80 )\r
-#define configTOTAL_HEAP_SIZE          ( ( size_t ) ( 5 * 1024 ) )\r
+#define configTOTAL_HEAP_SIZE          ( ( size_t ) ( 1024 ) )\r
 #define configMAX_TASK_NAME_LEN                ( 12 )\r
 #define configUSE_TRACE_FACILITY       1\r
 #define configUSE_16_BIT_TICKS         0\r
index eb696e395212c29ffc786c79372bf832e947191d..28fcb8459e853817ab1a2b1e76f3c37977b21e18 100644 (file)
@@ -525,6 +525,7 @@ xQueueHandle xQueue = xFileScopeCheckQueue;
                        "               BNE     prvDeleteMe                     \n"\r
                        "               CMP     R12, #112                       \n"\r
                        "               BNE     prvDeleteMe                     \n"\r
+                       :::"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r8", "r9", "r10", "r11", "r12"\r
                );\r
 \r
                /* Send mainREG_TEST_1_STILL_EXECUTING to the check task to indicate that this \r
@@ -588,6 +589,7 @@ xQueueHandle xQueue = ( xQueueHandle ) pvParameters;
                        "               BNE     prvDeleteMe                     \n"\r
                        "               CMP     R12, #12                        \n"\r
                        "               BNE     prvDeleteMe                     \n"\r
+            :::"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r8", "r9", "r10", "r11", "r12"\r
                );\r
 \r
                /* Send mainREG_TEST_2_STILL_EXECUTING to the check task to indicate that this \r