首页 > 解决方案 > debug Crash dump in firmware

问题描述

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.

标签: debuggingembeddedfirmware

解决方案


根据您使用的控制器,有多个位可以告诉您控制器的重置原因。在大多数情况下,这不会告诉您有关应用程序中问题根源的任何信息。

例如,在发生空指针异常之后,所有控制器都会跳转到 Hardfault Handler。在调试期间,您可能能够检查调用堆栈以找出异常的来源。

您想要在桌面应用程序中获得的所有其他信息都必须由您自己编程。例如,您可以在重置控制器之前尝试将您的处理器堆栈保护到一些非易失性内存中。


推荐阅读