Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: [1] 2  Send TopicPrint
Very Hot Topic (More than 25 Replies) Unexpected GDB output from "-exec-run" (Read 3630 times)
romeo
Junior Member
**
Offline


Posts: 48
Joined: Aug 3rd, 2024
Unexpected GDB output from "-exec-run"
May 5th, 2026 at 5:54am
Print Post  
I'm trying to get the JTAG via USB debugger going on my ESP32-S3 Devkit Board clone. I have never used this debugger before, although I have used the serial debug a lot. I am in Windows 11/VS2019 Version 16.11.55 with VMicro 2.2026.0422.

I have a simple LED Blinker sketch which downloads and runs correctly. I have the Local Board.txt installed as per the VMicro website https://www.visualmicro.com/page/ESP32S3-USB-Debugging.aspx, and the Debugger options set to Hardware/ESP32-USB/No Optimization. I also saw an option 16 in the VMicro dropdown which I set to "JTAG Adapter:Integrated USB JTAG" (although this isn't mentioned on the above web page).

When I attempt to start the debugger (Debug/ Attach to Process) it thinks for a bit, then throws an error 
"Unable to start debugging. Unexpected GDB output from command "-exec-run". Don't know how to run. Try "help target".

Interestingly, it does open a Linux Console Window and an "Autos" window (I am using W11, not Linux). Not sure if this is significant.
There is at least one previous instance on this forum of this precise error a couple of years ago, but that discussion doesn't appear to apply here.

I have attached the debug output and a copy of the .ino.

As I said at the outset, I have not used this debugger before, so I may be overlooking something simple. But any advice will be greatly appreciated.
Roman 

  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2962
Joined: Feb 13th, 2019
Re: Unexpected GDB output from "-exec-run"
Reply #1 - May 5th, 2026 at 8:40am
Print Post  
Thanks for the report.

The Option 16 selected is part of the increasing Arduino IDE integration for debugging, however this is different in Visual Micro currently.

From the logs you have selected the correct vMicro > Debugger options, could you attach the logfile in the attached location, and the full build output as a text file for us to review?

  

Please Register or Login to the Forum to see File Attachments
Back to top
IP Logged
 
romeo
Junior Member
**
Offline


Posts: 48
Joined: Aug 3rd, 2024
Re: Unexpected GDB output from "-exec-run"
Reply #2 - May 5th, 2026 at 10:38am
Print Post  
Here is the requested log.
Thanks
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
romeo
Junior Member
**
Offline


Posts: 48
Joined: Aug 3rd, 2024
Re: Unexpected GDB output from "-exec-run"
Reply #3 - May 5th, 2026 at 10:45am
Print Post  
Sorry, forgot the build log. Here it is.
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2962
Joined: Feb 13th, 2019
Re: Unexpected GDB output from "-exec-run"
Reply #4 - May 5th, 2026 at 11:10am
Print Post  
Thanks for the logs, the error in the OpenOCD Log:
Quote:
Error: esp_usb_jtag: could not find or open device!


Shows it cannot see the device.

1) Do you have the ESP32-S3 connected on the port marked USB?
2) Have you checked the Driver is WinUSB in the Zadig Tool: https://www.visualmicro.com/page/Zadig-Driver-Installation-Guide.aspx
  
Back to top
IP Logged
 
romeo
Junior Member
**
Offline


Posts: 48
Joined: Aug 3rd, 2024
Re: Unexpected GDB output from "-exec-run"
Reply #5 - May 5th, 2026 at 11:36am
Print Post  
The module I have does not have the USB ports separately marked. Uploads work equally well on either port. I am, by default, using the LH port which is consistent with the layout of the non-clone part. 
On this port, Zadig sees two instances of USB JTAG / serial debug unit called Interface 0 and Interface 2. Both show 
WinUSB (v6.1.7600.16385).

When I plug the USB into the other port it simply lists a single "USB Single Serial" but also the same driver. 
So I guess the LH port is the correct one. That is the one I was using earlier when I received those errors. Incidentally, I did try the other port back then and received the same error.

R
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2962
Joined: Feb 13th, 2019
Re: Unexpected GDB output from "-exec-run"
Reply #6 - May 5th, 2026 at 11:41am
Print Post  
Thanks for the update, and yes the LH port sounds correct (they are sometimes marked on the underside of the board instead of on the top silkscreen).

