How to catch code that caused the hard fault

heinbali01 wrote on Wednesday, July 12, 2017:

On this forum, a lot has been written about the pros and cons of the standard [v][s][n]printf() family.
For instance here where I also attached the latest version of printf-stdarg.c,

That implementation is using stack only. And although it is unusual to do, the string-formatting functions can be used from within an ISR.

alsaleem wrote on Wednesday, July 12, 2017:

Thanks. It’s been running for over 12 hours now.
I have included printf-stdarg.c file in my project.
I am trying to remove reference to stdio.h from my project.

Thanks and appreciate your help.