Dear Keil MDK-ARM uVision support,
I'm using Keil MDK-ARM uVision 5.14 for ARM Cortex-M3 core, STM32F103 device.
From time to time we get a HardFault exception. We know that if the debugger is connected, it is somehow posible to deduce the offending instruction/routine by opening the Call Stack window and following the hints. That´s fine.
But what about if you get a HardFault and the debugger is not connected? When we get the HardFault, we want somehow to read the same information you are reading for showing the Call Stack window. Our intention is to read the same information you do and send it to a UART port to be able to read it with a Hyperterminal or similar.
We know that reading the stack content is the first step. We are doing it already, but it is not enought for us since in our case the application code is quite complex, and unrolling the stack contents might be complex.
Thanks a lot for your help.
I don't know of any way.
And I'm not too sure Keil wants any such way.
It would be so easy to write a post-processor to get code-size-limited versions of the tools to produce arbitrary-sized binaries with such output.
Are you really having so big stability issues that you need this kind of information to try to solve the problems?
Have you spent some time just checking the "standard" information available to the hardware fault handler to see if you can figure out where the exception happened and why?