tonilopezmr / tonilopezmr.github.io

My web portfolio.
https://tonilopezmr-github-io.vercel.app
Other
4 stars 1 forks source link

Get stacktrace from firmware crash #50

Open tonilopezmr opened 5 years ago

tonilopezmr commented 5 years ago

Using EspStackTraceDecoder library you can decode the stack trace with the firmware .elf file, xtensa-lx106-elf-addr2line file, and a txt file with the stack trace we want to decode.

The xtensa-lx106-elf-addr2line file is located into the arduino15 folder on your computer, in a path similar to this one: .arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-addr2line

Usage

java -jar EspStackTraceDecoder.jar xtensa-lx106-elf-addr2line firmware.elf dump.txt

Exception example:

>>>stack>>>
3fff2140:  00000004 3fff5eb4 00000000 40218fb9  
3fff2150:  00000000 3ffea6c0 00000000 3ffea6c0  
3fff2160:  3fff232c 000005a8 000005a8 3fff1204  
3fff2170:  00000004 3fff09d4 00000001 40212438  
3fff2180:  4023796e 00000009 3fff0efc 3fffdad0  
3fff2190:  3fffdad0 3fff0db4 3fff06f8 40216b18  
3fff21a0:  4023796e 0000000b 3fff0db4 3fffdad0  
3fff21b0:  402387cb 3ffef2d8 001c7305 40228370  
3fff21c0:  3fff6194 4021a1f4 3fff0db4 3fffdad0  
3fff21d0:  402387cb 3fff0c8c 00000000 40228370  
3fff21e0:  3fff6194 4021a1f4 00000006 40206f74  
3fff21f0:  3fffdad0 3fff0ce4 00000002 3fff1204  
3fff2200:  3fffdad0 3fff0db4 0000000f 40204e37  
3fff2210:  3fffdad0 00000000 3fff11fd 4022e028  
3fff2220:  feefeffe feefeffe 3fff1210 401006fc  
<<<stack<<<

Exception decoded:

Exception Cause: Not found

0x40218fb9: ADE7953Sensor::pre() at /espurna/code/espurna/config/../sensors/ADE7953Sensor.h:91
0x40212438: _sensorPre() at /espurna/code/espurna/sensor.ino:402
0x4023796e: wifi_get_opmode at ??:?
0x40216b18: sensorLoop() at /espurna/code/espurna/sensor.ino:1502
0x4023796e: wifi_get_opmode at ??:?
0x402387cb: wifi_station_get_connect_status at ??:?
0x40228370: JustWifi::connected() at /espurna/code/.pio/libdeps/allterco-shelly25/JustWifi/src/JustWifi.cpp:796
0x4021a1f4: ESP8266WiFiSTAClass::status() at /Users/toni/.platformio/packages/framework-arduinoespressif8266@1.20300.1/libraries/ESP8266WiFi/src/ESP8266WiFiSTA.cpp:453
0x402387cb: wifi_station_get_connect_status at ??:?
0x40228370: JustWifi::connected() at /espurna/code/.pio/libdeps/allterco-shelly25/JustWifi/src/JustWifi.cpp:796
0x4021a1f4: ESP8266WiFiSTAClass::status() at /.platformio/packages/framework-arduinoespressif8266@1.20300.1/libraries/ESP8266WiFi/src/ESP8266WiFiSTA.cpp:453
0x40206f74: wifiConnected() at /espurna/code/espurna/wifi.ino:569
0x40204e37: loop at /espurna/espurna.ino:254 (discriminator 2)
0x4022e028: loop_wrapper() at /Users/toni/.platformio/packages/framework-arduinoespressif8266@1.20300.1/cores/esp8266/core_esp8266_main.cpp:123
0x401006fc: cont_norm at cont.S.o:?