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) Atmel Debugger with Arduino (Read 6558 times)
Chuck95
Junior Member
**
Offline


Posts: 10
Joined: Jul 6th, 2019
Atmel Debugger with Arduino
Jul 6th, 2019 at 9:58pm
Print Post  
I am confused as to how to actually initiate debugging with the arduino in Atmel Studio. When I start debugging via the F5 key it forces me to choose the simulator tool and does not load anything on to the arduino. Any break points I place in my code are ignored. 

Is there a way to select the arduino/USB interface as my programming option for debugging or do I have to use the micro project tool banner for debugging instead? I am using Version 7.0.1931 for Atmel Studio and Version 1905.29.0 for VisualMicro. I am using an arduino Mega Rev3 with the ATemga2560 chip.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12070
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Atmel Debugger with Arduino
Reply #1 - Jul 6th, 2019 at 10:52pm
Print Post  
Please try this test

With an empty IDE, click File>New>Project>Arduino Sketch

Then follow the relevant parts of the guide in red on our atmel studio page to see if you can start atmel studio debugging.

+ It is optional to use standard usb or atmel studio for the actual upload. To use standard arduino usb upload ignore the point about selecting the "use atmel studio device programming" as the arduino programmer.

The main point is to ensure "vMicro>Debugger>Use atmel studio debugging" is enabled and that we are using an 8 bit project and not a 32 bit project.
« Last Edit: Jul 6th, 2019 at 10:53pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Chuck95
Junior Member
**
Offline


Posts: 10
Joined: Jul 6th, 2019
Re: Atmel Debugger with Arduino
Reply #2 - Jul 7th, 2019 at 5:00pm
Print Post  
How do I create a project_name.cpp that overrides the .ino file when using advanced mode for debugging? I tried adding a new .cpp item to the project but it gives me the following compiling errors:
recipe for target 'Sketch1.o' failed
=arduino.h: No such file or directory

When I do not include the .cpp file I get the following compiling errors:
recipe for target 'Sketch1.elf' failed
Id returned 1 exit status
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12070
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Atmel Debugger with Arduino
Reply #3 - Jul 7th, 2019 at 5:04pm
Print Post  
Your would need to post the full output you see but that documentation is supposed to have been removed. You no longer need the sketch_name.cpp alongside an empty sketch_name.ino.

You can use one or more .ino files as normal for Arduino projects. Obviously other cpp files are ok too.

EDIT: By the way there is an update for visual micro in atmel studio 7 in the releases section of this forum.
« Last Edit: Jul 7th, 2019 at 5:05pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Chuck95
Junior Member
**
Offline


Posts: 10
Joined: Jul 6th, 2019
Re: Atmel Debugger with Arduino
Reply #4 - Jul 7th, 2019 at 5:33pm
Print Post  
I have updated my visual micro to the latest version via the VSIX installer (1906.12.0) and started a new project from scratch. 

First it shows me this error (see attached error1.jpg). I click yes and then it gives me a regular .ino file with the blank setup and loop blocks. I make sure the 'Atmel Studio Debugger' is checked under vMicro tab and plug in my Mega. 

I then click the debug button (F5) and it throws my the following compiler error with no other output (see error2.jpg).
  

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


Posts: 12070
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Atmel Debugger with Arduino
Reply #5 - Jul 7th, 2019 at 5:40pm
Print Post  
Hi,

The first Error is not an error. It is a prompt telling you that atmel studio has added files that are not valid for an arduino project and asking if you want them removed.

If you did not click yes to the first "Error" then you must remove the files manually. You need to ensure you delete them from the project folder not just remove them from the project. 

The 2nd error can only be understood by following guide in yellow at the top of this page so that we can see the verbose build output and also your build properties. It's important to first confirm that compile upload is working using the vMicro menu and then see if the same works using "Debug>Start without debugging"

  
Back to top
WWW  
IP Logged
 
Chuck95
Junior Member
**
Offline


Posts: 10
Joined: Jul 6th, 2019
Re: Atmel Debugger with Arduino
Reply #6 - Jul 7th, 2019 at 6:08pm
Print Post  
Here is the output with the proper compiler settings turned on (see attached).  The same errors were thrown when I tried "Start without debugging"; however, it was able to compile and upload to the mega via the "build and upload" button under the vMicro tab.
  

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


Posts: 12070
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Atmel Debugger with Arduino
Reply #7 - Jul 7th, 2019 at 6:12pm
Print Post  
For some reason Visual Micro isn't trying to override the debug menu events. Therefore you see atmel trying to do a normal build which it won;t be able to do.

