diff --git a/flight/CopterControl/Makefile b/flight/CopterControl/Makefile index 66186ed86..fc24341f8 100644 --- a/flight/CopterControl/Makefile +++ b/flight/CopterControl/Makefile @@ -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) diff --git a/flight/CopterControl/System/inc/FreeRTOSConfig.h b/flight/CopterControl/System/inc/FreeRTOSConfig.h index 994956008..68bb9da0e 100644 --- a/flight/CopterControl/System/inc/FreeRTOSConfig.h +++ b/flight/CopterControl/System/inc/FreeRTOSConfig.h @@ -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 diff --git a/flight/CopterControl/System/taskmonitor.c b/flight/CopterControl/System/taskmonitor.c index 6ff6299d0..627dedaab 100644 --- a/flight/CopterControl/System/taskmonitor.c +++ b/flight/CopterControl/System/taskmonitor.c @@ -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; diff --git a/flight/Modules/System/systemmod.c b/flight/Modules/System/systemmod.c index b3da26870..67701ace1 100644 --- a/flight/Modules/System/systemmod.c +++ b/flight/Modules/System/systemmod.c @@ -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