chore: freeRTOS task stack diagnostics (#2976)

* migrated stack diagnostics (available, free) to using built in FreeRTOS builtin function

Note: main stack must be and is treated differently as it is not under FreeRTOS control. main stack is painted by the STM32 startup routine. free main stack is calculated checking the remaining painted stack area.

* corrected my merge error

* missed a blank
This commit is contained in:
Michael
2023-01-15 11:48:04 +10:00
committed by GitHub
parent cb9f411036
commit 34ea422e39
7 changed files with 31 additions and 49 deletions
+3 -13
View File
@@ -24,27 +24,17 @@
#include "timers_driver.h"
RTOS_TASK_HANDLE menusTaskId;
RTOS_DEFINE_STACK(menusStack, MENUS_STACK_SIZE);
RTOS_DEFINE_STACK(menusTaskId, menusStack, MENUS_STACK_SIZE);
RTOS_TASK_HANDLE mixerTaskId;
RTOS_DEFINE_STACK(mixerStack, MIXER_STACK_SIZE);
RTOS_DEFINE_STACK(mixerTaskId, mixerStack, MIXER_STACK_SIZE);
RTOS_TASK_HANDLE audioTaskId;
RTOS_DEFINE_STACK(audioStack, AUDIO_STACK_SIZE);
RTOS_DEFINE_STACK(audioTaskId, audioStack, AUDIO_STACK_SIZE);
RTOS_MUTEX_HANDLE audioMutex;
RTOS_MUTEX_HANDLE mixerMutex;
void stackPaint()
{
menusStack.paint();
mixerStack.paint();
audioStack.paint();
#if defined(CLI) && !defined(SIMU)
cliStack.paint();
#endif
}
volatile uint16_t timeForcePowerOffPressed = 0;
bool isForcePowerOffRequested()