Please use the vMicro menu to compile and upload and then post the output with the settings shown in the yellow box above enabled.
« Last Edit: Jul 7th, 2019 at 6:12pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Chuck95
Junior Member
**
Offline


Posts: 10
Joined: Jul 6th, 2019
Re: Atmel Debugger with Arduino
Reply #8 - Jul 7th, 2019 at 6:17pm
Print Post  
Here is the output from the vMicro build.
  

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


Posts: 12070
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Atmel Debugger with Arduino
Reply #9 - Jul 7th, 2019 at 6:18pm
Print Post  
You could try clicking "build>configuration Manager" and un-checking the "Build" option for the project. This will prevent AS7 from trying to build and we might then see there is a more obvious error in the "Micro Build" output window.
  
Back to top
WWW  
IP Logged
 
Chuck95
Junior Member
**
Offline


Posts: 10
Joined: Jul 6th, 2019
Re: Atmel Debugger with Arduino
Reply #10 - Jul 7th, 2019 at 6:22pm
Print Post  
The option was already un-checked when I opened the configuration manager.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12070
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Atmel Debugger with Arduino
Reply #11 - Jul 7th, 2019 at 6:26pm
Print Post  
Okay when you see the atmel error please use the drop down list above the output window to select "Micro Build" and then post the output you see, if any.
  
Back to top
WWW  
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12070
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Atmel Debugger with Arduino
Reply #12 - Jul 7th, 2019 at 6:28pm
Print Post  
Ah I read what version you has installed. That's the gallery version. The one I mentioned is in the releases section of this forum. See the links in the RELEASE thread at the top of this list

https://www.visualmicro.com/forums/YaBB.pl?board=VS_ARDUINO_EXT_RELEASES
  
Back to top
WWW  
IP Logged
 
Chuck95
Junior Member
**
Offline


Posts: 10
Joined: Jul 6th, 2019
Re: Atmel Debugger with Arduino
Reply #13 - Jul 7th, 2019 at 6:33pm
Print Post  
There is no output in Micro Build when atmel error appears after initiating debugging procedure.

EDIT: What does gallery version imply and which version should I use then? Do I just open the .VSIX file in Atmel studio?
« Last Edit: Jul 7th, 2019 at 6:38pm by Chuck95 »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12070
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Atmel Debugger with Arduino
Reply #14 - Jul 7th, 2019 at 6:45pm
Print Post  
It's all the same system. Microsoft have the .vsix format and they run their vsixinstaller.exe to install extensions.

The forum version is simply more up to date. It takes a while for atmel to press the publish button on new releases in the gallery so the forum can be more responsive.

You should run the vsix you downloaded from the forum. They are actually just zip files with .vsix extension Smiley
  
Back to top
WWW  
IP Logged
 
Chuck95
Junior Member
**
Offline


Posts: 10
Joined: Jul 6th, 2019
Re: Atmel Debugger with Arduino
Reply #15 - Jul 7th, 2019 at 6:54pm
Print Post  
Ok so new version is downloaded and no more compiling errors! But now it is prompting me to select a programming tool and I just want to use the USB interface. How is this done?

EDIT: So now I am back to the same problem I was having before which is that it is prompting me to connect to a debugger/programmer and does not give me an option to use the USB interface.
« Last Edit: Jul 7th, 2019 at 7:06pm by Chuck95 »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12070
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Atmel Debugger with Arduino
Reply #16 - Jul 7th, 2019 at 8:46pm
Print Post  
Do you want to use atmel hardware debugging or the Visual Micro serial debugging? Do you have an atmel hardware debugger?
« Last Edit: Jul 7th, 2019 at 8:47pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Chuck95
Junior Member
**
Offline


Posts: 10
Joined: Jul 6th, 2019
Re: Atmel Debugger with Arduino
Reply #17 - Jul 7th, 2019 at 10:53pm
Print Post  
I do not have an external programmer so I would like to use whatever method allows me to use the USB programmer built in to the arduino.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12070
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Atmel Debugger with Arduino
Reply #18 - Jul 7th, 2019 at 10:56pm
Print Post  
The default settings for visual micro provided usb debugging. You only had to switch the tool bar between release and debug to enable or disable the usb debugger.

Documentation index link is at the top of visualmicro.com

Atmel have their own debug system which as you have seen is more complex but in some ways more powerful.
« Last Edit: Jul 7th, 2019 at 10:57pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Chuck95
Junior Member
**
Offline


Posts: 10
Joined: Jul 6th, 2019
Re: Atmel Debugger with Arduino
Reply #19 - Jul 7th, 2019 at 11:14pm
Print Post  
Ok I have gotten it to debug properly now. Thank you for the help!
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint