From 0d9fdd2745aa783add3ed9af527f2f82b17a6829 Mon Sep 17 00:00:00 2001 From: mehdi-norouzi Date: Sun, 10 Sep 2023 20:52:53 +0330 Subject: [PATCH 1/7] Add __weak definitions for vApplicationGetIdleTaskMemory and vApplicationGetTimerTaskMemory Define __weak funtions to allocate idle-task and timer-task memories statically to avoid undefined reference errors when compiling with configSUPPORT_STATIC_ALLOCATION flag. --- tasks.c | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/tasks.c b/tasks.c index eee6a8c7077..4f6ed14e24f 100644 --- a/tasks.c +++ b/tasks.c @@ -7678,3 +7678,44 @@ static void prvAddCurrentTaskToDelayedList( TickType_t xTicksToWait, #endif #endif /* if ( configINCLUDE_FREERTOS_TASK_C_ADDITIONS_H == 1 ) */ +/*-----------------------------------------------------------*/ + +/* + vApplicationGetIdleTaskMemory gets called when configSUPPORT_STATIC_ALLOCATION + equals to 1 and is required for static memory allocation support. + This definition can be overwritten. +*/ + +#if (configSUPPORT_STATIC_ALLOCATION == 1) + +__attribute__((__weak__)) void vApplicationGetIdleTaskMemory (StaticTask_t **ppxIdleTaskTCBBuffer, + StackType_t **ppxIdleTaskStackBuffer, + uint32_t *pulIdleTaskStackSize) +{ + /* Idle task control block and stack */ + static StaticTask_t Idle_TCB; + static StackType_t Idle_Stack[configMINIMAL_STACK_SIZE]; + + *ppxIdleTaskTCBBuffer = &Idle_TCB; + *ppxIdleTaskStackBuffer = &Idle_Stack[0]; + *pulIdleTaskStackSize = (uint32_t)configMINIMAL_STACK_SIZE; +} + +/* + vApplicationGetTimerTaskMemory gets called when configSUPPORT_STATIC_ALLOCATION + equals to 1 and is required for static memory allocation support. + This definition can be overwritten. +*/ +__attribute__((__weak__)) void vApplicationGetTimerTaskMemory (StaticTask_t **ppxTimerTaskTCBBuffer, + StackType_t **ppxTimerTaskStackBuffer, + uint32_t *pulTimerTaskStackSize) +{ + /* Timer task control block and stack */ + static StaticTask_t Timer_TCB; + static StackType_t Timer_Stack[configTIMER_TASK_STACK_DEPTH]; + + *ppxTimerTaskTCBBuffer = &Timer_TCB; + *ppxTimerTaskStackBuffer = &Timer_Stack[0]; + *pulTimerTaskStackSize = (uint32_t)configTIMER_TASK_STACK_DEPTH; +} +#endif From 8fbc647ca2bf7ed0657b7e66402e182b7106d051 Mon Sep 17 00:00:00 2001 From: mehdi-norouzi Date: Mon, 11 Sep 2023 08:56:53 +0330 Subject: [PATCH 2/7] Fix formatting in tasks.c --- tasks.c | 64 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/tasks.c b/tasks.c index 4f6ed14e24f..fb28532d872 100644 --- a/tasks.c +++ b/tasks.c @@ -7681,41 +7681,41 @@ static void prvAddCurrentTaskToDelayedList( TickType_t xTicksToWait, /*-----------------------------------------------------------*/ /* - vApplicationGetIdleTaskMemory gets called when configSUPPORT_STATIC_ALLOCATION - equals to 1 and is required for static memory allocation support. - This definition can be overwritten. -*/ + * vApplicationGetIdleTaskMemory gets called when configSUPPORT_STATIC_ALLOCATION + * equals to 1 and is required for static memory allocation support. + * This definition can be overwritten. + */ -#if (configSUPPORT_STATIC_ALLOCATION == 1) +#if ( configSUPPORT_STATIC_ALLOCATION == 1 ) -__attribute__((__weak__)) void vApplicationGetIdleTaskMemory (StaticTask_t **ppxIdleTaskTCBBuffer, - StackType_t **ppxIdleTaskStackBuffer, - uint32_t *pulIdleTaskStackSize) -{ - /* Idle task control block and stack */ - static StaticTask_t Idle_TCB; - static StackType_t Idle_Stack[configMINIMAL_STACK_SIZE]; + __attribute__( ( __weak__ ) ) void vApplicationGetIdleTaskMemory( StaticTask_t ** ppxIdleTaskTCBBuffer, + StackType_t ** ppxIdleTaskStackBuffer, + uint32_t * pulIdleTaskStackSize ) + { + /* Idle task control block and stack */ + static StaticTask_t Idle_TCB; + static StackType_t Idle_Stack[ configMINIMAL_STACK_SIZE ]; - *ppxIdleTaskTCBBuffer = &Idle_TCB; - *ppxIdleTaskStackBuffer = &Idle_Stack[0]; - *pulIdleTaskStackSize = (uint32_t)configMINIMAL_STACK_SIZE; -} + *ppxIdleTaskTCBBuffer = &Idle_TCB; + *ppxIdleTaskStackBuffer = &Idle_Stack[ 0 ]; + *pulIdleTaskStackSize = ( uint32_t ) configMINIMAL_STACK_SIZE; + } /* - vApplicationGetTimerTaskMemory gets called when configSUPPORT_STATIC_ALLOCATION - equals to 1 and is required for static memory allocation support. - This definition can be overwritten. -*/ -__attribute__((__weak__)) void vApplicationGetTimerTaskMemory (StaticTask_t **ppxTimerTaskTCBBuffer, - StackType_t **ppxTimerTaskStackBuffer, - uint32_t *pulTimerTaskStackSize) -{ - /* Timer task control block and stack */ - static StaticTask_t Timer_TCB; - static StackType_t Timer_Stack[configTIMER_TASK_STACK_DEPTH]; + * vApplicationGetTimerTaskMemory gets called when configSUPPORT_STATIC_ALLOCATION + * equals to 1 and is required for static memory allocation support. + * This definition can be overwritten. + */ + __attribute__( ( __weak__ ) ) void vApplicationGetTimerTaskMemory( StaticTask_t ** ppxTimerTaskTCBBuffer, + StackType_t ** ppxTimerTaskStackBuffer, + uint32_t * pulTimerTaskStackSize ) + { + /* Timer task control block and stack */ + static StaticTask_t Timer_TCB; + static StackType_t Timer_Stack[ configTIMER_TASK_STACK_DEPTH ]; - *ppxTimerTaskTCBBuffer = &Timer_TCB; - *ppxTimerTaskStackBuffer = &Timer_Stack[0]; - *pulTimerTaskStackSize = (uint32_t)configTIMER_TASK_STACK_DEPTH; -} -#endif + *ppxTimerTaskTCBBuffer = &Timer_TCB; + *ppxTimerTaskStackBuffer = &Timer_Stack[ 0 ]; + *pulTimerTaskStackSize = ( uint32_t ) configTIMER_TASK_STACK_DEPTH; + } +#endif /* if ( configSUPPORT_STATIC_ALLOCATION == 1 ) */ From e422a217a9425f7bb62f74b43b63d1acbe7cbf22 Mon Sep 17 00:00:00 2001 From: Gaurav Aggarwal Date: Mon, 18 Sep 2023 12:01:55 +0000 Subject: [PATCH 3/7] Remove the need of compiler specific syntax Introduce configKERNEL_PROVIDED_STATIC_MEMORY option which the application can set to 1 to use the default implementations of vApplicationGetIdleTaskMemory and vApplicationGetTimerTaskMemory functions. If an application enables static allocation (i.e. sets configUSE_STATIC_ALLOCATION to 1) and does not provide the above 2 functions, it will result in linker error. The application has two options: 1. Set configKERNEL_PROVIDED_STATIC_MEMORY to 1 to use the default implementations of these functions. 2. Provide implementations of these 2 functions. Signed-off-by: Gaurav Aggarwal --- include/FreeRTOS.h | 4 +++ tasks.c | 70 ++++++++++++++++++++++++++-------------------- 2 files changed, 43 insertions(+), 31 deletions(-) diff --git a/include/FreeRTOS.h b/include/FreeRTOS.h index a2b84185f70..f1d38d3f34f 100644 --- a/include/FreeRTOS.h +++ b/include/FreeRTOS.h @@ -1126,6 +1126,10 @@ #define configSUPPORT_STATIC_ALLOCATION 0 #endif +#ifndef configKERNEL_PROVIDED_STATIC_MEMORY + #define configKERNEL_PROVIDED_STATIC_MEMORY 0 +#endif + #ifndef configSUPPORT_DYNAMIC_ALLOCATION /* Defaults to 1 for backward compatibility. */ #define configSUPPORT_DYNAMIC_ALLOCATION 1 diff --git a/tasks.c b/tasks.c index fb28532d872..0c05ad9e881 100644 --- a/tasks.c +++ b/tasks.c @@ -7680,42 +7680,50 @@ static void prvAddCurrentTaskToDelayedList( TickType_t xTicksToWait, #endif /* if ( configINCLUDE_FREERTOS_TASK_C_ADDITIONS_H == 1 ) */ /*-----------------------------------------------------------*/ -/* - * vApplicationGetIdleTaskMemory gets called when configSUPPORT_STATIC_ALLOCATION - * equals to 1 and is required for static memory allocation support. - * This definition can be overwritten. - */ - -#if ( configSUPPORT_STATIC_ALLOCATION == 1 ) +#if ( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configKERNEL_PROVIDED_STATIC_MEMORY == 1 ) ) - __attribute__( ( __weak__ ) ) void vApplicationGetIdleTaskMemory( StaticTask_t ** ppxIdleTaskTCBBuffer, - StackType_t ** ppxIdleTaskStackBuffer, - uint32_t * pulIdleTaskStackSize ) + /* + * This is the kernel provided implementation of vApplicationGetIdleTaskMemory() + * to provide the memory that is used by the Idle task. It is used when + * configKERNEL_PROVIDED_STATIC_MEMORY is set to 1. The application can provide + * it's own implementation of vApplicationGetIdleTaskMemory by setting + * configKERNEL_PROVIDED_STATIC_MEMORY to 0 or leaving it undefined. + */ + void vApplicationGetIdleTaskMemory( StaticTask_t **ppxIdleTaskTCBBuffer, + StackType_t **ppxIdleTaskStackBuffer, + uint32_t *pulIdleTaskStackSize ) { - /* Idle task control block and stack */ - static StaticTask_t Idle_TCB; - static StackType_t Idle_Stack[ configMINIMAL_STACK_SIZE ]; + static StaticTask_t xIdleTaskTCB; + static StackType_t uxIdleTaskStack[ configMINIMAL_STACK_SIZE ]; - *ppxIdleTaskTCBBuffer = &Idle_TCB; - *ppxIdleTaskStackBuffer = &Idle_Stack[ 0 ]; - *pulIdleTaskStackSize = ( uint32_t ) configMINIMAL_STACK_SIZE; + *ppxIdleTaskTCBBuffer = &( xIdleTaskTCB ); + *ppxIdleTaskStackBuffer = &( uxIdleTaskStack[ 0 ] ); + *pulIdleTaskStackSize = configMINIMAL_STACK_SIZE; } -/* - * vApplicationGetTimerTaskMemory gets called when configSUPPORT_STATIC_ALLOCATION - * equals to 1 and is required for static memory allocation support. - * This definition can be overwritten. - */ - __attribute__( ( __weak__ ) ) void vApplicationGetTimerTaskMemory( StaticTask_t ** ppxTimerTaskTCBBuffer, - StackType_t ** ppxTimerTaskStackBuffer, - uint32_t * pulTimerTaskStackSize ) +#endif /* #if ( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configKERNEL_PROVIDED_STATIC_MEMORY == 1 ) ) */ +/*-----------------------------------------------------------*/ + +#if ( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configKERNEL_PROVIDED_STATIC_MEMORY == 1 ) ) + + /* + * This is the kernel provided implementation of vApplicationGetTimerTaskMemory() + * to provide the memory that is used by the Timer service task. It is used when + * configKERNEL_PROVIDED_STATIC_MEMORY is set to 1. The application can provide + * it's own implementation of vApplicationGetTimerTaskMemory by setting + * configKERNEL_PROVIDED_STATIC_MEMORY to 0 or leaving it undefined. + */ + void vApplicationGetTimerTaskMemory( StaticTask_t **ppxTimerTaskTCBBuffer, + StackType_t **ppxTimerTaskStackBuffer, + uint32_t *pulTimerTaskStackSize ) { - /* Timer task control block and stack */ - static StaticTask_t Timer_TCB; - static StackType_t Timer_Stack[ configTIMER_TASK_STACK_DEPTH ]; + static StaticTask_t xTimerTaskTCB; + static StackType_t uxTimerTaskStack[ configTIMER_TASK_STACK_DEPTH ]; - *ppxTimerTaskTCBBuffer = &Timer_TCB; - *ppxTimerTaskStackBuffer = &Timer_Stack[ 0 ]; - *pulTimerTaskStackSize = ( uint32_t ) configTIMER_TASK_STACK_DEPTH; + *ppxTimerTaskTCBBuffer = &( xTimerTaskTCB ); + *ppxTimerTaskStackBuffer = &( uxTimerTaskStack[ 0 ] ); + *pulTimerTaskStackSize = configTIMER_TASK_STACK_DEPTH; } -#endif /* if ( configSUPPORT_STATIC_ALLOCATION == 1 ) */ + +#endif /* #if ( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configKERNEL_PROVIDED_STATIC_MEMORY == 1 ) ) */ +/*-----------------------------------------------------------*/ From 7d273c9ec7618d9b1526e6043e39eb5e0146e9fc Mon Sep 17 00:00:00 2001 From: Gaurav Aggarwal Date: Mon, 18 Sep 2023 12:23:19 +0000 Subject: [PATCH 4/7] Fix formatting Signed-off-by: Gaurav Aggarwal --- include/FreeRTOS.h | 2 +- tasks.c | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/FreeRTOS.h b/include/FreeRTOS.h index f1d38d3f34f..a3e86928c6a 100644 --- a/include/FreeRTOS.h +++ b/include/FreeRTOS.h @@ -1127,7 +1127,7 @@ #endif #ifndef configKERNEL_PROVIDED_STATIC_MEMORY - #define configKERNEL_PROVIDED_STATIC_MEMORY 0 + #define configKERNEL_PROVIDED_STATIC_MEMORY 0 #endif #ifndef configSUPPORT_DYNAMIC_ALLOCATION diff --git a/tasks.c b/tasks.c index 0c05ad9e881..1c80b3084bd 100644 --- a/tasks.c +++ b/tasks.c @@ -7689,9 +7689,9 @@ static void prvAddCurrentTaskToDelayedList( TickType_t xTicksToWait, * it's own implementation of vApplicationGetIdleTaskMemory by setting * configKERNEL_PROVIDED_STATIC_MEMORY to 0 or leaving it undefined. */ - void vApplicationGetIdleTaskMemory( StaticTask_t **ppxIdleTaskTCBBuffer, - StackType_t **ppxIdleTaskStackBuffer, - uint32_t *pulIdleTaskStackSize ) + void vApplicationGetIdleTaskMemory( StaticTask_t ** ppxIdleTaskTCBBuffer, + StackType_t ** ppxIdleTaskStackBuffer, + uint32_t * pulIdleTaskStackSize ) { static StaticTask_t xIdleTaskTCB; static StackType_t uxIdleTaskStack[ configMINIMAL_STACK_SIZE ]; @@ -7713,9 +7713,9 @@ static void prvAddCurrentTaskToDelayedList( TickType_t xTicksToWait, * it's own implementation of vApplicationGetTimerTaskMemory by setting * configKERNEL_PROVIDED_STATIC_MEMORY to 0 or leaving it undefined. */ - void vApplicationGetTimerTaskMemory( StaticTask_t **ppxTimerTaskTCBBuffer, - StackType_t **ppxTimerTaskStackBuffer, - uint32_t *pulTimerTaskStackSize ) + void vApplicationGetTimerTaskMemory( StaticTask_t ** ppxTimerTaskTCBBuffer, + StackType_t ** ppxTimerTaskStackBuffer, + uint32_t * pulTimerTaskStackSize ) { static StaticTask_t xTimerTaskTCB; static StackType_t uxTimerTaskStack[ configTIMER_TASK_STACK_DEPTH ]; From 272e91738051e7d06fbedb1ad4c3e2e7ebea9633 Mon Sep 17 00:00:00 2001 From: Gaurav Aggarwal Date: Mon, 18 Sep 2023 12:28:01 +0000 Subject: [PATCH 5/7] Fix formatting Signed-off-by: Gaurav Aggarwal --- tasks.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/tasks.c b/tasks.c index 1c80b3084bd..c6245282f90 100644 --- a/tasks.c +++ b/tasks.c @@ -7682,13 +7682,13 @@ static void prvAddCurrentTaskToDelayedList( TickType_t xTicksToWait, #if ( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configKERNEL_PROVIDED_STATIC_MEMORY == 1 ) ) - /* - * This is the kernel provided implementation of vApplicationGetIdleTaskMemory() - * to provide the memory that is used by the Idle task. It is used when - * configKERNEL_PROVIDED_STATIC_MEMORY is set to 1. The application can provide - * it's own implementation of vApplicationGetIdleTaskMemory by setting - * configKERNEL_PROVIDED_STATIC_MEMORY to 0 or leaving it undefined. - */ +/* + * This is the kernel provided implementation of vApplicationGetIdleTaskMemory() + * to provide the memory that is used by the Idle task. It is used when + * configKERNEL_PROVIDED_STATIC_MEMORY is set to 1. The application can provide + * it's own implementation of vApplicationGetIdleTaskMemory by setting + * configKERNEL_PROVIDED_STATIC_MEMORY to 0 or leaving it undefined. + */ void vApplicationGetIdleTaskMemory( StaticTask_t ** ppxIdleTaskTCBBuffer, StackType_t ** ppxIdleTaskStackBuffer, uint32_t * pulIdleTaskStackSize ) @@ -7706,13 +7706,13 @@ static void prvAddCurrentTaskToDelayedList( TickType_t xTicksToWait, #if ( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configKERNEL_PROVIDED_STATIC_MEMORY == 1 ) ) - /* - * This is the kernel provided implementation of vApplicationGetTimerTaskMemory() - * to provide the memory that is used by the Timer service task. It is used when - * configKERNEL_PROVIDED_STATIC_MEMORY is set to 1. The application can provide - * it's own implementation of vApplicationGetTimerTaskMemory by setting - * configKERNEL_PROVIDED_STATIC_MEMORY to 0 or leaving it undefined. - */ +/* + * This is the kernel provided implementation of vApplicationGetTimerTaskMemory() + * to provide the memory that is used by the Timer service task. It is used when + * configKERNEL_PROVIDED_STATIC_MEMORY is set to 1. The application can provide + * it's own implementation of vApplicationGetTimerTaskMemory by setting + * configKERNEL_PROVIDED_STATIC_MEMORY to 0 or leaving it undefined. + */ void vApplicationGetTimerTaskMemory( StaticTask_t ** ppxTimerTaskTCBBuffer, StackType_t ** ppxTimerTaskStackBuffer, uint32_t * pulTimerTaskStackSize ) From fb0e81d27f29886f37e548e1f44d0d74fbe4d5dd Mon Sep 17 00:00:00 2001 From: Gaurav Aggarwal Date: Mon, 18 Sep 2023 22:29:25 +0530 Subject: [PATCH 6/7] Tag idle TCBs and Stacks as privileged data Signed-off-by: Gaurav Aggarwal --- tasks.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tasks.c b/tasks.c index e39c46d6e97..205014b705d 100644 --- a/tasks.c +++ b/tasks.c @@ -7668,8 +7668,8 @@ static void prvAddCurrentTaskToDelayedList( TickType_t xTicksToWait, StackType_t ** ppxIdleTaskStackBuffer, uint32_t * pulIdleTaskStackSize ) { - static StaticTask_t xIdleTaskTCB; - static StackType_t uxIdleTaskStack[ configMINIMAL_STACK_SIZE ]; + PRIVILEGED_DATA static StaticTask_t xIdleTaskTCB; + PRIVILEGED_DATA static StackType_t uxIdleTaskStack[ configMINIMAL_STACK_SIZE ]; *ppxIdleTaskTCBBuffer = &( xIdleTaskTCB ); *ppxIdleTaskStackBuffer = &( uxIdleTaskStack[ 0 ] ); @@ -7692,8 +7692,8 @@ static void prvAddCurrentTaskToDelayedList( TickType_t xTicksToWait, StackType_t ** ppxTimerTaskStackBuffer, uint32_t * pulTimerTaskStackSize ) { - static StaticTask_t xTimerTaskTCB; - static StackType_t uxTimerTaskStack[ configTIMER_TASK_STACK_DEPTH ]; + PRIVILEGED_DATA static StaticTask_t xTimerTaskTCB; + PRIVILEGED_DATA static StackType_t uxTimerTaskStack[ configTIMER_TASK_STACK_DEPTH ]; *ppxTimerTaskTCBBuffer = &( xTimerTaskTCB ); *ppxTimerTaskStackBuffer = &( uxTimerTaskStack[ 0 ] ); From dbee798505ef5464ea21f7222f053fa496401626 Mon Sep 17 00:00:00 2001 From: Gaurav Aggarwal Date: Tue, 19 Sep 2023 17:49:56 +0530 Subject: [PATCH 7/7] Make default implementations for non-MPU ports only Signed-off-by: Gaurav Aggarwal --- tasks.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tasks.c b/tasks.c index 205014b705d..99878a3a3cb 100644 --- a/tasks.c +++ b/tasks.c @@ -7655,7 +7655,7 @@ static void prvAddCurrentTaskToDelayedList( TickType_t xTicksToWait, #endif /* if ( configINCLUDE_FREERTOS_TASK_C_ADDITIONS_H == 1 ) */ /*-----------------------------------------------------------*/ -#if ( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configKERNEL_PROVIDED_STATIC_MEMORY == 1 ) ) +#if ( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configKERNEL_PROVIDED_STATIC_MEMORY == 1 ) && ( portUSING_MPU_WRAPPERS == 0 ) ) /* * This is the kernel provided implementation of vApplicationGetIdleTaskMemory() @@ -7668,18 +7668,18 @@ static void prvAddCurrentTaskToDelayedList( TickType_t xTicksToWait, StackType_t ** ppxIdleTaskStackBuffer, uint32_t * pulIdleTaskStackSize ) { - PRIVILEGED_DATA static StaticTask_t xIdleTaskTCB; - PRIVILEGED_DATA static StackType_t uxIdleTaskStack[ configMINIMAL_STACK_SIZE ]; + static StaticTask_t xIdleTaskTCB; + static StackType_t uxIdleTaskStack[ configMINIMAL_STACK_SIZE ]; *ppxIdleTaskTCBBuffer = &( xIdleTaskTCB ); *ppxIdleTaskStackBuffer = &( uxIdleTaskStack[ 0 ] ); *pulIdleTaskStackSize = configMINIMAL_STACK_SIZE; } -#endif /* #if ( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configKERNEL_PROVIDED_STATIC_MEMORY == 1 ) ) */ +#endif /* #if ( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configKERNEL_PROVIDED_STATIC_MEMORY == 1 ) && ( portUSING_MPU_WRAPPERS == 0 ) ) */ /*-----------------------------------------------------------*/ -#if ( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configKERNEL_PROVIDED_STATIC_MEMORY == 1 ) ) +#if ( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configKERNEL_PROVIDED_STATIC_MEMORY == 1 ) && ( portUSING_MPU_WRAPPERS == 0 ) ) /* * This is the kernel provided implementation of vApplicationGetTimerTaskMemory() @@ -7692,13 +7692,13 @@ static void prvAddCurrentTaskToDelayedList( TickType_t xTicksToWait, StackType_t ** ppxTimerTaskStackBuffer, uint32_t * pulTimerTaskStackSize ) { - PRIVILEGED_DATA static StaticTask_t xTimerTaskTCB; - PRIVILEGED_DATA static StackType_t uxTimerTaskStack[ configTIMER_TASK_STACK_DEPTH ]; + static StaticTask_t xTimerTaskTCB; + static StackType_t uxTimerTaskStack[ configTIMER_TASK_STACK_DEPTH ]; *ppxTimerTaskTCBBuffer = &( xTimerTaskTCB ); *ppxTimerTaskStackBuffer = &( uxTimerTaskStack[ 0 ] ); *pulTimerTaskStackSize = configTIMER_TASK_STACK_DEPTH; } -#endif /* #if ( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configKERNEL_PROVIDED_STATIC_MEMORY == 1 ) ) */ +#endif /* #if ( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configKERNEL_PROVIDED_STATIC_MEMORY == 1 ) && ( portUSING_MPU_WRAPPERS == 0 ) ) */ /*-----------------------------------------------------------*/