- Download
xtensa-lx106-elf-backtrace
and place it anywhere that is in the$PATH
variable. cd
toyour project/build
- Run
xtensa-lx106-elf-backtrace "xxxxxxx"
, xxxxxxx is the list of addresses shown in a core dump.
Core dump:
Guru Meditation Error: Core 0 panic'ed (LoadStoreAlignment). Exception was unhandled.
Core 0 register dump:
PC : 0x40100d96 PS : 0x00000033 A0 : 0x40100d32 A1 : 0x3fff4d60
A2 : 0x401099bc A3 : 0x401099bc A4 : 0x6874656d A5 : 0x401099ec
A6 : 0x6874656d A7 : 0x00000039 A8 : 0x5c007d0a A9 : 0x00000090
A10 : 0x4028730a A11 : 0x7463656e A12 : 0x00000000 A13 : 0x00000002
A14 : 0x401099c4 A15 : 0x00000027 SAR : 0x0000001f EXCCAUSE: 0x00000009
Backtrace: 0x40100d96:0x3fff4d60 0x40221d34:0x3fff4d80 0x4022aba9:0x3fff4db0 0x40241439:0x3fff4dc0 0x40241d4b:0x3fff4e10 0x40223819:0x3fff4e20 0x4023be24:0x3fff4e50 0x4023c4ff:0x3fff4e70 0x4023c5af:0x3fff4ef0 0x4023ca17:0x3fff4f10 0x4023b2d2:0x3fff4f20 0x4023b348:0x3fff4f40
Use xtensa-lx106-elf-backtrace
:
$ xtensa-lx106-elf-backtrace "0x40100d96:0x3fff4d60 0x40221d34:0x3fff4d80 0x4022aba9:0x3fff4db0 0x40241439:0x3fff4dc0 0x40241d4b:0x3fff4e10 0x40223819:0x3fff4e20 0x4023be24:0x3fff4e50 0x4023c4ff:0x3fff4e70 0x4023c5af:0x3fff4ef0 0x4023ca17:0x3fff4f10 0x4023b2d2:0x3fff4f20 0x4023b348:0x3fff4f40"
----------------------------------------------
0x40100d96
_heap_caps_malloc
/root/ESP8266_RTOS_SDK/components/heap/src/esp_heap_caps.c:169
----------------------------------------------
0x40221d34
_heap_caps_realloc
/root/ESP8266_RTOS_SDK/components/heap/src/esp_heap_caps.c:314
----------------------------------------------
0x4022aba9
realloc
/root/ESP8266_RTOS_SDK/components/newlib/src/esp_malloc.c:32
----------------------------------------------
0x40241439
print
/root/ESP8266_RTOS_SDK/components/json/cJSON/cJSON.c:1125
----------------------------------------------
0x40241d4b
cJSON_Print
/root/ESP8266_RTOS_SDK/components/json/cJSON/cJSON.c:1165
----------------------------------------------
0x40223819
json_get_handler
/root/modbus_rtu2tcp/main/http_server.c:223
----------------------------------------------
0x4023be24
httpd_uri
/root/ESP8266_RTOS_SDK/components/esp_http_server/src/httpd_uri.c:218
----------------------------------------------
0x4023c4ff
httpd_parse_req
/root/ESP8266_RTOS_SDK/components/esp_http_server/src/httpd_parse.c:527 (discriminator 15)
----------------------------------------------
0x4023c5af
httpd_req_new
/root/ESP8266_RTOS_SDK/components/esp_http_server/src/httpd_parse.c:594
----------------------------------------------
0x4023ca17
httpd_sess_process
/root/ESP8266_RTOS_SDK/components/esp_http_server/src/httpd_sess.c:299 (discriminator 15)
----------------------------------------------
0x4023b2d2
httpd_server
/root/ESP8266_RTOS_SDK/components/esp_http_server/src/httpd_main.c:192 (discriminator 15)
----------------------------------------------
0x4023b348
httpd_thread
/root/ESP8266_RTOS_SDK/components/esp_http_server/src/httpd_main.c:223 (discriminator 15)