我正在尝试使用 JTAG USB ESP32S3 解析从 heap_trace_init_tohost 功能获得的跟踪。
在代码中:
代码:
全选
esp_log_set_vprintf(&esp_sysview_vprintf);
if(heap_trace_init_tohost() != ESP_OK) {
ESP_LOGE("TAG", "Failed to init heap trace!");
return;
}
heap_trace_start(HEAP_TRACE_ALL);
...
heap_trace_stop();
打开Ocd:
代码:
全选
~/.espressif/tools/openocd-esp32/v0.11.0-esp32-20220706/openocd-esp32/bin/openocd -f board/esp32s3-buil
tin.cfg
GDB:
代码:
全选
~/.espressif/tools/xtensa-esp32s3-elf/esp-2022r1-11.2.0/xtensa-esp32s3-elf/bin/xtensa-esp32s3-elf-gdb -x [project-path]/heaptrace-gdbinit [project-path]/build/project.elf
heaptrace-gdbinit:
代码:
全选
set pagination off
target remote :3333
mon reset halt
flushregs
tb heap_trace_start
commands
mon esp sysview start file:///[project-path]/trace/pro-cpu.SVDat file:///[project-path]/trace/app-cpu.SVDat 0 -1 1
c
end
tb heap_trace_stop
commands
mon esp sysview stop
end
c
在跟踪结束时,我得到了信息:
代码:
全选
Info : Trace data processor thread exited with 0
Disconnect targets...
Info : [esp32s3.cpu0] Target halted, PC=0x4038233E, debug_reason=00000000
Info : Set GDB target to 'esp32s3.cpu0'
Info : [esp32s3.cpu1] Target halted, PC=0x4037C5C8, debug_reason=00000000
Info : Targets disconnected.
Tracing is STOPPED. Size is 3725777 of 4294967295 @ 350.894470 (81.648125) KB/s
Data: blocks incomplete 776, lost bytes: 453
Block read time [17.902000..199.517990] ms
Block proc time [0.072000..0.232000] ms
很多错误
,我正在尝试解析生成的文件:
代码:
全选
~/.espressif/python_env/idf5.0_py3.10_env/bin/python ~/esp-idf/tools/esp_app_trace/sysviewtrace_proc.py -p -b [project-path]/build/project.elf [project-path]/trace/pro-cpu.SVDat
它总是以解析错误结束,例如:
代码:
全选
File "~/esp-idf/tools/esp_app_trace/espytrace/sysview.py", line 352, in _read_payload
raise SysViewTraceParseError('Unknown event ID %d!' % self.id)
espytrace.sysview.SysViewTraceParseError: Unknown event ID 463!
或者
代码:
全选
File "~/esp_app_trace/espytrace/sysview.py", line 368, in _read_payload
raise SysViewTraceParseError('Invalid event {}({:d}) payload len {:d}! Must be {:d}.'.format(self.name, self.id, self.plen, params_len))
espytrace.sysview.SysViewTraceParseError: Invalid event xQueueGenericReceive(49) payload len 15! Must be 18.
存在任何可以修复跟踪错误的工具吗?
0