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 Arduino Debug with Atmel Ice & AS7 (Read 1420 times)
Greybeard
Junior Member
**
Offline


Posts: 24
Joined: Jul 22nd, 2020
Arduino Debug with Atmel Ice & AS7
Jul 23rd, 2020 at 3:21pm
Print Post  
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??
  

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


Posts: 2174
Joined: Feb 13th, 2019
Re: Arduino Debug with Atmel Ice & AS7
Reply #1 - Jul 23rd, 2020 at 4:34pm
Print Post  
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
Joined: Jul 22nd, 2020
Re: Arduino Debug with Atmel Ice & AS7
Reply #2 - Jul 23rd, 2020 at 9:45pm
Print Post  
That simple -- Works. Thanks.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint