|
|
@ -53,7 +53,7 @@ osThreadId_t defaultTaskHandle; |
|
|
const osThreadAttr_t defaultTask_attributes = { |
|
|
const osThreadAttr_t defaultTask_attributes = { |
|
|
.name = "defaultTask", |
|
|
.name = "defaultTask", |
|
|
.stack_size = 512 * 4, |
|
|
.stack_size = 512 * 4, |
|
|
.priority = (osPriority_t) osPriorityNormal, |
|
|
.priority = (osPriority_t) osPriorityBelowNormal7, |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
/* Private function prototypes -----------------------------------------------*/ |
|
|
/* Private function prototypes -----------------------------------------------*/ |
|
|
@ -68,6 +68,7 @@ void MX_FREERTOS_Init(void); /* (MISRA C 2004 rule 8.1) */ |
|
|
|
|
|
|
|
|
/* Hook prototypes */ |
|
|
/* Hook prototypes */ |
|
|
void vApplicationStackOverflowHook(xTaskHandle xTask, char *pcTaskName); |
|
|
void vApplicationStackOverflowHook(xTaskHandle xTask, char *pcTaskName); |
|
|
|
|
|
void vApplicationMallocFailedHook(void); |
|
|
|
|
|
|
|
|
/* USER CODE BEGIN 4 */ |
|
|
/* USER CODE BEGIN 4 */ |
|
|
void StackOverflowHook(TaskHandle_t xTask, char *pcTaskName); |
|
|
void StackOverflowHook(TaskHandle_t xTask, char *pcTaskName); |
|
|
@ -82,6 +83,24 @@ void Drv_InterfaceInit(void); |
|
|
void MyTask_Init(void); |
|
|
void MyTask_Init(void); |
|
|
/* USER CODE END 4 */ |
|
|
/* USER CODE END 4 */ |
|
|
|
|
|
|
|
|
|
|
|
/* USER CODE BEGIN 5 */ |
|
|
|
|
|
void MallocFailedHook(void); |
|
|
|
|
|
void vApplicationMallocFailedHook(void) |
|
|
|
|
|
{ |
|
|
|
|
|
MallocFailedHook(); |
|
|
|
|
|
/* 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 */ |
|
|
|
|
|
|
|
|
/**
|
|
|
/**
|
|
|
* @brief FreeRTOS initialization |
|
|
* @brief FreeRTOS initialization |
|
|
* @param None |
|
|
* @param None |
|
|
|