|
|
@ -61,6 +61,38 @@ void MX_FREERTOS_Init(void); /* (MISRA C 2004 rule 8.1) */ |
|
|
|
/* GetIdleTaskMemory prototype (linked to static allocation support) */ |
|
|
|
void vApplicationGetIdleTaskMemory( StaticTask_t **ppxIdleTaskTCBBuffer, StackType_t **ppxIdleTaskStackBuffer, uint32_t *pulIdleTaskStackSize ); |
|
|
|
|
|
|
|
/* GetTimerTaskMemory prototype (linked to static allocation support) */ |
|
|
|
void vApplicationGetTimerTaskMemory( StaticTask_t **ppxTimerTaskTCBBuffer, StackType_t **ppxTimerTaskStackBuffer, uint32_t *pulTimerTaskStackSize ); |
|
|
|
|
|
|
|
/* Hook prototypes */ |
|
|
|
void vApplicationStackOverflowHook(xTaskHandle xTask, signed char *pcTaskName); |
|
|
|
void vApplicationMallocFailedHook(void); |
|
|
|
|
|
|
|
/* USER CODE BEGIN 4 */ |
|
|
|
__weak void vApplicationStackOverflowHook(xTaskHandle xTask, signed char *pcTaskName) |
|
|
|
{ |
|
|
|
/* Run time stack overflow checking is performed if |
|
|
|
configCHECK_FOR_STACK_OVERFLOW is defined to 1 or 2. This hook function is |
|
|
|
called if a stack overflow is detected. */ |
|
|
|
} |
|
|
|
/* USER CODE END 4 */ |
|
|
|
|
|
|
|
/* USER CODE BEGIN 5 */ |
|
|
|
__weak void vApplicationMallocFailedHook(void) |
|
|
|
{ |
|
|
|
/* vApplicationMallocFailedHook() will only be called if |
|
|
|
configUSE_MALLOC_FAILED_HOOK is set to 1 in FreeRTOSConfig.h. It is a hook |
|
|
|
function that will get called if a call to pvPortMalloc() fails. |
|
|
|
pvPortMalloc() is called internally by the kernel whenever a task, queue, |
|
|
|
timer or semaphore is created. It is also called by various parts of the |
|
|
|
demo application. If heap_1.c or heap_2.c are used, then the size of the |
|
|
|
heap available to pvPortMalloc() is defined by configTOTAL_HEAP_SIZE in |
|
|
|
FreeRTOSConfig.h, and the xPortGetFreeHeapSize() API function can be used |
|
|
|
to query the size of free heap space that remains (although it does not |
|
|
|
provide information on how the remaining heap might be fragmented). */ |
|
|
|
} |
|
|
|
/* USER CODE END 5 */ |
|
|
|
|
|
|
|
/* USER CODE BEGIN GET_IDLE_TASK_MEMORY */ |
|
|
|
static StaticTask_t xIdleTaskTCBBuffer; |
|
|
|
static StackType_t xIdleStack[configMINIMAL_STACK_SIZE]; |
|
|
@ -74,6 +106,19 @@ void vApplicationGetIdleTaskMemory( StaticTask_t **ppxIdleTaskTCBBuffer, StackTy |
|
|
|
} |
|
|
|
/* USER CODE END GET_IDLE_TASK_MEMORY */ |
|
|
|
|
|
|
|
/* USER CODE BEGIN GET_TIMER_TASK_MEMORY */ |
|
|
|
static StaticTask_t xTimerTaskTCBBuffer; |
|
|
|
static StackType_t xTimerStack[configTIMER_TASK_STACK_DEPTH]; |
|
|
|
|
|
|
|
void vApplicationGetTimerTaskMemory( StaticTask_t **ppxTimerTaskTCBBuffer, StackType_t **ppxTimerTaskStackBuffer, uint32_t *pulTimerTaskStackSize ) |
|
|
|
{ |
|
|
|
*ppxTimerTaskTCBBuffer = &xTimerTaskTCBBuffer; |
|
|
|
*ppxTimerTaskStackBuffer = &xTimerStack[0]; |
|
|
|
*pulTimerTaskStackSize = configTIMER_TASK_STACK_DEPTH; |
|
|
|
/* place for user code */ |
|
|
|
} |
|
|
|
/* USER CODE END GET_TIMER_TASK_MEMORY */ |
|
|
|
|
|
|
|
/** |
|
|
|
* @brief FreeRTOS initialization |
|
|
|
* @param None |
|
|
|