mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-02 10: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
|
CFLAGS = -DDIAGNOSTICS
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(DIAG_TASKS),YES)
|
||||||
|
CFLAGS = -DDIAG_TASKS
|
||||||
|
endif
|
||||||
|
|
||||||
CFLAGS += -g$(DEBUGF)
|
CFLAGS += -g$(DEBUGF)
|
||||||
CFLAGS += -O$(OPT)
|
CFLAGS += -O$(OPT)
|
||||||
CFLAGS += -mcpu=$(MCU)
|
CFLAGS += -mcpu=$(MCU)
|
||||||
|
@ -76,7 +76,7 @@ NVIC value of 255. */
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Enable run time stats collection */
|
/* Enable run time stats collection */
|
||||||
#if defined(DIAGNOSTICS)
|
#if defined(DIAG_TASKS)
|
||||||
#define configCHECK_FOR_STACK_OVERFLOW 2
|
#define configCHECK_FOR_STACK_OVERFLOW 2
|
||||||
|
|
||||||
#define configGENERATE_RUN_TIME_STATS 1
|
#define configGENERATE_RUN_TIME_STATS 1
|
||||||
|
@ -47,7 +47,7 @@ int32_t TaskMonitorInitialize(void)
|
|||||||
lock = xSemaphoreCreateRecursiveMutex();
|
lock = xSemaphoreCreateRecursiveMutex();
|
||||||
memset(handles, 0, sizeof(xTaskHandle)*TASKINFO_RUNNING_NUMELEM);
|
memset(handles, 0, sizeof(xTaskHandle)*TASKINFO_RUNNING_NUMELEM);
|
||||||
lastMonitorTime = 0;
|
lastMonitorTime = 0;
|
||||||
#if defined(DIAGNOSTICS)
|
#if defined(DIAG_TASKS)
|
||||||
lastMonitorTime = portGET_RUN_TIME_COUNTER_VALUE();
|
lastMonitorTime = portGET_RUN_TIME_COUNTER_VALUE();
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
@ -76,7 +76,7 @@ int32_t TaskMonitorAdd(TaskInfoRunningElem task, xTaskHandle handle)
|
|||||||
*/
|
*/
|
||||||
void TaskMonitorUpdateAll(void)
|
void TaskMonitorUpdateAll(void)
|
||||||
{
|
{
|
||||||
#if defined(DIAGNOSTICS)
|
#if defined(DIAG_TASKS)
|
||||||
TaskInfoData data;
|
TaskInfoData data;
|
||||||
int n;
|
int n;
|
||||||
|
|
||||||
|
@ -115,8 +115,10 @@ int32_t SystemModInitialize(void)
|
|||||||
SystemStatsInitialize();
|
SystemStatsInitialize();
|
||||||
FlightStatusInitialize();
|
FlightStatusInitialize();
|
||||||
ObjectPersistenceInitialize();
|
ObjectPersistenceInitialize();
|
||||||
#if defined(DIAGNOSTICS)
|
#if defined(DIAG_TASKS)
|
||||||
TaskInfoInitialize();
|
TaskInfoInitialize();
|
||||||
|
#endif
|
||||||
|
#if defined(DIAGNOSTICS)
|
||||||
I2CStatsInitialize();
|
I2CStatsInitialize();
|
||||||
WatchdogStatusInitialize();
|
WatchdogStatusInitialize();
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user