Skip to content

use configSTACK_DEPTH_TYPE consequently #338

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions .github/lexicon.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1585,7 +1585,6 @@ pudp
puladdend
pulcallerstackaddress
puldestination
pulidletaskstacksize
pullowercsa
pullup
pullupenable
Expand All @@ -1596,14 +1595,15 @@ pulpreviousnotificationvalue
pulpreviousnotifyvalue
pultcb
pultimehigh
pultimertaskstacksize
pultotalruntime
puluppercsa
puon
pusart
pusha
putchar
puxidletaskstacksize
puxstackbuffer
puxtimertaskstacksize
puxvariabletoincrement
pv
pvbuffer
Expand Down Expand Up @@ -2333,7 +2333,6 @@ ulrlar
ulruntimecounter
ulsecurestacksize
ulsetinterruptmask
ulstackdepth
ulstatsaspercentage
ulstoppedtimercompensation
ultablebase
Expand Down Expand Up @@ -2394,8 +2393,6 @@ usportcheckfreestackspace
usprg
usrio
ussegmentselector
usstackdepth
usstackhighwatermark
ut
utf
utilised
Expand Down Expand Up @@ -2451,6 +2448,8 @@ uxschedulersuspended
uxsemaphoregetcount
uxsemaphoregetcountfromisr
uxstate
uxstackdepth
uxstackhighwatermark
uxstreambuffernumber
uxtaskgetnumberoftasks
uxtaskgetstackhighwatermark
Expand Down
5,805 changes: 2,905 additions & 2,900 deletions History.txt

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions include/mpu_prototypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@
/* MPU versions of tasks.h API functions. */
BaseType_t MPU_xTaskCreate( TaskFunction_t pxTaskCode,
const char * const pcName,
const uint16_t usStackDepth,
const configSTACK_DEPTH_TYPE uxStackDepth,
void * const pvParameters,
UBaseType_t uxPriority,
TaskHandle_t * const pxCreatedTask ) FREERTOS_SYSTEM_CALL;
TaskHandle_t MPU_xTaskCreateStatic( TaskFunction_t pxTaskCode,
const char * const pcName,
const uint32_t ulStackDepth,
const configSTACK_DEPTH_TYPE uxStackDepth,
void * const pvParameters,
UBaseType_t uxPriority,
StackType_t * const puxStackBuffer,
Expand Down
2 changes: 1 addition & 1 deletion include/portable.h
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ void vPortEndScheduler( void ) PRIVILEGED_FUNCTION;
void vPortStoreTaskMPUSettings( xMPU_SETTINGS * xMPUSettings,
const struct xMEMORY_REGION * const xRegions,
StackType_t * pxBottomOfStack,
uint32_t ulStackDepth ) PRIVILEGED_FUNCTION;
configSTACK_DEPTH_TYPE uxStackDepth ) PRIVILEGED_FUNCTION;
#endif

/* *INDENT-OFF* */
Expand Down
36 changes: 18 additions & 18 deletions include/task.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ typedef struct xTASK_PARAMETERS
{
TaskFunction_t pvTaskCode;
const char * pcName; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */
configSTACK_DEPTH_TYPE usStackDepth;
configSTACK_DEPTH_TYPE uxStackDepth;
void * pvParameters;
UBaseType_t uxPriority;
StackType_t * puxStackBuffer;
Expand All @@ -161,7 +161,7 @@ typedef struct xTASK_STATUS
UBaseType_t uxBasePriority; /* The priority to which the task will return if the task's current priority has been inherited to avoid unbounded priority inversion when obtaining a mutex. Only valid if configUSE_MUTEXES is defined as 1 in FreeRTOSConfig.h. */
configRUN_TIME_COUNTER_TYPE ulRunTimeCounter; /* The total run time allocated to the task so far, as defined by the run time stats clock. See https://www.FreeRTOS.org/rtos-run-time-stats.html. Only valid when configGENERATE_RUN_TIME_STATS is defined as 1 in FreeRTOSConfig.h. */
StackType_t * pxStackBase; /* Points to the lowest address of the task's stack area. */
configSTACK_DEPTH_TYPE usStackHighWaterMark; /* The minimum amount of stack space that has remained for the task since the task was created. The closer this value is to zero the closer the task has come to overflowing its stack. */
configSTACK_DEPTH_TYPE uxStackHighWaterMark; /* The minimum amount of stack space that has remained for the task since the task was created. The closer this value is to zero the closer the task has come to overflowing its stack. */
} TaskStatus_t;

