Sysprogs forums › Forums › VisualGDB › ESP32S-WROOM GBD Debugging
- This topic has 6 replies, 3 voices, and was last updated 3 years ago by Sam a.
-
AuthorPosts
-
October 19, 2021 at 17:55 #31558Sam aParticipant
At the moment I am trying to create a using a Hiletgo ESP32S-WROOM board (v1.1 if it matters), and I am having some trouble. Initially the ESP-IDF package was giving cert errors but that was an easy fix. Now I am able to load up a program onto the board (for example flash) by holding down the IO0 button, however once I am done flashing visualgdb claims it could not find the device for actual debugging after the fact. I can confirm that it is indeed flashing the program however since when I hit the enable button on the board (From my understanding the reset) the blue led starts blinking, and when I change the code to blink at different rates it corresponds to it. However, with all of this the debugging is important.
Visual GDB V5.6
Using the ESP32/ESP8266 project option
Using ESP-IDF 4.3.1 (Latest version at the moment, visualgdb fetched it for me)
CMake Build Settings: Ninja underlying build system
Debug using OpenOCD, JTAG/SWD Programmer: ESP32 Devkit option
JTAG/SWD Frequency: 3000
Debugged device: ESP32
Error:
C:\Users\myUser\AppData\Local\VisualGDB\EmbeddedDebugPackages\com.sysprogs.esp32.core\bin\openocd.exe -c “gdb_port 59162” -c “telnet_port 59160” -f interface/ftdi/esp32_devkitj_v1.cfg -c “adapter_khz 3000” -f target/esp32.cfg -c “echo VisualGDB_OpenOCD_Ready”
Open On-Chip Debugger 0.10.0 (2021-07-16)
Licensed under GNU GPL v2
libusb1 09e75e98b4d9ea7909e8837b7a3f00dda4589dc3
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
adapter speed: 20000 kHzadapter speed: 3000 kHz
VisualGDB_OpenOCD_Ready
Info : Listening on port 6666 for tcl connections
Info : Listening on port 59160 for telnet connections
Error: no device found
Error: unable to open ftdi device with vid 0403, pid 6010, description ‘*’, serial ‘*’ at bus location ‘*’
Error: no device found
Error: unable to open ftdi device with vid 0403, pid 6014, description ‘*’, serial ‘*’ at bus location ‘*’Error: No JTAG interface configured yet. Issue ‘init’ command in startup scripts before communicating with targets.
Error: Failed to clear OCDDCR_ENABLEOCD!
Error: No JTAG interface configured yet. Issue ‘init’ command in startup scripts before communicating with targets.
Error: Failed to clear OCDDCR_ENABLEOCD!October 19, 2021 at 17:57 #31559Sam aParticipantAlso as for hardware I simply just have the ESP32 board mentioned above connected via usb to my host machine, with the SILABS cp210x windows drivers installed.
October 20, 2021 at 00:12 #31560paulh001ParticipantDid you install correct USB driver using Zadig for interface 0?
For me I have to use libusbK driver other drivers did not work for me.
Also it worked on Windows 10 but lately it stopped working and could not get it working again.
Now on Windows 11 and works again.
Maybe this helps
October 20, 2021 at 08:31 #31561supportKeymasterOctober 21, 2021 at 16:30 #31564Sam aParticipantHi, I got my hands on an ESP-PROG for jtag debugging, when I switch to flash via jtagger vs com port, it cannot be detected for im assuming the same reason debugging would not work. However setting the port to COM15 for the jtagger in arduino allows me to program it, but through visualGDB I can’t seem to detect it. Is it because I am not supposed to be using OpenOCD with it? Or the script for the ESP-PROG does not exist?
As for the zadig usb drivers, I am not exactly sure what I would have to do there. When I first plugged in my ESP-PROG to my host machine it installed the drivers and I could see two new com ports, one I assume for receiving and I was indeed able to communicate with it.
EDIT: Using the ‘Program ESP32 Program into FLASH memory’ option I was just able to at least program the board using the ESP-PROG, however clicking ‘start’ to begin a debug session + flash does not work.
- This reply was modified 3 years ago by Sam a.
October 21, 2021 at 18:24 #31566supportKeymasterHi,
Programming via COM port does not utilize JTAG or OpenOCD. It simply uploads the image to the built-in bootloader using esptool.py. You can achieve the same effect with VisualGDB by right-clicking on the project in Solution Explorer and selecting “Program FLASH memory”.
In order to do JTAG debugging, VisualGDB uses the OpenOCD port maintained by Espressif. If it doesn’t work with your hardware, please refer to the documentation from Espressif to get it working.
If you can confirm that OpenOCD works outside VisualGDB, but not when used by VisualGDB, please let us know the email address associated with your license, and we will gladly help you configure VisualGDB to replicate the results of running it manually.
October 21, 2021 at 19:37 #31567Sam aParticipantHello,
After making a few driver changes the debugger seems to be functioning now, solved.
-
AuthorPosts
- You must be logged in to reply to this topic.