Skip to content

Disconnected postmortem capability #1011

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
cpacey opened this issue Nov 12, 2015 · 2 comments
Closed

Disconnected postmortem capability #1011

cpacey opened this issue Nov 12, 2015 · 2 comments

Comments

@cpacey
Copy link

cpacey commented Nov 12, 2015

The built-in postmortem logging has been very useful. However, the data is always output to UART0, which functionally means that I need to be physically connected to the ESP to get that data. More and more, I'm wanting to get this information from a device in the field which has nothing attached to UART0.

I'm not entirely sure the best way to do this yet - among the options I've considered:

  1. Copy the crash information (rst_info, sp, the stack contents, etc) to flash before restarting, and then process as desired at next start up. My biggest worry about this is that we might do too many flash writes to a single sector, especially if the device gets into a tight crash loop.
  2. Send the info somewhere else, e.g. a quick UDP transmit. I've not tried this yet, so I don't know if it's feasible.

Regardless of the specific implementation, I could do it myself if I could register my own callback for when a crash occurs.

@Links2004
Copy link
Collaborator

the reset reason is allready stored you can use

Serial.println(ESP.getResetInfo());

https://github.com/esp8266/Arduino/blob/master/cores/esp8266/Esp.cpp#L291

to get basic info, no full stack dump but epc1, epc2, epc3, excvaddr and depc
which deliver a good start for a debugging.

@cpacey
Copy link
Author

cpacey commented Nov 12, 2015

We're already using ESP.getResetInfo(), but aside from the missing stack trace (which has been very useful for me), ESP.getResetInfo() doesn't give us anything for Exceptions or Soft WDT resets, at least for the Huzzah boards we're using. Essentially, I can only use ESP.getResetInfo() right now to find out if there was a hard wdt reset.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants