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
Hot Topic (More than 8 Replies) Debug Arduino Nano AVR with GDB Stub (Read 3868 times)
GazNewCode
Junior Member
**
Offline


Posts: 11
Joined: May 8th, 2023
Debug Arduino Nano AVR with GDB Stub
May 9th, 2023 at 1:07pm
Print Post  
Good Morning,
I followed the procedure of the following link:

https://www.visualmicro.com/page/AVR-Debugging.aspx

with Arduino Uno debugging works, while if I use Arduino Nano I get a ser-open() error.
The serial works because I can transfer the project.

Can you tell me what's wrong...?
  

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


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Debug Arduino Nano AVR with GDB Stub
Reply #1 - May 9th, 2023 at 1:09pm
Print Post  
The error shows that the project is not transfered. If ou drop the port list down whatCOM ports are listed?
  
Back to top
IP Logged
 
GazNewCode
Junior Member
**
Offline


Posts: 11
Joined: May 8th, 2023
Re: Debug Arduino Nano AVR with GDB Stub
Reply #2 - May 9th, 2023 at 1:20pm
Print Post  
Here is the port list
  

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


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Debug Arduino Nano AVR with GDB Stub
Reply #3 - May 9th, 2023 at 1:22pm
Print Post  
We need to see the ports list in visual micro. Please click the list that shows COM5.

We also need the information shown in yellow at the top of the page. In addition to the information in yellow, it's a good idea to also switch on vMicro>Uploader>Verbose

Thanks
« Last Edit: May 9th, 2023 at 1:30pm by Tim@Visual Micro »  
Back to top
IP Logged
 
GazNewCode
Junior Member
**
Offline


Posts: 11
Joined: May 8th, 2023
Re: Debug Arduino Nano AVR with GDB Stub
Reply #4 - May 9th, 2023 at 1:25pm
Print Post  
This list ports...?
  

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


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Debug Arduino Nano AVR with GDB Stub
Reply #5 - May 9th, 2023 at 1:30pm
Print Post  
Thanks, for information, you can see the same list by clicking COm5 on the main tool bar area.


Probable solution

The port is potentially in use and locked. If you previously used GDB Stub debug, then maybe visual studio has not closed the gdb.exe. It is responsible for opening the port. If you can see the avr gdb exe in process manager then kill it. 

f windows has become confused and is preventing both visual micro and avr gdb from accessing the port then restarting the pc will probably solve the issue. 

If this is wrong then please give the information request above.
« Last Edit: May 9th, 2023 at 1:31pm by Tim@Visual Micro »  
Back to top
IP Logged
 
GazNewCode
Junior Member
**
Offline


Posts: 11
Joined: May 8th, 2023
Re: Debug Arduino Nano AVR with GDB Stub
Reply #6 - May 9th, 2023 at 1:45pm
Print Post  
I confirm that it was a blocked port problem, but now this popup comes out.
  

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


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Debug Arduino Nano AVR with GDB Stub
Reply #7 - May 9th, 2023 at 2:28pm
Print Post  
That is gdb refusing to start because of a port issue. Make sure the serial monitor is not open, you can not use both serial and gdb stub.

For further assistance, post the information requested at the top of this page in yellow.
  
Back to top
IP Logged
 
GazNewCode
Junior Member
**
Offline


Posts: 11
Joined: May 8th, 2023
Re: Debug Arduino Nano AVR with GDB Stub
Reply #8 - May 9th, 2023 at 2:54pm
Print Post  
I confirm that the serial is not used, I had read the documentation that mentioned this aspect.

I'm sorry but I don't understand what information you need (in above in yellow) could you explain better...?

  
Back to top
 
IP Logged
 
GazNewCode
Junior Member
**
Offline


Posts: 11
Joined: May 8th, 2023
Re: Debug Arduino Nano AVR with GDB Stub
Reply #9 - May 9th, 2023 at 2:59pm
Print Post  
Maybe you mean this information...?
  

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


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Debug Arduino Nano AVR with GDB Stub
Reply #10 - May 9th, 2023 at 3:09pm
Print Post  
Please don't show any more images. The yellow box at the top of this page shows how to enable "vMicro>Compiler>Show properties" and also verbose that you have already enabled.

