I am getting panic hard fault after some time in my code. On the particle console, I can see that the device reports panic hard fault when it comes online. How do I write a callback function which will be called upon panic hard fault?
I see that the system firmware is doing this already like setting a variable in memory and reading it upon boot which publishes the panic hard fault message. I would like to write a call back which publishes a stack trace(or something similar) which tells why the hard fault happened. Any ideas on doing this?