ESP backtrace decoding from remote serial data

robpat
Posts: 4
Joined: Mon Mar 23, 2026 1:23 pm

ESP backtrace decoding from remote serial data

Postby robpat » Tue Mar 31, 2026 10:32 am

Hello all,
We have a system with 2x EST8266 modules, the slave modules appears to crash after 7 or so hours of running, the error gives me a backtrace code and the system constantly reboots until it is manually power cycled.
I am logging the serial data onto an sdcard at a remote location, so cannot use the ESP decoder in Visual Studio code.
Is there a way to decode the backtrace code from a txt file?

Here is the serial data info:
Backtrace: 0x40083e61:0x3ffbf54c |<-CORRUPTED

ELF file SHA256: dd99327f2e20cd10

Any help with be greatly appreciated!
RP

lbernstone
Posts: 1132
Joined: Mon Jul 22, 2019 3:20 pm

Re: ESP backtrace decoding from remote serial data

Postby lbernstone » Wed Apr 01, 2026 3:25 am

Here are instructions for an esp32, but the 8266 has a similar xtensa-lx106-elf-addr2line binary. It will be in ~/.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/<version>/bin, or a similar structure in .platformio. You will need the exact elf file that was compiled into the firmware.
https://github.com/esp8266/Arduino/blob ... decoder.py

robpat
Posts: 4
Joined: Mon Mar 23, 2026 1:23 pm

Re: ESP backtrace decoding from remote serial data

Postby robpat » Thu Apr 02, 2026 12:31 pm

Thank you for the help :)

I installed the tasks.json and can run backtrace in VScode.

"
Executing task: xtensa-esp32-elf-addr2line -apsfCire "C:\Users\xxxxx\Documents\xxx\.pio\build\esp32dev\xxx.elf" "0x40083e61:0x3ffbf54c"

xtensa-esp32-elf-addr2line : The term 'xtensa-esp32-elf-addr2line' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a
path was included, verify that the path is correct and try again.
At line:1 char:1
+ xtensa-esp32-elf-addr2line -apsfCire C:\Users\xxxxx\Documents\ ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (xtensa-esp32-elf-addr2line:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
"
It looks like I do not have "xtensa-esp32-elf-addr2line", should this be part of an ESP library I have installed already?

robpat
Posts: 4
Joined: Mon Mar 23, 2026 1:23 pm

Re: ESP backtrace decoding from remote serial data

Postby robpat » Thu Apr 02, 2026 2:34 pm

Aha, I managed to run this in powershell.


0x3ffbf54c: port_IntStack at ??:?

robpat
Posts: 4
Joined: Mon Mar 23, 2026 1:23 pm

Re: ESP backtrace decoding from remote serial data

Postby robpat » Thu Apr 02, 2026 2:35 pm

and

0x40083e61: panic_abort at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp_system/panic.c:408

Now I just need to work out how to understand the output :)

Who is online

Users browsing this forum: Google [Bot], Qwantbot and 2 guests