Could you send over the "USB ID" information shown in Zadig for the "USB JTAG/serial debug Unit (Interface 2)"?

Just to note Interface 1 on this port, and the other port on the board should have the "USBSer" driver installed as these are both standard serial Interfaces. Only Interface 2 on the USB port needs the WinUSB Driver to allow OpenOCD to communicate with it for JTAG.

  
Back to top
IP Logged
 
romeo
Junior Member
**
Offline


Posts: 48
Joined: Aug 3rd, 2024
Re: Unexpected GDB output from "-exec-run"
Reply #7 - May 5th, 2026 at 11:49am
Print Post  
USB ID for Interface 2 is 303A 1001 02.
  
Back to top
 
IP Logged
 
romeo
Junior Member
**
Offline


Posts: 48
Joined: Aug 3rd, 2024
Re: Unexpected GDB output from "-exec-run"
Reply #8 - May 5th, 2026 at 11:57am
Print Post  
Not sure if I was reading the Zadig screen correctly.
Interface 2 shows driver WINUSB (v10.0.26100.1150), not WinUSB (v6.1.7600.16385) which is in the box to the right of the yellow arrow. 
Interface 0 driver is usbser (v10.0.26100.2454), with the arrow now showing green and the box to its right also saying WinUSB (v6.1.7600.16385).
  
Back to top
 
IP Logged
 
romeo
Junior Member
**
Offline


Posts: 48
Joined: Aug 3rd, 2024
Re: Unexpected GDB output from "-exec-run"
Reply #9 - May 5th, 2026 at 12:12pm
Print Post  
I replaced Interface 0 driver with WinUSB V6..... and tried again. Got a completely different long error message saying the program path is invalid, No such file, try restarting, etc.
So I rebuilt the code, but now I cannot upload it because my computer (Device Manager) no longer sees anything on this USB port, even though Zadig still sees both ports.
Now what's going on??
  
Back to top
 
IP Logged
 
romeo
Junior Member
**
Offline


Posts: 48
Joined: Aug 3rd, 2024
Re: Unexpected GDB output from "-exec-run"
Reply #10 - May 5th, 2026 at 12:20pm
Print Post  
Reverted Driver on Port 0 to usbser and it immediately (as soon as I hit "Install Driver" and long before the installation finished!) showed up in Device Manager as "USB JTAG/serial debug unit (Interface 0)" which I was not seeing in Device Manager previously. 
But back to the original error message.
I think I've run out of things to try...
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2962
Joined: Feb 13th, 2019
Re: Unexpected GDB output from "-exec-run"
Reply #11 - May 5th, 2026 at 12:20pm
Print Post  
Quote:
Interface 2 shows driver WINUSB (v10.0.26100.1150), not WinUSB (v6.1.7600.16385) which is in the box to the right of the yellow arrow. 
Interface 0 driver is usbser (v10.0.26100.2454), with the arrow now showing green and the box to its right also saying WinUSB (v6.1.7600.16385).


This was correct, and the driver on the left is the current driver, the one on the right of the arrow is what will be installed if the Replace Driver button is clicked.

Quote:
I replaced Interface 0 driver with WinUSB V6..... and tried again. Got a completely different long error message saying the program path is invalid, No such file, try restarting, etc.
So I rebuilt the code, but now I cannot upload it because my computer (Device Manager) no longer sees anything on this USB port, even though Zadig still sees both ports.
Now what's going on??


This is incorrect, Interface 0 should be the usbser driver.  You should be able to roll this back in device manager, but instead of it being under "Ports (COM&LPT)"Ports, it will now be listed under the ""Usb Serial Bus Devices".  If you right click the device, and open the properties, then check the Details Tab > Hardware Ids, you can be sure it is the right device.  Then on the Driver Tab you should be able to "Rollback Driver".  If that is not available then click Update Driver, then Browse My Computer for Drivers > Let Me Pick from a list of available drivers on my computer > then the USBSer driver should be available for selection.  This should get the board working for upload again.

I'm currently checking the VID/PID supplied for Interface 2 as this is likely the reason the standard config cannot see the board.  Ill also check the latest OpenOCD version to see if this needs updating, or if an override is a better route for this cloned board.
  
