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 Send TopicPrint
Normal Topic Unable to start debugging. Unexpected GDB output from command (Read 7505 times)
Arnaud
Newbies
*
Offline


Posts: 7
Joined: May 23rd, 2020
Unable to start debugging. Unexpected GDB output from command
May 24th, 2020 at 3:01am
Print Post  
It looks like I have another problem now.

When I try to run the debugger, I get the following message box from Microsoft Visual Studio:

"Unable to start debugging. Unexpected GDB output from command "-exec-run". Don't know how to run. Try "help target".

The Debug log is very short but I am attaching it as a zip file.

It basically ends with : The program '' has exited with code 42 (0x2a).

Not sure why there is some packet error. I checked the link with my board on COM7 and everything is ok.

Not sure why it does not recognize the program name and just has a couple of empty quotes there.

I have tried multiple times and always get the same error.

Please let me know if you need anything additional from me. Thanks.
« Last Edit: May 24th, 2020 at 1:26pm by Tim@Visual Micro »  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Arnaud
Newbies
*
Offline


Posts: 7
Joined: May 23rd, 2020
Re: Unable to start debugging. Unexpected GDB output from command
Reply #1 - May 25th, 2020 at 11:08am
Print Post  
Thanks for splitting the issue and moving it here. Fingers crossed we can get resolution on this issue and I can test the full power of the inline debugger! Smiley
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2174
Joined: Feb 13th, 2019
Re: Unable to start debugging. Unexpected GDB output from command
Reply #2 - May 26th, 2020 at 3:31pm
Print Post  
This error can occur for a variety of reasons, and basically means it cannot connect.  If the Code Uploads OK then the Serial Comms must be fine, and this is all that is used with GDBStub.

Have you included the Stub header, and additional setup() code? (ESP8266 GDBStub Page)
Have you Reset the board since code upload to ensure it is runtime mode instead of boot loader mode, before attaching the debugger?

If you still have issues, would it be possible to attach the full build output with the verbose properties as shown at the top, and ideally a minimal copy of the sketch you are having issues with?
  
Back to top
 
IP Logged
 
Arnaud
Newbies
*
Offline


Posts: 7
Joined: May 23rd, 2020
Re: Unable to start debugging. Unexpected GDB output from command
Reply #3 - May 26th, 2020 at 11:11pm
Print Post  
Hi Simon,

Thank you for your suggestions. Yes, I had followed that page and included the relevant header and additional set-up code.

Based on your comment about not being able to connect, I reviewed my code and then realized that I still had a call to Serial.begin() in my sketch. So that explains why it could not connect since the serial had been opened by the sketch and therefore could not be used by the debugger.

I then proceeded to bracketing this with the usual #ifndef _DEBUG / #endif calls. It got passed the previous error but then I got a message from VS2019 that the VM addin was stuck and that it was stopping it. I tried again and had the same error. I tried building / rebuilding & upload then debug but still had the same problem.

I then decided to simply comment out the Serial.begin() call instead of bracketing it with #ifndef/#endif just to try it out and it now works and the VM addin is not hanging anymore and it now works! So it looks like that bracketing the serial.begin call hangs the system for some reason and it needs to be commented out altogether.

I am stoked about that!  Cool

Now one thing I did notice is that I have run the debug process twice for it to run properly. The first time around I get some "SIGILL" error message, I am not sure why. I will keep monitoring and reporting back if this persists. Maybe I will open another topic if it keeps happening.

As for this issue, I think you can mark it as SOLVED, and I am going to start learning to play around with the debugger.

Thanks for your help!
« Last Edit: May 26th, 2020 at 11:12pm by Arnaud »  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint