I have a working OpenOCD setup to do JTAG debugging on a ESP32 platform using the FTDI C232HM-DDHSL-0 cable, and I’d like to replicate this setup inside the Platformio debugger. Is there any documentation that would help me do this? I’ve tried reading through the official documentation and even tried “debug_tool = ftdi” as suggested at FTDI Chip — PlatformIO latest documentation, but I’m not having any success.
For reference, this is the OpenOCD config file I’m using for the cable:
#
# FTDI USB Hi-Speed to MPSSE Cable
#
# http://www.ftdichip.com/Products/Cables/USBMPSSE.htm
#
# C232HM-DDHSL-0 and C232HM-EDSL-0 provide 3.3V and 5V on pin 1 (Red),
# respectively.
#
interface ftdi
#ftdi_device_desc "C232HM-DDHSL-0"
#ftdi_device_desc "C232HM-EDHSL-0"
ftdi_vid_pid 0x0403 0x6014
ftdi_layout_init 0x0008 0x000b
Thanks! This was pretty simple and it appears to work. Now I need to figure out how to use the debugger because it doesn’t exactly look as I would expect (I’m not seeing a call stack, or disassembly of my code, or memory, etc.) But I can confirm that OpenOCD is running and it shows that my CPU has been halted, so this is progress. Thanks again.
Actually trying to do the same thing here with no success… however I want to use the espidf framework and not Arduino. Is it any difference for the debugger?
There is no realz difference between debugging with ESP-IDF and Arduino. You will need to make the same change to the OpenOCD configuation file esp32_devkitj_v1.cfg. Also see this Medium post (the section Generic FT232H board applies as your cable as the C232HM has a FT232H chip):
The nice-to-have is to this line platformio.ini (with ESP-IDF you want to stop in main as there is no setup):
debug_init_break = tbreak main
But your previous questions indicates that you have another problem: either GPIO15 pin is already in use by your firmware or it’s not properly connected to the debug probe.
In any case: Post the platformio.ini file and the log output you get. Then chances are higher that we can help you.