Back to top
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2962
Joined: Feb 13th, 2019
Re: Unexpected GDB output from "-exec-run"
Reply #12 - May 5th, 2026 at 12:36pm
Print Post  
The VID/PID and WinUSB Driver all look correct after double checking.

It could be a previous debugging attempt has left an orphaned process.  Can you try (just to prove it out), unplugging the board from your PC, and rebooting it, then just load VS and connect the board, and perform the Debug > Attach to Process?
  
Back to top
IP Logged
 
romeo
Junior Member
**
Offline


Posts: 48
Joined: Aug 3rd, 2024
Re: Unexpected GDB output from "-exec-run"
Reply #13 - May 5th, 2026 at 1:09pm
Print Post  
Tried that. Unplug board/restart VS/Check all debug settings unchanged/ plug in board (Blink starts running)/Attach Process.
Check Zadig - both ports showing.

Same error message "Unexpected GDB output...."
  
Back to top
 
IP Logged
 
romeo
Junior Member
**
Offline


Posts: 48
Joined: Aug 3rd, 2024
Re: Unexpected GDB output from "-exec-run"
Reply #14 - May 6th, 2026 at 6:08am
Print Post  
I just left everything overnight (Computer in Sleep mode) without closing VS although I did swap the cable on the ESP32 board ( I was trying whether a dicey cable may have been an issue) which caused several reboots of that device. Just for fun, I hit "Attach to Process" and I now get a completely different message from that I reported in the last message yesterday, after doing the same thing. 
It now tells me that 
DebugTrial.ino.bin is missing.
And indeed it is. And it is nowhere on my computer.
The next layer of the onion?

In any event, I have Teams on my desktop and I will be home all evening (my time) so anytime after you start in the morning until about 2pm your time should work.

Can't remember when I last renewed, but I suspect that my support subscription is probably expired. How can I check? In any case, I greatly appreciate your help.

Roman
  
Back to top
 
IP Logged
 
romeo
Junior Member
**
Offline


Posts: 48
Joined: Aug 3rd, 2024
Re: Unexpected GDB output from "-exec-run"
Reply #15 - May 6th, 2026 at 6:10am
Print Post  
For some reason, the path didn't copy/paste correctly. It is, of course, C:Users\Roman.....Debug\DebugTrial.ino.bin
(Tried copy/paste several times, without success. Ended up typing it longhand!)


« Last Edit: May 6th, 2026 at 6:17am by romeo »  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2962
Joined: Feb 13th, 2019
Re: Unexpected GDB output from "-exec-run"
Reply #16 - May 6th, 2026 at 9:20am
Print Post  
Thanks for the update and a bad USB cable can definitely cause issues with debugging (due to the speeds it needs to run reliably at).

If you Build and Upload the project as normal, and then press Attach to Process it should work again (the bin missing is normally a sign the project has not been built, or the temp folder has been cleared due to either manual action, or a change in debugging settings).

  
Back to top
IP Logged
 
romeo
Junior Member
**
Offline


Posts: 48
Joined: Aug 3rd, 2024
Re: Unexpected GDB output from "-exec-run"
Reply #17 - May 6th, 2026 at 9:33am
Print Post  
So I did a build and upload and attach, while watching that Temp folder which previously had just a couple of log files and directories. This time a bunch of files (21 in all) appeared, including the previously missing one, but "Attach to process" this time gave me the original GDB error message. The OpenOCD log now contains two error messages

Error: libusb_open() failed with LIBUSB_ERROR_NOT_FOUND
Error: esp_usb_jtag: could not find or open device!

Zadig sees both ports as usual.
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2962
Joined: Feb 13th, 2019
Re: Unexpected GDB output from "-exec-run"
Reply #18 - May 6th, 2026 at 9:39am
Print Post  
Thanks for the update, the bin file missing is an earlier failure point than the JTAG connect so it makes sense we get a different error when it is missing.

Can you confirm there is nothing attached to your board on pin 18 and 19?

If possible disconnect everything from the board if there is anything connected....
  
Back to top
IP Logged
 
romeo
Junior Member
**
Offline


Posts: 48
Joined: Aug 3rd, 2024
Re: Unexpected GDB output from "-exec-run"
Reply #19 - May 6th, 2026 at 9:44am
Print Post  
Pins 18 and 19 are clear. I have the module in free space now, and still the same GDB error.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: [1] 2 
Send TopicPrint