Welcome, Guest. Please Login or Register
Arduino IDE for Visual Studio
 
 
When Logging a Support Issue in the Forum, please ensure you have also:-
  • Enabled vMicro > Compiler > Show Build Properties and Verbose
  • 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
 
  HomeSearch Tutorials & Wiki visualmicro.com LoginHelpRegister  
 
Page Index Toggle Pages: 1
Send Topic Print
Arduino Debug with Atmel Ice & AS7 (Read 72 times)
Greybeard
Junior Member
**
Offline



Posts: 24
Arduino Debug with Atmel Ice & AS7
Jul 23rd, 2020 at 4:21pm
 
I want to use Atmel Icee with Atmel Studio 7 and debug an existing arduino application.   I did not seen any way to open an existing .ino file and create an arduino project.  Please let me know what I miss. 

So....I went to the doc 'visualmicro.com/page/Arduino-for-Atmel-Studio-7.aspx' and tried to follow that.

The test file is a simple blink example with a counter added.

Step 1:  Create a new arduino project named Blink.

Step 2:  Rename the arduino example 'blink.ino' to 'blink.cpp' and copy it to the folder created in step 1.

Step 3:  Set up the project for hardware debugging.  Screen shots attached.

Step 4:   Remove the contents of blink.ino created above but retain the file.

When I select Debug->Start Debugging and Break, the program compiles properly but does not load to the DUE target.

Note that vMicro->Atmel Studio Debugging is not enabled.

When I check vMicro->Atmel Studio Debugging I get the same behavior, but I think this is normal.   I can go to Tools->Device Programming and upload the file using Atmel Ice.  After uploading, I can use Debug->Attach to Process and the debugger will break into the code at an assembler location.  Unfortunately, all of the start  up code is missed and I cannot restart the program (read I don't know how).

Suggestions??
Back to top
 

Please Register or Login to the Forum to see File Attachments
 
IP Logged
 
Simon Hopkinson
Administrator
*****
Offline



Posts: 356
Re: Arduino Debug with Atmel Ice & AS7
Reply #1 - Jul 23rd, 2020 at 5:34pm
 
To use the upload via the ICE, the vMicro > Upload > Programmer should be set to "Atmel Studio Device Programming", which will hand over the upload to the standard Atmel Studio tools. The upload can be done via Serial if you want to preserve the bootloader, by setting the programmer to "No Programmer", and selecting the COM port.

For the Debugger, ensure the vMicro > Debugger > Atmel studio Debugger is ON.  Then (as shown in the PDF) set the Tool properties for the Atmel ICE.

The Debug > Start debugging and break command should work and land at the start of setup(), once the Upload options, and Debug options are configured

An example can be seen in the below video snippet (I use the Serial Upload as will use board in VS later).
GDB in AS7 Using Atmel ICE with Serial Upload

Does that clarify how to break into setup() via GDB?
Back to top
 
 
IP Logged
 
Greybeard
Junior Member
**
Offline



Posts: 24
Re: Arduino Debug with Atmel Ice & AS7
Reply #2 - Jul 23rd, 2020 at 10:45pm
 
That simple -- Works. Thanks.
Back to top
 
 
IP Logged
 
Page Index Toggle Pages: 1
Send Topic Print