1set pagination off
2set confirm off
3
4# Start OpenOCD and run to the entry function
5file test.elf
6target remote | openocd -c "log_output openocd.log; set ESP_RTOS none; set ESP_FLASH_SIZE 0; set ESP32_ONLYCPU 1" -f board/esp32-ethernet-kit-3.3v.cfg -c "gdb_port pipe; init; reset halt"
7thb entry
8c
9
10# Clear trace memory
11mon mww 0x3fff8000 0 0x4000
12mon mww 0x3fffc000 0 0x4000
13
14# Enable trace memory
15# DPORT_TRACEMEM_MUX_MODE_REG = TRACEMEM_MUX_BLK0_ONLY
16mon mww 0x3ff00070 1
17# DPORT_PRO_TRACEMEM_ENA_REG = 1
18mon mww 0x3ff00074 1
19
20# Start trace
21eval "mon esp32 tracestart pc %p/4", &done
22c
23
24# Dump and process the trace
25mon esp32 tracedump trace_pro.bin
26source ../traceparse.py
27python parse_and_dump("trace_pro.bin")
28