In embedded software, when the firmware crashes in the system, is there a way you can get access to something like crash dumps in desktop applications?
I want to use that information to know the CPU and registers state just at the moment that firmware has crashed.
Depending on the controller you are using, there are multiple bits which can tell you the reset cause of your controller. In most cases this will not tell you anything about the source of your problem in the application.
All controllers will jump to a Hardfault Handler after for example a null pointer exception. During debugging you might be able to inspect the call stack to find out about the source of the exception.
Every other information you want to have which is available in a desktop application must be programmed by yourself. For example you can try to safe your processor stack to some non-volatile memory before resetting the controller.