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) ESP32-S3: Unable to start debugging. Unexpected GDB output from command "-exec-run". (Read 8512 times)
discman
Junior Member
**
Offline


Posts: 27
Joined: Apr 13th, 2023
ESP32-S3: Unable to start debugging. Unexpected GDB output from command "-exec-run".
Apr 13th, 2023 at 5:58am
Print Post  
I am getting this same error message "Unexpected GDB output….. -exec -run" when trying to “Attach to Process…”.

Previously. I'd been successfully debugging ESP32 with an ESP-PROG.  Just now, I’ve changed to an ESP32 S3.  Using the D+, D- lines, and have the USB JTAG/Serial debug COM port showing up okay.  Everything (Uploader, board.txt, port etc.) are set up per your video.  Both VisualStudio and vMicro (2023.220.2205) were updated as of few days ago.

BTW, USB JATG/serial debug unit (Interface 0) is showing up in Device Mgr, but I set up driver for (Interface 2) in Zadig per your video.  Is that right?

Build and upload to S3 okay, just cannot Attach to Process.  Please help!

Thank you.
« Last Edit: Apr 13th, 2023 at 8:36am by Simon@Visual Micro »  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2370
Joined: Feb 13th, 2019
Re: ESP32-S3: Unable to start debugging. Unexpected GDB output from command "-exec-run".
Reply #1 - Apr 13th, 2023 at 8:44am
Print Post  
Thanks for the report.

I believe interface 2 is correct for the driver installation, it should show as the "USB JTAG/serial debug unit" on the correct interface.

Please enable the below options:
  • vMicro > Compiler > Verbose
  • vMicro > Compiler > Show Build Properties
  • vMicro > Uploader > Verbose


Then run the build and upload to the board, and try the Debug > Attach to Process.

If you can attach the complete output as a text file from the Output Window > Micro Build it will help us to understand the issue in more detail.

If there is any output in the Output Window > Debug please also attach this as well as a text file.
  
Back to top
 
IP Logged
 
discman
Junior Member
**
Offline


