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
Hot Topic (More than 8 Replies) (MKRWifi1010) Re: Unable to start debugging. Unable to establish a connection to GDB (Read 3097 times)
PavlosA
Newbies
*
Offline


Posts: 9
Joined: Jun 8th, 2022
(MKRWifi1010) Re: Unable to start debugging. Unable to establish a connection to GDB
Jan 18th, 2023 at 11:11pm
Print Post  
Hi,

Same problem, different processor.

I'm using a SAMD21G18A with an Atmel-ICE.

I can upload using the ICE, but can't debug.

I receive the "Unable to establish a connection to gdb" message.

I'd also like to note that Microchip Studio works fine for both uploading / debugging using the exact same hardware.

Thanks in advance.

Screen Shot:

https://1drv.ms/u/s!AkoVqK8Kx0wfjOMI6Rg5vSbEs_d-YQe=LBJL7H

Attached is the OpenOCD log file.

Paul

« Last Edit: Jan 19th, 2023 at 9:47am by Simon@Visual Micro »  

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


Posts: 9
Joined: Jun 8th, 2022
(MKRWifi1010) Re: Unable to start debugging. Unable to establish a connection to GDB
Reply #1 - Jan 18th, 2023 at 11:30pm
Print Post  
Sorry, I'm having trouble with attachments.

Here's the Build Output file.
« Last Edit: Jan 19th, 2023 at 9:45am by Simon@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: (MKRWifi1010) Unable to start debugging. Unable to establish a connection to GDB
Reply #2 - Jan 19th, 2023 at 9:56am
Print Post  
Thanks for the report and the information.

Can you enable the verbose and show build properties options as shown at the top of the page, and attach the full build output after building again?
  
Back to top
 
IP Logged
 
PavlosA
Newbies
*
Offline


Posts: 9
Joined: Jun 8th, 2022
Re: (MKRWifi1010) Unable to start debugging. Unable to establish a connection to GDB
Reply #3 - Jan 19th, 2023 at 6:00pm
Print Post  
Attached.

Weird, all those options were already on.

thanks!
  

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: (MKRWifi1010) Unable to start debugging. Unable to establish a connection to GDB
Reply #4 - Jan 20th, 2023 at 12:03pm
Print Post  
Thanks for the logs, could you also attach the log from the below location (after trying Debug > Attach to Process)?
Code
Select All
ketch2.ino_DebugOpenOCD.log 



I can see some differences between the upload and debug commands which may require changing, but the above log will show where OpenOCD is falling over hopefully.
  
Back to top
 
IP Logged
 
PavlosA
Newbies
*
Offline


Posts: 9
Joined: Jun 8th, 2022
Re: (MKRWifi1010) Unable to start debugging. Unable to establish a connection to GDB
Reply #5 - Jan 20th, 2023 at 4:39pm
Print Post  
Here it is, Thanks!
  

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


Posts: 9
Joined: Jun 8th, 2022
Re: (MKRWifi1010) Unable to start debugging. Unable to establish a connection to GDB
Reply #6 - Jan 26th, 2023 at 2:47am
Print Post  
Hi - I was just wondering if anyone had any comment on this, it appears to be some kind of configuration issue.

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


Posts: 12137
Location: United Kingdom
Joined: Apr 10th, 2010
Re: (MKRWifi1010) Unable to start debugging. Unable to establish a connection to GDB
Reply #7 - Jan 26th, 2023 at 1:34pm
Print Post  
Sorry for the delay. We are reduced staff this week. Simon will continue this thread next week.
  
Back to top
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2370
Joined: Feb 13th, 2019
Re: (MKRWifi1010) Unable to start debugging. Unable to establish a connection to GDB
Reply #8 - Jan 30th, 2023 at 5:45pm
Print Post  
If you add a local board.txt to your project (vMicro > Add Code > Add Local board.txt), and paste in the below line this should work as expected:
tools.atmelICE.vmserver.scriptPath=-s "{path}/scripts/"
  
Back to top
 
IP Logged
 
PavlosA
Newbies
*
Offline


Posts: 9
Joined: Jun 8th, 2022
Re: (MKRWifi1010) Unable to start debugging. Unable to establish a connection to GDB
Reply #9 - Jan 30th, 2023 at 7:15pm
Print Post  
Thank you Simon, but this doesn't seem to work, acting precisely the same way as before:  upload works, but attach to process warns: "Unable to establish a connection to gdb"

I've attached the board.txt file that I got working by adding two lines.  I doubt it's the "correct" fix but it is working for me at the moment.

Thanks!
« Last Edit: Jan 30th, 2023 at 7:38pm by PavlosA »  

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: (MKRWifi1010) Unable to start debugging. Unable to establish a connection to GDB
Reply #10 - Jan 31st, 2023 at 9:17am
Print Post  
Thanks for the update and the detail on the solution.

Does it work with just the first line of your board.txt? 
(I only ask as the config file from the board package issues the other commands so it should just be a case of it finding the scripts folder to then locate the interface/target scripts)
  
Back to top
 
IP Logged
 
PavlosA
Newbies
*
Offline


Posts: 9
Joined: Jun 8th, 2022
Re: (MKRWifi1010) Unable to start debugging. Unable to establish a connection to GDB
Reply #11 - Feb 3rd, 2023 at 6:04pm
Print Post  
Hi Simon,

I can verify that this does NOT work if I remove the second line.

It has the same issue with gdb "unable to establish a connection".

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


Posts: 2370
Joined: Feb 13th, 2019
Re: (MKRWifi1010) Unable to start debugging. Unable to establish a connection to GDB
Reply #12 - Feb 3rd, 2023 at 7:44pm
Print Post  
Thanks for confirming, we will review the lines provided and amend as needed.

We will update this thread when the fix is available.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint