blob: d801f9d97e5c87e0d12f3b4361cbb47840a86db9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
/*
* FreeRTOSHooks.c
*
* Created on: 29 May 2020
* Author: Ralim
*/
#include "FreeRTOSHooks.h"
#include "BSP.h"
void vApplicationIdleHook(void) {
resetWatchdog();
}
/* USER CODE BEGIN GET_IDLE_TASK_MEMORY */
static StaticTask_t xIdleTaskTCBBuffer;
static StackType_t xIdleStack[configMINIMAL_STACK_SIZE];
void vApplicationGetIdleTaskMemory(StaticTask_t **ppxIdleTaskTCBBuffer,
StackType_t **ppxIdleTaskStackBuffer, uint32_t *pulIdleTaskStackSize) {
*ppxIdleTaskTCBBuffer = &xIdleTaskTCBBuffer;
*ppxIdleTaskStackBuffer = &xIdleStack[0];
*pulIdleTaskStackSize = configMINIMAL_STACK_SIZE;
/* place for user code */
}
void vApplicationStackOverflowHook(TaskHandle_t *pxTask,
signed portCHAR *pcTaskName) {
(void) pxTask;
(void) pcTaskName;
// We dont have a good way to handle a stack overflow at this point in time
reboot();
}
|