本来购买 ESP-Prog 调试 ESP32,发现无论如何 Ubuntu 22.04 都无法发现该设备(不知道是硬件问题还是驱动问题)(2024-02-13更新,是micro usb线的问题。有些micro usb线其实只有电源线,数据线不生效)。在网上看到一篇文章,可以利用树莓派进行 Jtag 调试。链接如下:ESP32 JTAG Debugging using Raspberry Pi。
这里需要说明下,随着openocd-esp32 项目的更新,这篇文章有些过期了,具体可见下面的文件: openocd-esp32/tcl/interface/raspberrypi-gpio-connector.cfg
# GPIO 25 (pin 22) previously used for TMS/SWDIO is pulled-down by default.
# The JTAG/SWD specification requires pull-up at the target board
# for either signal. Connecting the signal pulled-up on the target
# to the pull-down on the adapter is not a good idea.
# GPIO 8 is pulled-up by default.
echo "Warn : TMS/SWDIO moved to GPIO 8 (pin 24). Check the wiring please!"
所以需要把文章中树莓派的 GPIO25 修改到 GPIO8
ESP32和树莓派的连接