After enabling those options make a build and then copy the output text from the build into a .txt file. attach or email the file as per the instructions in yellow at the top of this page.
  
Back to top
IP Logged
 
GazNewCode
Junior Member
**
Offline


Posts: 11
Joined: May 8th, 2023
Re: Debug Arduino Nano AVR with GDB Stub
Reply #11 - May 9th, 2023 at 3:18pm
Print Post  
Ok...I sent an email with the specific requests
« Last Edit: May 9th, 2023 at 3:19pm by GazNewCode »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Debug Arduino Nano AVR with GDB Stub
Reply #12 - May 9th, 2023 at 3:31pm
Print Post  
It is possible the gdb stub does not support the nano. You said that it worked for Uno?

You can use the visual micro serial debugger as alternative.
« Last Edit: May 9th, 2023 at 3:31pm by Tim@Visual Micro »  
Back to top
IP Logged
 
GazNewCode
Junior Member
**
Offline


Posts: 11
Joined: May 8th, 2023
Re: Debug Arduino Nano AVR with GDB Stub
Reply #13 - May 9th, 2023 at 3:38pm
Print Post  
Let's say I bought Visual Micro mainly for the possibility of using breakpoints.
Can you give me a link where I can see the use of the micro serial debugger...?

in this link it says Arduino nano is compatible
https://github.com/jdolinay/avr_debug
« Last Edit: May 9th, 2023 at 3:40pm by GazNewCode »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Debug Arduino Nano AVR with GDB Stub
Reply #14 - May 9th, 2023 at 3:43pm
Print Post  
We will try the Nano and maybe ask you for some debug diagnostic log. If you switch on the Uploader>Verbose and provide the output again after uploading we will be able to see that the com port is okay. It is visual studio that launches the gdb stub therefore it takes a bit more work to diagnose connection issues. 

The gdb stub might be objecting to the old bootloader you said you have on the nano

Yes, the documentation is always available from the Docs link at the top of our web site. The Docs link takes you to this page https://www.visualmicro.com/page/User-Guide.aspx

Visual Micro can only provide the hardware debug features that are available for each type of hardware.  

When you enabled Hardware debug, you will have seen Serial in the same list. The Serial debugger is not as capable as gdb but it is a useful alternative.
« Last Edit: May 9th, 2023 at 3:49pm by Tim@Visual Micro »  
Back to top
IP Logged
 
GazNewCode
Junior Member
**
Offline


Posts: 11
Joined: May 8th, 2023
Re: Debug Arduino Nano AVR with GDB Stub
Reply #15 - May 9th, 2023 at 4:00pm
Print Post  
I sent you the output file with Uploader -->Verbose checked.
The Bootloader has been updated because I thought that was the problem
« Last Edit: May 9th, 2023 at 4:01pm by GazNewCode »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Debug Arduino Nano AVR with GDB Stub
Reply #16 - May 9th, 2023 at 4:08pm
Print Post  
Thanks we will look over the next few days. If you switch back to Uno does gdb stub still work for debug?
  
Back to top
IP Logged
 
GazNewCode
Junior Member
**
Offline


Posts: 11
Joined: May 8th, 2023
Re: Debug Arduino Nano AVR with GDB Stub
Reply #17 - May 9th, 2023 at 4:15pm
Print Post  
I confirm that with Arduino Uno the gdb stub works, I tried it now.
I await your news, thank you for the technical support
« Last Edit: May 9th, 2023 at 4:17pm by GazNewCode »  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2441
Joined: Feb 13th, 2019
Re: Debug Arduino Nano AVR with GDB Stub
Reply #18 - May 9th, 2023 at 4:39pm
Print Post  
GazNewCode wrote on May 9th, 2023 at 4:00pm:
I sent you the output file with Uploader -->Verbose checked.
The Bootloader has been updated because I thought that was the problem


Can you confirm which bootloader you have flashed onto your Nano?
  
Back to top
IP Logged
 
GazNewCode
Junior Member
**
Offline


Posts: 11
Joined: May 8th, 2023
Re: Debug Arduino Nano AVR with GDB Stub
Reply #19 - May 9th, 2023 at 5:01pm
Print Post  
I updated the old bootloader with the following Optiboot_ATmega328.hex bootloader
I remain at your disposal
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: [1] 2 
Send TopicPrint