Tasks switching log added (use -DDEBUG_TASKS=YES to enable and CLI command "print tsl" to see it, only works on Horus)

This commit is contained in:
Damjan Adamic
2016-04-03 17:56:32 +02:00
parent 9673df83a7
commit a8aa6148e5
7 changed files with 122 additions and 1 deletions
+19
View File
@@ -236,6 +236,25 @@ extern struct InterruptCounters interruptCounters;
#define DEBUG_INTERRUPT(int)
#endif //#if defined(DEBUG_INTERRUPTS)
#if defined(DEBUG_TASKS)
#define DEBUG_TASKS_LOG_SIZE 512
// each 32bit is used as:
// top 8 bits: task id
// botom 24 bits: system tick counter
extern uint32_t taskSwitchLog[DEBUG_TASKS_LOG_SIZE];
extern uint16_t taskSwitchLogPos;
#if defined(__cplusplus)
extern "C" {
#endif
extern void CoTaskSwitchHook(uint8_t taskID);
#if defined(__cplusplus)
}
#endif
#endif // #if defined(DEBUG_TASKS)
#endif // _DEBUG_H_