/* Possible return values for eTaskConfirmSleepModeStatus(). */
Expand Down Expand Up @@ -256,8 +256,8 @@ typedef enum
* @code{c}
* BaseType_t xTaskCreate(
* TaskFunction_t pxTaskCode,
* const char *pcName,
* configSTACK_DEPTH_TYPE usStackDepth,
* const char * const pcName,
* const configSTACK_DEPTH_TYPE uxStackDepth,
* void *pvParameters,
* UBaseType_t uxPriority,
* TaskHandle_t *pxCreatedTask
Expand Down Expand Up @@ -291,9 +291,9 @@ typedef enum
* facilitate debugging. Max length defined by configMAX_TASK_NAME_LEN - default
* is 16.
*
* @param usStackDepth The size of the task stack specified as the number of
* @param uxStackDepth The size of the task stack specified as the number of
* variables the stack can hold - not the number of bytes. For example, if
* the stack is 16 bits wide and usStackDepth is defined as 100, 200 bytes
* the stack is 16 bits wide and uxStackDepth is defined as 100, 200 bytes
* will be allocated for stack storage.
*
* @param pvParameters Pointer that will be used as the parameter for the task
Expand Down Expand Up @@ -348,7 +348,7 @@ typedef enum
#if ( configSUPPORT_DYNAMIC_ALLOCATION == 1 )
BaseType_t xTaskCreate( TaskFunction_t pxTaskCode,
const char * const pcName, /*lint !e971 Unqualified char types are allowed for strings and single characters only. */
const configSTACK_DEPTH_TYPE usStackDepth,
const configSTACK_DEPTH_TYPE uxStackDepth,
void * const pvParameters,
UBaseType_t uxPriority,
TaskHandle_t * const pxCreatedTask ) PRIVILEGED_FUNCTION;
Expand All @@ -358,8 +358,8 @@ typedef enum
* task. h
* @code{c}
* TaskHandle_t xTaskCreateStatic( TaskFunction_t pxTaskCode,
* const char *pcName,
* uint32_t ulStackDepth,
* const char * const pcName,
* const configSTACK_DEPTH_TYPE uxStackDepth,
* void *pvParameters,
* UBaseType_t uxPriority,
* StackType_t *puxStackBuffer,
Expand All @@ -385,9 +385,9 @@ typedef enum
* facilitate debugging. The maximum length of the string is defined by
* configMAX_TASK_NAME_LEN in FreeRTOSConfig.h.
*
* @param ulStackDepth The size of the task stack specified as the number of
* @param uxStackDepth The size of the task stack specified as the number of
* variables the stack can hold - not the number of bytes. For example, if
* the stack is 32-bits wide and ulStackDepth is defined as 100 then 400 bytes
* the stack is 32-bits wide and uxStackDepth is defined as 100 then 400 bytes
* will be allocated for stack storage.
*
* @param pvParameters Pointer that will be used as the parameter for the task
Expand All @@ -396,7 +396,7 @@ typedef enum
* @param uxPriority The priority at which the task will run.
*
* @param puxStackBuffer Must point to a StackType_t array that has at least
* ulStackDepth indexes - the array will then be used as the task's stack,
* uxStackDepth indexes - the array will then be used as the task's stack,
* removing the need for the stack to be allocated dynamically.
*
* @param pxTaskBuffer Must point to a variable of type StaticTask_t, which will
Expand Down Expand Up @@ -465,7 +465,7 @@ typedef enum
#if ( configSUPPORT_STATIC_ALLOCATION == 1 )
TaskHandle_t xTaskCreateStatic( TaskFunction_t pxTaskCode,
const char * const pcName, /*lint !e971 Unqualified char types are allowed for strings and single characters only. */
const uint32_t ulStackDepth,
const configSTACK_DEPTH_TYPE uxStackDepth,
void * const pvParameters,
UBaseType_t uxPriority,
StackType_t * const puxStackBuffer,
Expand Down Expand Up @@ -508,7 +508,7 @@ typedef enum
* {
* vATask, // pvTaskCode - the function that implements the task.
* "ATask", // pcName - just a text name for the task to assist debugging.
* 100, // usStackDepth - the stack size DEFINED IN WORDS.
* 100, // uxStackDepth - the stack size DEFINED IN WORDS.
* NULL, // pvParameters - passed into the task function as the function parameters.
* ( 1UL | portPRIVILEGE_BIT ),// uxPriority - task priority, set the portPRIVILEGE_BIT if the task should run in a privileged state.
* cStackBuffer,// puxStackBuffer - the buffer to be used as the task stack.
Expand Down Expand Up @@ -596,7 +596,7 @@ typedef enum
* {
* vATask, // pvTaskCode - the function that implements the task.
* "ATask", // pcName - just a text name for the task to assist debugging.
* 100, // usStackDepth - the stack size DEFINED IN WORDS.
* 100, // uxStackDepth - the stack size DEFINED IN WORDS.
* NULL, // pvParameters - passed into the task function as the function parameters.
* ( 1UL | portPRIVILEGE_BIT ),// uxPriority - task priority, set the portPRIVILEGE_BIT if the task should run in a privileged state.
* cStackBuffer,// puxStackBuffer - the buffer to be used as the task stack.
Expand Down Expand Up @@ -1662,19 +1662,19 @@ configSTACK_DEPTH_TYPE uxTaskGetStackHighWaterMark2( TaskHandle_t xTask ) PRIVIL
/**
* task.h
* @code{c}
* void vApplicationGetIdleTaskMemory( StaticTask_t ** ppxIdleTaskTCBBuffer, StackType_t ** ppxIdleTaskStackBuffer, uint32_t *pulIdleTaskStackSize )
* void vApplicationGetIdleTaskMemory( StaticTask_t ** ppxIdleTaskTCBBuffer, StackType_t ** ppxIdleTaskStackBuffer, configSTACK_DEPTH_TYPE * puxIdleTaskStackSize )
* @endcode
*
* This function is used to provide a statically allocated block of memory to FreeRTOS to hold the Idle Task TCB. This function is required when
* configSUPPORT_STATIC_ALLOCATION is set. For more information see this URI: https://www.FreeRTOS.org/a00110.html#configSUPPORT_STATIC_ALLOCATION
*
* @param ppxIdleTaskTCBBuffer A handle to a statically allocated TCB buffer
* @param ppxIdleTaskStackBuffer A handle to a statically allocated Stack buffer for the idle task
* @param pulIdleTaskStackSize A pointer to the number of elements that will fit in the allocated stack buffer
* @param puxIdleTaskStackSize A pointer to the number of elements that will fit in the allocated stack buffer
*/
void vApplicationGetIdleTaskMemory( StaticTask_t ** ppxIdleTaskTCBBuffer,
StackType_t ** ppxIdleTaskStackBuffer,
uint32_t * pulIdleTaskStackSize ); /*lint !e526 Symbol not defined as it is an application callback. */
configSTACK_DEPTH_TYPE * puxIdleTaskStackSize ); /*lint !e526 Symbol not defined as it is an application callback. */
#endif

/**
Expand Down
6 changes: 3 additions & 3 deletions include/timers.h
Original file line number Diff line number Diff line change
Expand Up @@ -1331,19 +1331,19 @@ BaseType_t xTimerGenericCommand( TimerHandle_t xTimer,
/**
* task.h
* @code{c}
* void vApplicationGetTimerTaskMemory( StaticTask_t ** ppxTimerTaskTCBBuffer, StackType_t ** ppxTimerTaskStackBuffer, uint32_t *pulTimerTaskStackSize )
* void vApplicationGetTimerTaskMemory( StaticTask_t ** ppxTimerTaskTCBBuffer, StackType_t ** ppxTimerTaskStackBuffer, configSTACK_DEPTH_TYPE * puxTimerTaskStackSize )
* @endcode
*
* This function is used to provide a statically allocated block of memory to FreeRTOS to hold the Timer Task TCB. This function is required when
* configSUPPORT_STATIC_ALLOCATION is set. For more information see this URI: https://www.FreeRTOS.org/a00110.html#configSUPPORT_STATIC_ALLOCATION
*
* @param ppxTimerTaskTCBBuffer A handle to a statically allocated TCB buffer
* @param ppxTimerTaskStackBuffer A handle to a statically allocated Stack buffer for thie idle task
* @param pulTimerTaskStackSize A pointer to the number of elements that will fit in the allocated stack buffer
* @param puxTimerTaskStackSize A pointer to the number of elements that will fit in the allocated stack buffer
*/
void vApplicationGetTimerTaskMemory( StaticTask_t ** ppxTimerTaskTCBBuffer,
StackType_t ** ppxTimerTaskStackBuffer,
uint32_t * pulTimerTaskStackSize );
configSTACK_DEPTH_TYPE * puxTimerTaskStackSize );

#endif

Expand Down
8 changes: 4 additions & 4 deletions portable/Common/mpu_wrappers.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,15 @@ void vPortResetPrivilege( BaseType_t xRunningPrivileged )
#if ( configSUPPORT_DYNAMIC_ALLOCATION == 1 )
BaseType_t MPU_xTaskCreate( TaskFunction_t pvTaskCode,
const char * const pcName,
uint16_t usStackDepth,
configSTACK_DEPTH_TYPE uxStackDepth,
void * pvParameters,
UBaseType_t uxPriority,
TaskHandle_t * pxCreatedTask ) /* FREERTOS_SYSTEM_CALL */
{
BaseType_t xReturn;
BaseType_t xRunningPrivileged = xPortRaisePrivilege();

xReturn = xTaskCreate( pvTaskCode, pcName, usStackDepth, pvParameters, uxPriority, pxCreatedTask );
xReturn = xTaskCreate( pvTaskCode, pcName, uxStackDepth, pvParameters, uxPriority, pxCreatedTask );
vPortResetPrivilege( xRunningPrivileged );
return xReturn;
}
Expand All @@ -108,7 +108,7 @@ void vPortResetPrivilege( BaseType_t xRunningPrivileged )
#if ( configSUPPORT_STATIC_ALLOCATION == 1 )
TaskHandle_t MPU_xTaskCreateStatic( TaskFunction_t pxTaskCode,
const char * const pcName,
const uint32_t ulStackDepth,
const configSTACK_DEPTH_TYPE uxStackDepth,
void * const pvParameters,
UBaseType_t uxPriority,
StackType_t * const puxStackBuffer,
Expand All @@ -117,7 +117,7 @@ void vPortResetPrivilege( BaseType_t xRunningPrivileged )
TaskHandle_t xReturn;
BaseType_t xRunningPrivileged = xPortRaisePrivilege();

xReturn = xTaskCreateStatic( pxTaskCode, pcName, ulStackDepth, pvParameters, uxPriority, puxStackBuffer, pxTaskBuffer );
xReturn = xTaskCreateStatic( pxTaskCode, pcName, uxStackDepth, pvParameters, uxPriority, puxStackBuffer, pxTaskBuffer );
vPortResetPrivilege( xRunningPrivileged );
return xReturn;
}
Expand Down
Loading