1
0
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:
Stacey Sheldon 2011-12-30 12:49:27 -05:00
parent ad793f0b81
commit 7c03875013
4 changed files with 10 additions and 4 deletions

View File

@ -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)

View File

@ -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

View File

@ -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;

View File

@ -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