gdbinit 714 B

123456789101112131415161718192021222324252627
  1. set pagination off
  2. set confirm off
  3. # Start OpenOCD and run to the entry function
  4. file test.elf
  5. target 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"
  6. thb entry
  7. c
  8. # Clear trace memory
  9. mon mww 0x3fff8000 0 0x4000
  10. mon mww 0x3fffc000 0 0x4000
  11. # Enable trace memory
  12. # DPORT_TRACEMEM_MUX_MODE_REG = TRACEMEM_MUX_BLK0_ONLY
  13. mon mww 0x3ff00070 1
  14. # DPORT_PRO_TRACEMEM_ENA_REG = 1
  15. mon mww 0x3ff00074 1
  16. # Start trace
  17. eval "mon esp32 tracestart pc %p/4", &done
  18. c
  19. # Dump and process the trace
  20. mon esp32 tracedump trace_pro.bin
  21. source ../traceparse.py
  22. python parse_and_dump("trace_pro.bin")