mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-11-30 08:24:11 +01:00
diag-tasks: make taskinfo diagnostics a separate enable
This allows task stack analysis without turning on all of the other diagnostics.
This commit is contained in:
parent
ad793f0b81
commit
7c03875013
@ -435,6 +435,10 @@ ifeq ($(DIAGNOSTICS),YES)
|
||||
CFLAGS = -DDIAGNOSTICS
|
||||
endif
|
||||
|
||||
ifeq ($(DIAG_TASKS),YES)
|
||||
CFLAGS = -DDIAG_TASKS
|
||||
endif
|
||||
|
||||
CFLAGS += -g$(DEBUGF)
|
||||
CFLAGS += -O$(OPT)
|
||||
CFLAGS += -mcpu=$(MCU)
|
||||
|
@ -76,7 +76,7 @@ NVIC value of 255. */
|
||||
#endif
|
||||
|
||||
/* Enable run time stats collection */
|
||||
#if defined(DIAGNOSTICS)
|
||||
#if defined(DIAG_TASKS)
|
||||
#define configCHECK_FOR_STACK_OVERFLOW 2
|
||||
|
||||
#define configGENERATE_RUN_TIME_STATS 1
|
||||
|
@ -47,7 +47,7 @@ int32_t TaskMonitorInitialize(void)
|
||||
lock = xSemaphoreCreateRecursiveMutex();
|
||||
memset(handles, 0, sizeof(xTaskHandle)*TASKINFO_RUNNING_NUMELEM);
|
||||
lastMonitorTime = 0;
|
||||
#if defined(DIAGNOSTICS)
|
||||
#if defined(DIAG_TASKS)
|
||||
lastMonitorTime = portGET_RUN_TIME_COUNTER_VALUE();
|
||||
#endif
|
||||
return 0;
|
||||
@ -76,7 +76,7 @@ int32_t TaskMonitorAdd(TaskInfoRunningElem task, xTaskHandle handle)
|
||||
*/
|
||||
void TaskMonitorUpdateAll(void)
|
||||
{
|
||||
#if defined(DIAGNOSTICS)
|
||||
#if defined(DIAG_TASKS)
|
||||
TaskInfoData data;
|
||||
int n;
|
||||
|
||||
|
@ -115,8 +115,10 @@ int32_t SystemModInitialize(void)
|
||||
SystemStatsInitialize();
|
||||
FlightStatusInitialize();
|
||||
ObjectPersistenceInitialize();
|
||||
#if defined(DIAGNOSTICS)
|
||||
#if defined(DIAG_TASKS)
|
||||
TaskInfoInitialize();
|
||||
#endif
|
||||
#if defined(DIAGNOSTICS)
|
||||
I2CStatsInitialize();
|
||||
WatchdogStatusInitialize();
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user