ESP32 Backtrace

调试报错串口打印如下:

I (462) example: Example configured to blink addressable LED!
I (472) gpio: GPIO[48]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 
esp32s3> 
E (47412) console: Error or end-of-input, terminating console
E (47412) FreeRTOS: FreeRTOS Task "tsk_csle" should not return, Aborting now!

abort() was called at PC 0x4037f3c7 on core 0


Backtrace: 0x40375d46:0x3fcab130 0x4037e7b5:0x3fcab150 0x40387105:0x3fcab170 0x4037f3c7:0x3fcab1e0

在后台运行以下命令,解码各地址:

xtensa-esp32s3-elf-addr2line -pfiaC -e build/PROJECT.elf ADDRESS
E:\Espressif\tools\xtensa-esp-elf\esp-13.2.0_20230928\xtensa-esp-elf\bin\xtensa-esp-elf-addr2line.exe: invalid option -- c
Usage: E:\Espressif\tools\xtensa-esp-elf\esp-13.2.0_20230928\xtensa-esp-elf\bin\xtensa-esp-elf-addr2line.exe [option(s)] [addr(s)]
 Convert addresses into line number/file name pairs.
 If no addresses are specified on the command line, they will be read from stdin
 The options are:
  @<file>                Read options from <file>
  -a --addresses         Show addresses
  -b --target=<bfdname>  Set the binary file format
  -e --exe=<executable>  Set the input file name (default is a.out)
  -i --inlines           Unwind inlined functions
  -j --section=<name>    Read section-relative offsets instead of addresses
  -p --pretty-print      Make the output easier to read for humans
  -s --basenames         Strip directory names
  -f --functions         Show function names
  -C --demangle[=style]  Demangle function names
  -R --recurse-limit     Enable a limit on recursion whilst demangling.  [Default]
  -r --no-recurse-limit  Disable a limit on recursion whilst demangling
  -h --help              Display this information
  -v --version           Display the program's version

示例:

PS D:\work\ESP32_test\blink> xtensa-esp-elf-addr2line.exe -pfiaC -e build/blink.elf  0x40375d46:0x3fcab130 0x4037e7b5:0x3fcab150 0x40387105:0x3fcab170 0x4037f3c7:0x3fcab1e0
0x40375d46: panic_abort at E:/Espressif/frameworks/esp-idf-v5.2.1/components/esp_system/panic.c:472
0x4037e7b5: esp_system_abort at E:/Espressif/frameworks/esp-idf-v5.2.1/components/esp_system/port/esp_system_chip.c:93
0x40387105: abort at E:/Espressif/frameworks/esp-idf-v5.2.1/components/newlib/abort.c:38
0x4037f3c7: vPortTaskWrapper at E:/Espressif/frameworks/esp-idf-v5.2.1/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:138
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容