Skip to content
Snippets Groups Projects
Verified Commit 959d4303 authored by rahix's avatar rahix
Browse files

feat(epicardium): Enable stack-overflow detection


Signed-off-by: default avatarRahix <rahix@rahix.de>
parent 3a7adca8
No related branches found
No related tags found
No related merge requests found
......@@ -56,6 +56,13 @@
/* Allow static allocation of data structures */
#define configSUPPORT_STATIC_ALLOCATION 1
/*
* Enable stack overflow detector.
*
* TODO: Remove for production.
*/
#define configCHECK_FOR_STACK_OVERFLOW 2
/* Alias the default handler names to match CMSIS weak symbols */
#define vPortSVCHandler SVC_Handler
#define xPortPendSVHandler PendSV_Handler
......
......@@ -6,6 +6,7 @@
#include "task.h"
#include "api/dispatcher.h"
#include "modules/log.h"
#include "card10.h"
......@@ -112,3 +113,8 @@ void vApplicationGetTimerTaskMemory(
*/
*pulTimerTaskStackSize = configTIMER_TASK_STACK_DEPTH;
}
void vApplicationStackOverflowHook(TaskHandle_t xTask, signed char *pcTaskName)
{
LOG_CRIT("rtos", "Task \"%s\" overflowed stack!", pcTaskName);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment