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
Very Hot Topic (More than 25 Replies) Unable to program/debug: Atmel-ICE + Adafruit Metro M4 (Read 6699 times)
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2370
Joined: Feb 13th, 2019
Re: Unable to program/debug: Atmel-ICE + Adafruit Metro M4
Reply #20 - Feb 14th, 2023 at 1:43pm
Print Post  
Thanks for confirming.

The debugging should be running through the Atmel ICE, only the upload should happen through the Serial Port.

If you enable all the below settings, and then perform the actions again it should show all information to confirm this is the case.

  • vMicro > Compiler > Verbose
  • vMicro > Compiler > Show Build Properties
  • vMicro > Uploader > Verbose
  
Back to top
 
IP Logged
 
Xinyu Tan
Junior Member
**
Offline


Posts: 16
Joined: Jan 18th, 2023
Re: Unable to program/debug: Atmel-ICE + Adafruit Metro M4
Reply #21 - Feb 15th, 2023 at 7:59am
Print Post  
Here attached please find the micro build output log.
  

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: Unable to program/debug: Atmel-ICE + Adafruit Metro M4
Reply #22 - Feb 15th, 2023 at 9:17am
Print Post  
Thanks for the logs, these show the Atmel ICE is definitely in use for Debugging.

We just wanted to be sure before we fold the solution into the software for release, we will update this thread when it is available.
  
Back to top
 
IP Logged
 
Xinyu Tan
Junior Member
**
Offline


Posts: 16
Joined: Jan 18th, 2023
Re: Unable to program/debug: Atmel-ICE + Adafruit Metro M4
Reply #23 - Feb 15th, 2023 at 9:20am
Print Post  
But why the debugging session was not started?

BTW, I use VS2022 instead of Microchip studio.
« Last Edit: Feb 15th, 2023 at 9:21am by Xinyu Tan »  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2370
Joined: Feb 13th, 2019
Re: Unable to program/debug: Atmel-ICE + Adafruit Metro M4
Reply #24 - Feb 15th, 2023 at 9:48am
Print Post  
Are you pressing the vMicro > Build & Upload button?

Or the VS > Debug > Start Debugging button?
  
Back to top
 
IP Logged
 
Xinyu Tan
Junior Member
**
Offline


Posts: 16
Joined: Jan 18th, 2023
Re: Unable to program/debug: Atmel-ICE + Adafruit Metro M4
Reply #25 - Feb 15th, 2023 at 10:32am
Print Post  
The vMicro>build&upload button did not start debugging session at all.
And VS>Debug>StartDebugging button starts debugging session using serial port.

The first attachment shows the debug config before pressing any button. And after pressing vMicro build&upload button, the debug menu shows the same.   

The second one shows after pressing VS->start debugging button.
  

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: Unable to program/debug: Atmel-ICE + Adafruit Metro M4
Reply #26 - Feb 15th, 2023 at 10:40am
Print Post  
Thanks for confirming, the debugging session is not running through Serial, it is running through the Atmel ICE probe for clarity.

The Build & Upload Button only begins a debugging session when the Debug setting is set to "Serial", but does not when using the "Hardware" debuggers. 

To start a debugging session with a Hardware Debugger, you can use:
VS > Debug > Start Debugging  (which will perform the Build & Upload, and then Attach the Debugger)
VS > Debug > Attach to Process (which assumes the code is already uploaded, and just Attaches the Debugger)

We will investigate why the menu options are enabled after pressing Debug > Start Debugging as this is incorrect.  In both scenarios it should look as it does on your first screenshot.
  
Back to top
 
IP Logged
 
Xinyu Tan
Junior Member
**
Offline


Posts: 16
Joined: Jan 18th, 2023
Re: Unable to program/debug: Atmel-ICE + Adafruit Metro M4
Reply #27 - Feb 15th, 2023 at 10:46am
Print Post  
I used VS > Debug > Start Debugging/ Attach to Process.
It started a SERIAL debugging session, and the serial monitor appeared.

I guess the debugging options no longer grayed-out is because the vMicro thinks it uses serial debugger instead of hardware.
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2370
Joined: Feb 13th, 2019
Re: Unable to program/debug: Atmel-ICE + Adafruit Metro M4
Reply #28 - Feb 15th, 2023 at 10:52am
Print Post  
Can you send a screenshot of the whole IDE when this happens?

The Serial monitor can open for a Hardware Debugging session depending on if it was open the last time the debugging session was running, and also based on the vMicro > Uploader > Auto Open Serial Monitor.
  
Back to top
 
IP Logged
 
Xinyu Tan
Junior Member
**
Offline


Posts: 16
Joined: Jan 18th, 2023
Re: Unable to program/debug: Atmel-ICE + Adafruit Metro M4
Reply #29 - Feb 15th, 2023 at 11:02am
Print Post  
I restarted VS2022 and the debugging session starts as it should be.

However, the debugging options are still all enabled as in my previously posted picture 2.

Nevertheless, I am fine with it. Grin Grin
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1 [2] 
Send TopicPrint