Demystify Register Dump

Could someone please demystify the ESP32 register dump for me?

PC      : 0x40083e5d  PS      : 0x00060b36  A0      : 0x00060b30  A1      : 0x3ffb0070  
A2      : 0x00000000  A3      : 0x00060b23  A4      : 0x00060b20  A5      : 0x3ffb89d0  
A6      : 0x00000000  A7      : 0x3ffb01fc  A8      : 0x00000000  A9      : 0x3ffb0280    
A10     : 0x00000001  A11     : 0x3ffb029f  A12     : 0x00000001  A13     : 0x00000001  
A14     : 0x00060920  A15     : 0x00000000  SAR     : 0x0000000c  EXCCAUSE: 0x00000001  

EXCVADDR: 0x00000000 LBEG : 0x4000c2e0 LEND : 0x4000c2f6 LCOUNT : 0xffffffff

I understand the registers, etc. but I am also curious what SAR, LBEG, LEND and LCOUNT mean.

In addition, is there any chance to get PlatformIO Monitor to print symbolic info, the way IDF Monitor does, essentially pointing out where the crash occurred?

0x40082d1c: _calloc_r at /Users/user/esp/esp-idf/components/newlib/syscalls.c:51

You’ll need to install the arduino IDE to run it, but it works.

1 Like

Thanks. I’m using VSCode, so it’s not really something I can use and for the most part, I am really just interested in an explanation what the abbreviations SAR, LBEG, LEND and LCOUNT stand for.

This version might be useful… GitHub - luffykesh/EspExceptionDecoder-CLI: Exception Stack Trace Decoder for ESP8266 and ESP32 (CLI)

I can’t say for sure I’ved used it myself… I was trying to get exception decoding working a couple months ago, and I did find some way to do it… anyway, worth a try… that and I just found this handy library for saving exceptions as a sort of crash dump log… hopefully it’s not ESP8266 only! :smiley:

1 Like

To explain further, as it was not obvious to me:

You can use this indirectly to decode a stack trace from PlatformIO, but you do need Arduino installed. However you don’t need to open your PlatformIO project in Arduino, so it is not too hard.
Try this:

  1. Install in the Arduino tools as described in the the me-no-dev git readme.
  2. In PlatformIO build and run your project and get the stack trace ready in the terminal window. This generates the .elf file.
  3. Open in Arduino menu, Tools, ESP Exception Decoder.
  4. You are prompted for a .esp file. Open from /.pio/build/lolin-d32/firmware.elf (or similar)
  5. You are prompted for the trace - paste in from the terminal
  6. Read the decoded stack results.