我正在调试 NodeMCU Lua 固件的 dev-esp32 分支上的一些崩溃。你们其他 NodeMCU 开发人员如何分析回溯?
在正常的 ESP32 开发期间,idf 监视器处理解码回溯。我尝试在我的 NodeMCU 构建中使用 IDF 监视器(不成功)。我也试过https://github.com/me-no-dev/EspExceptionDecoder没有成功。
在我深入研究这个问题之前,我想我会检查其他人是如何处理它的。
下面是我尝试解码的输出类型的一个示例。
Guru Meditation Error: Core 1 panic'ed (StoreProhibited). Exception was unhandled.
Core 1 register dump:
PC : 0x4000c3f5 PS : 0x00060430 A0 : 0x800ed304 A1 : 0x3ffc3fe0
A2 : 0x80171ba1 A3 : 0x3ffc4292 A4 : 0x00000001 A5 : 0x3fe1a9a4
A6 : 0x7ff00000 A7 : 0x000e6c6e A8 : 0x00000000 A9 : 0x80171ba1
A10 : 0x0000002d A11 : 0x00000000 A12 : 0x3ffc9690 A13 : 0x00000010
A14 : 0x00000001 A15 : 0x3ffc4640 SAR : 0x00000004 EXCCAUSE: 0x0000001d
EXCVADDR: 0x80171ba1 LBEG : 0x400029ac LEND : 0x400029cb LCOUNT : 0x00000000
ELF file SHA256: b809d167629a125c85da3f679dd782ec6df740657c8d4ef4df56d7eea784abcd
Backtrace: 0x4000c3f5:0x3ffc3fe0 0x400ed301:0x3ffc4000 0x400e2c8a:0x3ffc4030 0x400df6bd:0x3ffc4340 0x4013bfde:0x3ffc4400 0x4013dff9:0x3ffc4440 0x40137588:0x3ffc4460 0x4016ff04:0x3ffc4480 0x4013d8d7:0x3ffc44b0 0x4013ccdd:0x3ffc44f0 0x4013d9ae:0x3ffc4540 0x4013db89:0x3ffc4560 0x4013d1f5:0x3ffc4580 0x4013da96:0x3ffc4600 0x4013e6a2:0x3ffc4630 0x400d6e21:0x3ffc4660 0x40082c36:0x3ffc4690 0x40108137:0x3ffc46d0 0x40110043:0x3ffc4730 0x401100a2:0x3ffc4750 0x4011014e:0x3ffc4770 0x4010dc8e:0x3ffc4790 0x4008ec46:0x3ffc47b0
有关解码器尝试的附加信息
对于 EspExceptionDecoder 尝试,我将崩溃输出保存在一个名为backtrace
. 然后我按如下方式调用解码器,这会导致解析器错误(确认路径正确)。
$ shasum -a 256 ../konnected-pro/build/nodemcu-firmware/build/NodeMCU.elf
fa399df026e014cc988df430b22c58da9a9159cea5aaca9f19f67dc67c339619 ../konnected-pro/build/nodemcu-firmware/build/NodeMCU.elf
$ ./decoder.py -e ../konnected-pro/build/nodemcu-firmware/build/NodeMCU.elf -t ~/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf -p ESP32 ../backtrace
ERROR: Parser not complete!
我在上面尝试的backtrace
文件具有以下内容(注意 sha 与上面的检查相匹配)。
PANIC: unprotected error in call to Lua API (/lfs/ds18b20.lua:123: failed)
E (27032) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time:
E (27032) task_wdt: - IDLE0 (CPU 0)
E (27032) task_wdt: Tasks currently running:
E (27032) task_wdt: CPU 0: main
E (27032) task_wdt: CPU 1: IDLE1
E (27032) task_wdt: Aborting.
abort() was called at PC 0x400d3708 on core 0
ELF file SHA256: fa399df026e014cc988df430b22c58da9a9159cea5aaca9f19f67dc67c339619
Backtrace: 0x40088cef:0x3ffb0a40 0x40089009:0x3ffb0a60 0x400d3708:0x3ffb0a80 0x4008273d:0x3ffb0aa0 0x4013715d:0x3ffbcde0 0x40138917:0x3ffbce00 0x4013857d:0x3ffbce20 0x40140aa1:0x3ffbce40 0x40137357:0x3ffbce60 0x400d4dfe:0x3ffbceb0 0x40138e6f:0x3ffbcee0 0x4013f1b9:0x3ffbcf20 0x40138f46:0x3ffbcf70 0x401408fd:0x3ffbcf90 0x400d5e6b:0x3ffbcfb0 0x400f9b81:0x3ffbcfd0 0x400fdc37:0x3ffbd000 0x400d27ab:0x3ffbd040
Rebooting...
ets Jun 8 2016 00:22:57