January 3, 2022 at 02:56 #31946
I’m using VisualGDB Version 5.6R2 (build 4506) with and ESP32-c3. I can debug correctly, but I’d like to move the console output directly on the JTAG. This is possible, at least with IDF5.0-dev I’m using.
However a small change on the USB profile request is needed: at the moment, VGDB asks to change the profile on the “composite USB peripheral” as indicated on the Device manager, but in this case the COM port associated to the ESP32-C3 disappears. So VGDB should check and ask to change only the “JTAG/serial peripheral” profile. In this way it is possible to debug and have the console output directly to the USB.
So is it possible for VGDB to check only the “JTAG/serial peripheral” to have the WinUSB profile selected?
Mattia BertonJanuary 3, 2022 at 09:19 #31948
VisualGDB installs the WinUSB driver for the root node of the ESP32-C3 debug interface (USB\VID_303A&PID_1001 instead of USB\VID_303A&PID_1001&MI_02) because the Espressif’s port of OpenOCD fails to recognize it otherwise. You can recheck it by right-clicking on the “USB JTAG/serial debug unit” in Device Manager, selecting “Uninstall device” and replugging it. The COM port will reappear in the Device Manager, but OpenOCD won’t recognize it.
You can retest it by running ESP32 OpenOCD manually:C++1openocd.exe -f interface/esp_usb_jtag.cfg -f target/esp32c3.cfg
Installing the driver to the root node gets OpenOCD working, but indeed hides the COM port.
Feel free to report this to Espressif, or make your own patch to OpenOCD resolving this issue. If you can get OpenOCD to work without installing the WinUSB driver to the root device node, we can gladly update VisualGDB to not do it.January 4, 2022 at 04:19 #31952
forgive me if I have not been clear. What I’d like to tell you is that I have been able to use OpenOCD to debug the ESP32-C3, but I had to put only the child node as WinUSB, not the root node, as you can see in the image attached. Of course VGDB asks to change the root node to WinUSB, but I neglect and I can correctly debug and have the COM available for logging.
Attachments:You must be logged in to view attached files.January 4, 2022 at 09:03 #31954
Strange, this is different from what we have observed. Perhaps you are using a different device revision.
Either way, you can configure VisualGDB to install the driver on the inner node by adding the Interface element the %LOCALAPPDATA%\VisualGDB\EmbeddedDebugPackages\com.sysprogs.esp32.core\QuickSetup\interfaces.xml file as follows:C++12345678910111213<ProgrammingInterface><ID>esp_usb_jtag</ID><Name>ESP32C3 built-in JTAG</Name><ScriptFile>interface/esp_usb_jtag.cfg</ScriptFile><UsbIdentities><UsbIdentity><VID>303A</VID><PID>1001</PID><Interface>02</Interface></UsbIdentity></UsbIdentities><UniversalDriverId>com.sysprogs.libusb.mini</UniversalDriverId></ProgrammingInterface>
You must be logged in to reply to this topic.