Posts: 27
Joined: Apr 13th, 2023
Re: ESP32-S3: Unable to start debugging. Unexpected GDB output from command "-exec-run".
Reply #2 - Apr 13th, 2023 at 3:55pm
Print Post  
Thank you for your reply.  A real silly question: Just how do I attach text files?  (I'm new to this forum)  None of the menu icons seems to be for attaching local file.
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2370
Joined: Feb 13th, 2019
Re: ESP32-S3: Unable to start debugging. Unexpected GDB output from command "-exec-run".
Reply #3 - Apr 13th, 2023 at 5:27pm
Print Post  
You should see an Attachments section below the Message box where you reply/post, which has a file chooser available to select files on disk.
  
Back to top
 
IP Logged
 
discman
Junior Member
**
Offline


Posts: 27
Joined: Apr 13th, 2023
Re: ESP32-S3: Unable to start debugging. Unexpected GDB output from command "-exec-run".
Reply #4 - Apr 13th, 2023 at 7:11pm
Print Post  
I attached a combined Build, Upload and Debug log file.
Thanks in advance.
  

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


Posts: 2370
Joined: Feb 13th, 2019
Re: ESP32-S3: Unable to start debugging. Unexpected GDB output from command "-exec-run".
Reply #5 - Apr 14th, 2023 at 11:20am
Print Post  
Thanks for the log.

Can you try amending your local board.txt entry to the one in the attached file?

Simply applying the configuration we sent over should automatically download the package from our website and unpack it, when you try to attach the debugger.

If it does not, you can download our copy of OpenOCD from:
https://visualmicro.com/downloads/tools/openocd-esp32-0.10.1-2021.11.11/openocd-...

Then unzip it to "C:\ProgramData\vMicro\tools" and it should then work with the override we provided and no further modifications.
  

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


Posts: 27
Joined: Apr 13th, 2023
Re: ESP32-S3: Unable to start debugging. Unexpected GDB output from command "-exec-run".
Reply #6 - Apr 14th, 2023 at 3:56pm
Print Post  
Thanks for the response.  Unfortunately, Attach to Process still fails with the modification.  Attached is a debug log file combined with my connection/settings.
Thanks.
  

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


Posts: 27
Joined: Apr 13th, 2023
Re: ESP32-S3: Unable to start debugging. Unexpected GDB output from command "-exec-run".
Reply #7 - Apr 24th, 2023 at 4:41am
Print Post  
Simon,

I am still stuck at the same state when trying to “Attach to Process…”.  The output shown in above screenshot are still valid.
Can you please see if you have any suggestion?  I can’t use the S3 with VisualMicro without getting through this.

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


Posts: 2370
Joined: Feb 13th, 2019
Re: ESP32-S3: Unable to start debugging. Unexpected GDB output from command "-exec-run".
Reply #8 - Apr 24th, 2023 at 11:40am
Print Post  
Could you try installing the Espressif Driver for the USB-JTAG device via Device Manager to see if this improves the situation?
https://dl.espressif.com/dl/idf-driver/idf-driver-esp32-usb-jtag-2021-07-15.zip
  
Back to top
 
IP Logged
 
discman
Junior Member
**
Offline


Posts: 27
Joined: Apr 13th, 2023
Re: ESP32-S3: Unable to start debugging. Unexpected GDB output from command "-exec-run".
Reply #9 - Apr 25th, 2023 at 1:40am
Print Post  
Thank you for the reply.

Form the Device Manager, I right-click on the USB/JATG unit (Interface 0) (COM11) port, Then “Update Driver”, “Browse my computer”.   The dialog then indicates “The best driver already installed”.

I then tried “Let me pick from list of available drivers”.  The “Have Disk”, browse to the folder and “OK”.  But here is the message: 
“The folder you specified doesn’t contain a compatible software driver for your device.  If the folder contains a driver, make sure it is designed to work with Windows for x64-based systems.”

So it does not let me install anything.  Any other way to install this driver?
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2370
Joined: Feb 13th, 2019
Re: ESP32-S3: Unable to start debugging. Unexpected GDB output from command "-exec-run".
Reply #10 - Apr 25th, 2023 at 10:12am
Print Post  
Before updating the driver can you change the board.txt entry for the debug path to the one in the attached text file, and add in the extra one? 

This will use the OpenOCD tools that Espressif package with the board package, and lower the speed at which the debugger tries to communicate at.

The driver can be installed via Powershell as shown on the below page, however the above changes may resolve the issue without the need for this:
https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/api-guides/jtag-de...
  

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


Posts: 27
Joined: Apr 13th, 2023
Re: ESP32-S3: Unable to start debugging. Unexpected GDB output from command "-exec-run".
Reply #11 - Apr 25th, 2023 at 11:00pm
Print Post  
Simon,
Thanks for your help again, unfortunately, the same error remains unresolved.  I first changed the board.txt to the following:

debug.toolingsystem=gdbscript
# Use Builtin ESP32S3 OpenOCD Tools instead of vMicro Clones
tools.openocd.debug.path={runtime.tools.openocd-esp32.path}
tools.esps3usb.vmserver.args={params.verbose} -l "{{build.path}/{build.project_name}_DebugOpenOCD.log}" -s "{path}/share/openocd/scripts/" -f "{path}/share/openocd/scripts/interface/{build.openocddebugger}" -c "adapter speed 5000" -c "set ESP32_RTOS none" {initCmd} 
# Ensure the board resets when using Debug > Attach to Process for convenience
vs-cmd.Debug.AttachtoProcess.tools.openocd.initCmd=-c "init; reset halt"


That did not help.  Then I force installed the driver: 
PS C:\Users\Joe\Downloads\idf-driver-esp32-usb-jtag-2021-07-15> Invoke-WebRequest 'https://dl.espressif.com/dl/idf-env/idf-env.exe' -OutFile .\idf-env.exe; .\idf-env.exe driver install --espressif
Downloading https://dl.espressif.com/dl/idf-driver/idf-driver-esp32-usb-jtag-2021-07-15.zip to idf-driver-esp32-usb-jtag-2021-07-15.zip
* extracted: md64/install-filter.exe" (44544 bytes)
* extracted: md64/libusb0.dll" (76384 bytes)
* extracted: md64/libusb0.sys" (52832 bytes)
* extracted: md64/libusb0_x86.dll" (46592 bytes)
* extracted: md64/libusbK.dll" (99128 bytes)
* extracted: md64/libusbK.sys" (47928 bytes)
* extracted: md64/libusbK_x86.dll" (84280 bytes)
* extracted: md64/WdfCoInstaller01011.dll" (1795952 bytes)
* extracted: md64/winusbcoinstaller2.dll" (1002728 bytes)
* extracted: SB_JTAG_debug_unit.cat" (9738 bytes)
* extracted: SB_JTAG_debug_unit.inf" (4642 bytes)
* extracted: 86/install-filter.exe" (46592 bytes)
* extracted: 86/libusb0.dll" (46592 bytes)
* extracted: 86/libusb0.sys" (42592 bytes)
* extracted: 86/libusb0_x86.dll" (67680 bytes)
* extracted: 86/libusbK.dll" (84280 bytes)
* extracted: 86/libusbK.sys" (42552 bytes)
* extracted: 86/WdfCoInstaller01011.dll" (1629040 bytes)
* extracted: 86/winusbcoinstaller2.dll" (851176 bytes)
Requesting elevation of privileges for: C:\Users\Joe\Downloads\idf-driver-esp32-usb-jtag-2021-07-15\idf-env.exe driver install --espressif --no-download
Exit code: 0x2a
PS C:\Users\Joe\Downloads\idf-driver-esp32-usb-jtag-2021-07-15>

Any other idea?
  
Back to top
 
IP Logged
 
discman
Junior Member
**
Offline


Posts: 27
Joined: Apr 13th, 2023
Re: ESP32-S3: Unable to start debugging. Unexpected GDB output from command "-exec-run".
Reply #12 - Jun 26th, 2023 at 9:19pm
Print Post  
After updating to 2023_0507_2203, I tried to see if it could help this previously unresolved problem.  Unfortunately, it did not.

I went through the sequence in the above thread again and the same error persisted.

I’d really want to be able to use Visual Micro hardware debugging for the ESP32-S3.  Can you please help?
Thank you.
« Last Edit: Jun 26th, 2023 at 10:30pm by Tim@Visual Micro »  

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


Posts: 2370
Joined: Feb 13th, 2019
Re: ESP32-S3: Unable to start debugging. Unexpected GDB output from command "-exec-run".
Reply #13 - Jun 30th, 2023 at 8:33am
Print Post  
Thanks for the update and detail.

We have been able to sucessfully get the debugging running on our ESP32-S3 board, with one important wiring change (GPIO3 -> GND).

By default I believe the fuse bits are set on the chip to prefer USB Debugging, and pulling GPIO3 low will allow JTAG debugging via the JTAG pins.

If you run the ESPFuse.exe as shown in the "Check Fuse Bits" section of the below page, and attach the output we will be able to tell you if this is required:
https://www.visualmicro.com/page/ESP32S3-JTAG-Debugging.aspx
  
Back to top
 
IP Logged
 
discman
Junior Member
**
Offline


Posts: 27
Joined: Apr 13th, 2023
Re: ESP32-S3: Unable to start debugging. Unexpected GDB output from command "-exec-run".
Reply #14 - Jun 30th, 2023 at 11:18pm
Print Post  
Hi Simon,
Thanks for your reply. 
I followed the instruction and burned the STRAP efuse.  Here’s the result:
  STRAP_JTAG_SEL (BLOCK0)          Enable selection between usb_to_jtagor pad_to_jtag = True R/W (0b1)  through GPIO3
  DIS_USB_JTAG (BLOCK0)               Disable usb_serial_jtag-to-jtag function   = False R/W (0b0)

However, I now have a more immediate problem Embarrassed.  I’ve inadvertently set the driver for Interface 1 of ESP-PROG to the following (attached).  Now, I cannot reset the driver to recognize Interface 0 again. 

How can I get the required Interface 0 back?
Thanks very much.
« Last Edit: Jul 2nd, 2023 at 6:08pm by discman »  

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


Posts: 2370
Joined: Feb 13th, 2019
Re: ESP32-S3: Unable to start debugging. Unexpected GDB output from command "-exec-run".
Reply #15 - Jul 3rd, 2023 at 9:02am
Print Post  
Thanks for the update and detail.

The driver looks correct for Interface 0 from your images (WinUSB) for using Hardware Debugging.

Interface 1 is the Serial Port passthrough so should end up back on the FTDI Bus Driver.  If you right click the device in Device Manager, and then select Properties > Driver Tab > Rollback Driver, this should restore the previous driver before Zadig was used.
  
Back to top
 
IP Logged
 
Kabron
Full Member
***
Offline


Posts: 170
Joined: Nov 1st, 2015
Re: ESP32-S3: Unable to start debugging. Unexpected GDB output from command "-exec-run".
Reply #16 - Aug 2nd, 2023 at 3:10pm
Print Post  
I have exactly the same error output.
I tryed all above tricks with no luck.
BUT debugging works with platformio and VisualGDB,
so my hardware setup is correct.
Board LILYGO T-Display-S3
« Last Edit: Aug 2nd, 2023 at 3:12pm by Kabron »  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2370
Joined: Feb 13th, 2019
Re: ESP32-S3: Unable to start debugging. Unexpected GDB output from command "-exec-run".
Reply #17 - Aug 10th, 2023 at 2:10pm
Print Post  
We have amended the instructions for using the ESP32S3 with USB Debugging on our page below:
https://www.visualmicro.com/page/ESP32S3-USB-Debugging.aspx

The board.txt entries have changed, and you may also need to pull GPIO3 high before powering the board up to ensure the USB-JTAG debugging is available.

If you continue to have issues with the ESP32S3 USB Debugging please attach the updated logs.
  
Back to top
 
IP Logged
 
discman
Junior Member
**
Offline


Posts: 27
Joined: Apr 13th, 2023
Re: ESP32-S3: Unable to start debugging. Unexpected GDB output from command "-exec-run".
Reply #18 - Aug 15th, 2023 at 12:11am
Print Post  
Simon,
Thanks for the update.  However, I have a Catch-22.  My subscription expired the week before, and I don’t want to renew it without being able to use JTAG debugging.  Perhaps I’m asking for too much, but is there a way to provide me a 5-day trial.  So I may verify your new instruction before I’ll renew my subscription.  Without S3 JTAG debugging, unfortunately, I’d have no use for vMicro. Undecided
Thanks very much.
« Last Edit: Aug 15th, 2023 at 12:12am by discman »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12137
Location: United Kingdom
Joined: Apr 10th, 2010
Re: ESP32-S3: Unable to start debugging. Unexpected GDB output from command "-exec-run".
Reply #19 - Aug 15th, 2023 at 1:01am
Print Post  
You can use your existing license key to re-activate. We have added 10 days from today.
« Last Edit: Aug 15th, 2023 at 1:09am by Tim@Visual Micro »  
Back to top
IP Logged
 
Page Index Toggle Pages: [1] 2 
Send TopicPrint