Skip to content

Commit

Permalink
Add debugging docs
Browse files Browse the repository at this point in the history
  • Loading branch information
matjack1 committed Oct 10, 2023
1 parent eef5b26 commit 08c1db4
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions DEBUGGING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Debugging

When the ESP crashes and it's connected to the serial port in debug mode, you can get its stacktrace.

But then you need to decode it to see what's going on. To do that you need to:

- install https://github.com/janLo/EspArduinoExceptionDecoder/

- save the stacktrace in a file, e.g. debug.txt

- run `python3 ~/.platformio/packages/toolchain-xtensa/decoder.py -e .pio/build/debug/firmware.elf debug.txt -s`

References:
- https://github.com/esp8266/Arduino/blob/master/doc/faq/a02-my-esp-crashes.rst
- https://arduino-esp8266.readthedocs.io/en/latest/exception_causes.html
- https://arduino-esp8266.readthedocs.io/en/latest/Troubleshooting/stack_dump.html

0 comments on commit 08c1db4

Please sign in to comment.