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) No serial debug ouput with Atmel Studio (Read 2750 times)
Greybeard
Junior Member
**
Offline


Posts: 24
Joined: Jul 22nd, 2020
No serial debug ouput with Atmel Studio
Jul 22nd, 2020 at 9:23pm
Print Post  
Working with vMicro on AS7.  I thought I had this working yesterday but poorly.   Anyway.   I have a basis blinky program with a counter for test purposes.  Right now I am trying to verify seial debug will work.  The program seems to upload to the Arduino Due but doesn't hit breakpoints nor does it provide  output to the output screen or to the expression screen. 

I looked for a log file but didn't find one. Does AS7 uses a different down loader??

Screen shots and compile output attached.
  

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


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: No serial debug ouput with Atmel Studio
Reply #1 - Jul 22nd, 2020 at 9:34pm
Print Post  
Thanks for the info.

1) Does your own code use the Serial? If so at what speed?

2) Is the DTR checkbox on the serial monitor enabled?

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


Posts: 24
Joined: Jul 22nd, 2020
Re: No serial debug ouput with Atmel Studio
Reply #2 - Jul 22nd, 2020 at 10:05pm
Print Post  
I used vMicro->Explorer to import an arduino example blink project for debug trial purposes. It does not use the serial port nor is there any way  or any reason to to set the DTR.

I am attempting to get vMicro serial debug working with Atmel Studio 7.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: No serial debug ouput with Atmel Studio
Reply #3 - Jul 22nd, 2020 at 10:25pm
Print Post  
The DTR checkbox/button is on the status bar of the Serial Monitor. After you build/upload, when debug is enabled, the serial monitor should open. Does that happen?

No. 2 in the picture.

« Last Edit: Jul 22nd, 2020 at 10:27pm by Tim@Visual Micro »  

Please Register or Login to the Forum to see File Attachments
Back to top
WWW  
IP Logged
 
Greybeard
Junior Member
**
Offline


Posts: 24
Joined: Jul 22nd, 2020
Re: No serial debug ouput with Atmel Studio
Reply #4 - Jul 22nd, 2020 at 11:04pm
Print Post  
Ok.  I understand.  The Screen serial screen pops up.. Says
Opening Port
Port open

The Expression screen comes up with some instruction but nothing changes.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: No serial debug ouput with Atmel Studio
Reply #5 - Jul 22nd, 2020 at 11:08pm
Print Post  
Does the output window change to "Micro Trace" and say "Debug started"?

Is the breakpoint called once in setup() or multiple times in or via the loop()?

Is the breakpoint on a simple code line of an "if"?
  
Back to top
WWW  
IP Logged
 
Greybeard
Junior Member
**
Offline


Posts: 24
Joined: Jul 22nd, 2020
Re: No serial debug ouput with Atmel Studio
Reply #6 - Jul 22nd, 2020 at 11:16pm
Print Post  
Never get the message Debug Started.   
The break point is set on a'digitalWrite' with a condition of hit count >=1 and an option to break and print counter value, eg $FUNCTON n = {n}
Here's the code 
void loop() {
     n++;
  digitalWrite(LED_BUILTIN, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1500);                       // wait for a second
  digitalWrite(LED_BUILTIN, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);                       // wait for a second
}

break point is on the second digitalWrite

The 'output' screen (not the serial screen) says Launching Debugger  followed by some informational lines but nothing  else shows up.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: No serial debug ouput with Atmel Studio
Reply #7 - Jul 22nd, 2020 at 11:18pm
Print Post  
Please zip and attach or email this file

cpp
  
Back to top
WWW  
IP Logged
 
Greybeard
Junior Member
**
Offline


Posts: 24
Joined: Jul 22nd, 2020
Re: No serial debug ouput with Atmel Studio
Reply #8 - Jul 22nd, 2020 at 11:19pm
Print Post  
Follow up.   

The instructions I found for using AS7 was to create a .cpp file with the same name as the .ino file.  It also indicated it would create a main.cpp.  But perhaps that was all for hardware debugging. If so, We'll get to that later.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: No serial debug ouput with Atmel Studio
Reply #9 - Jul 22nd, 2020 at 11:21pm
Print Post  
Well done, yes that is true but those instructions for hardware debug are also outdated. Using .ino files is fine with hardware debug since a year or so.

I will re-check the AS7 page instructions or did you see that somewhere else?
  
Back to top
WWW  
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: No serial debug ouput with Atmel Studio
Reply #10 - Jul 22nd, 2020 at 11:23pm
Print Post  
AS7 instruction page has been updated. Sorry for the time waste.
  
Back to top
WWW  
IP Logged
 
Greybeard
Junior Member
**
Offline


Posts: 24
Joined: Jul 22nd, 2020
Re: No serial debug ouput with Atmel Studio
Reply #11 - Jul 22nd, 2020 at 11:35pm
Print Post  
no problem.
The article is visualmicro.com/page/Arduino-for-Atmel-Studio-7.aspx

Not sure how it affects this problem
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: No serial debug ouput with Atmel Studio
Reply #12 - Jul 22nd, 2020 at 11:56pm
Print Post  
You don't need the project_name.cpp. The serial debugger needs an .ino with setup() and loop() as normal for arduino. This is because it has to inject the serial debug commands and any watch expressions into the code. The setup() is used to kick things off and .begin() the Serial.

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


Posts: 24
Joined: Jul 22nd, 2020
Re: No serial debug ouput with Atmel Studio
Reply #13 - Jul 23rd, 2020 at 12:06am
Print Post  
Ok. Deleted the file and recompiled.  I'm getting changes in the expression screen and the output screen.  Looks like things are working now.  I'll work with it a bit more tomorrow and report any problems but I think the problem is solved.

Now.  I want to move on to using Atmel Ice.  I'll try that tomorrow and open up another post if for that, if necessary.   

Thanks for your help.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: No serial debug ouput with Atmel Studio
Reply #14 - Jul 23rd, 2020 at 12:09am
Print Post  
Great, it's all useful feedback thanks.
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint