Hi
,
I’m using ArduPilot 4.1-dev. After a watchdog reset, I would like to know which function or line of code actually triggered the problem.
For example, during my test on experimental hardware (where I intentionally trigger the watchdog with an infinite loop), I get a message like this:
WDG: T27 SL0 FL217 FT3 FA3001E7B0 FTP183 FLR1E000007
What we have tried so far:
- Reading PC and LR register values and checking them against the
.mapfile, but we couldn’t reliably resolve them to the exact function/line. - Attempted to use
task.functionto get the function address, but in this version it’s a functor and doesn’t give a reliable raw function address. - At the moment we can only log
task.name.
My question is:
- What is the recommended or correct way in ArduPilot to determine which function/line caused the watchdog reset?
- Is there an alternative mechanism besides PC/LR, or does this require using debug symbols or another approach?
Thanks!