From: richardbarry Date: Mon, 5 Oct 2009 20:26:11 +0000 (+0000) Subject: Add clobber list to asm sections to allow use with higher optimisation. X-Git-Tag: V6.0.0~20 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=734da498938b7984f603c5127fb4436803fa5307;p=freertos Add clobber list to asm sections to allow use with higher optimisation. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@909 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- diff --git a/Demo/CORTEX_MPU_LM3Sxxxx_Rowley/FreeRTOSConfig.h b/Demo/CORTEX_MPU_LM3Sxxxx_Rowley/FreeRTOSConfig.h index a48682e4b..4b4fc644c 100644 --- a/Demo/CORTEX_MPU_LM3Sxxxx_Rowley/FreeRTOSConfig.h +++ b/Demo/CORTEX_MPU_LM3Sxxxx_Rowley/FreeRTOSConfig.h @@ -67,7 +67,7 @@ #define configCPU_CLOCK_HZ ( ( unsigned long ) 50000000 ) #define configTICK_RATE_HZ ( ( portTickType ) 1000 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 100 ) -#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 24000 ) ) +#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 1024 ) ) #define configMAX_TASK_NAME_LEN ( 12 ) #define configUSE_TRACE_FACILITY 1 #define configUSE_16_BIT_TICKS 0 diff --git a/Demo/CORTEX_MPU_LM3Sxxxx_Rowley/main.c b/Demo/CORTEX_MPU_LM3Sxxxx_Rowley/main.c index 3a5491a34..046b65b47 100644 --- a/Demo/CORTEX_MPU_LM3Sxxxx_Rowley/main.c +++ b/Demo/CORTEX_MPU_LM3Sxxxx_Rowley/main.c @@ -298,6 +298,12 @@ int main( void ) xTaskCreateRestricted( &xRegTest2Parameters, NULL ); xTaskCreateRestricted( &xCheckTaskParameters, NULL ); + /* Print out the amount of free heap space so configTOTAL_HEAP_SIZE can be + tuned. The heap size is set to be very small in this example and will need + to be increased before many more tasks, queues or semaphores can be + created. */ + debug_printf( "There are %d bytes of unused heap space, although the idle task is yet to be created.\r\n", xPortGetFreeHeapSize() ); + /* Start the scheduler. */ vTaskStartScheduler(); @@ -513,6 +519,7 @@ xQueueHandle xQueue = xFileScopeCheckQueue; " BNE prvDeleteMe \n" " CMP R12, #112 \n" " BNE prvDeleteMe \n" + :::"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r8", "r9", "r10", "r11", "r12" ); /* Send mainREG_TEST_1_STILL_EXECUTING to the check task to indicate that this @@ -576,6 +583,7 @@ xQueueHandle xQueue = ( xQueueHandle ) pvParameters; " BNE prvDeleteMe \n" " CMP R12, #12 \n" " BNE prvDeleteMe \n" + :::"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r8", "r9", "r10", "r11", "r12" ); /* Send mainREG_TEST_2_STILL_EXECUTING to the check task to indicate that this @@ -684,14 +692,14 @@ int uipprintf( const char *fmt, ... ) void hard_fault_handler(unsigned int * hardfault_args) { -unsigned int stacked_r0; -unsigned int stacked_r1; -unsigned int stacked_r2; -unsigned int stacked_r3; -unsigned int stacked_r12; -unsigned int stacked_lr; -unsigned int stacked_pc; -unsigned int stacked_psr; +volatile unsigned int stacked_r0; +volatile unsigned int stacked_r1; +volatile unsigned int stacked_r2; +volatile unsigned int stacked_r3; +volatile unsigned int stacked_r12; +volatile unsigned int stacked_lr; +volatile unsigned int stacked_pc; +volatile unsigned int stacked_psr; stacked_r0 = ((unsigned long) hardfault_args[0]); stacked_r1 = ((unsigned long) hardfault_args[1]); diff --git a/Demo/CORTEX_MPU_LPC1768_GCC_RedSuite/src/FreeRTOSConfig.h b/Demo/CORTEX_MPU_LPC1768_GCC_RedSuite/src/FreeRTOSConfig.h index a91b03e1b..33df0fb6e 100644 --- a/Demo/CORTEX_MPU_LPC1768_GCC_RedSuite/src/FreeRTOSConfig.h +++ b/Demo/CORTEX_MPU_LPC1768_GCC_RedSuite/src/FreeRTOSConfig.h @@ -68,7 +68,7 @@ #define configCPU_CLOCK_HZ ( ( unsigned long ) 99000000 ) #define configTICK_RATE_HZ ( ( portTickType ) 1000 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 80 ) -#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 5 * 1024 ) ) +#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 1024 ) ) #define configMAX_TASK_NAME_LEN ( 12 ) #define configUSE_TRACE_FACILITY 1 #define configUSE_16_BIT_TICKS 0 diff --git a/Demo/CORTEX_MPU_LPC1768_GCC_RedSuite/src/main.c b/Demo/CORTEX_MPU_LPC1768_GCC_RedSuite/src/main.c index eb696e395..28fcb8459 100644 --- a/Demo/CORTEX_MPU_LPC1768_GCC_RedSuite/src/main.c +++ b/Demo/CORTEX_MPU_LPC1768_GCC_RedSuite/src/main.c @@ -525,6 +525,7 @@ xQueueHandle xQueue = xFileScopeCheckQueue; " BNE prvDeleteMe \n" " CMP R12, #112 \n" " BNE prvDeleteMe \n" + :::"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r8", "r9", "r10", "r11", "r12" ); /* Send mainREG_TEST_1_STILL_EXECUTING to the check task to indicate that this @@ -588,6 +589,7 @@ xQueueHandle xQueue = ( xQueueHandle ) pvParameters; " BNE prvDeleteMe \n" " CMP R12, #12 \n" " BNE prvDeleteMe \n" + :::"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r8", "r9", "r10", "r11", "r12" ); /* Send mainREG_TEST_2_STILL_EXECUTING to the check task to indicate that this