Register Dump And Backtrace - Espressif ESP32-S2 Programming Manual

Table of Contents

Advertisement

Chapter 4. API Guides

4.12.3 Register Dump and Backtrace

Unless the CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT option is enabled, the panic handler prints some
of the CPU registers, and the backtrace, to the console
Core
0
register dump:
PC
:
0x400e14ed
0x3ffb5030
A2
:
0x00000000
0x3ffb50dc
A6
:
0x00000000
0x3ffb5000
A10
:
0x00000000
0x06ff1ff8
A14
:
0x3ffb7078
0x0000001d
EXCVADDR:
0x00000000
0xffffffff
Backtrace:
0x400e14ed:0x3ffb5030 0x400d0802:0x3ffb5050
The register values printed are the register values in the exception frame, i.e., values at the moment when the CPU
exception or another fatal error has occurred.
A Register dump is not printed if the panic handler has been executed as a result of an abort() call.
In some cases, such as interrupt watchdog timeout, the panic handler may print additional CPU registers (EPC1-
EPC4) and the registers/backtrace of the code running on the other CPU.
The backtrace line contains PC:SP pairs, where PC is the Program Counter and SP is Stack Pointer, for each stack
frame of the current task. If a fatal error happens inside an ISR, the backtrace may include PC:SP pairs both from
the task which was interrupted, and from the ISR.
If
IDF Monitor
is used, Program Counter values will be converted to code locations (function name, file name, and
line number), and the output will be annotated with additional lines:
Core
0
register dump:
PC
:
0x400e14ed
0x3ffb5030
0x400e14ed: app_main at
A2
:
0x00000000
0x3ffb50dc
A6
:
0x00000000
0x3ffb5000
A10
:
0x00000000
0x06ff1ff8
0x40082d1c: _calloc_r at
A14
:
0x3ffb7078
0x0000001d
EXCVADDR:
0x00000000
0xffffffff
Backtrace:
0x400e14ed:0x3ffb5030 0x400d0802:0x3ffb5050
0x400e14ed: app_main at
0x400d0802: main_task at
To find the location where a fatal error has happened, look at the lines which follow the "Backtrace"line. Fatal
error location is the top line, and subsequent lines show the call stack.
Espressif Systems
PS
:
0x00060030
A3
:
0x00000001
A7
:
0x00000001
A11
:
0x3ffb2bac
A15
:
0x00000000
LBEG
:
0x4000c46c
PS
:
0x00060030
/Users/user/esp/example/main/main.cpp:36
A3
:
0x00000001
A7
:
0x00000001
A11
:
0x3ffb2bac
/Users/user/esp/esp-idf/components/newlib/syscalls.c:51
A15
:
0x00000000
LBEG
:
0x4000c46c
/Users/user/esp/example/main/main.cpp:36
/Users/user/esp/esp-idf/components/esp32s2/cpu_start.c:470
1337
Submit Document Feedback
A0
:
0x800d0805
A4
:
0x00000001
A8
:
0x00000000
A12
:
0x40082d1c
SAR
:
0x00000014
LEND
:
0x4000c477
A0
:
0x800d0805
A4
:
0x00000001
A8
:
0x00000000
A12
:
0x40082d1c
SAR
:
0x00000014
LEND
:
0x4000c477
A1
:␣
A5
:␣
A9
:␣
A13
:␣
EXCCAUSE:␣
LCOUNT
:␣
A1
:␣
A5
:␣
A9
:␣
A13
:␣
EXCCAUSE:␣
LCOUNT
:␣
Release v4.4

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ESP32-S2 and is the answer not in the manual?

Table of Contents

Save PDF