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) debugger fails after first breakpoint (Read 2611 times)
Jim Brooks
Junior Member
**
Offline


Posts: 11
Location: Canada
Joined: Mar 2nd, 2013
debugger fails after first breakpoint
Aug 15th, 2015 at 4:41am
Print Post  
I just installed the latest Aug 14, 2015 visual micro. I'm running Windows 10 and atmel studio 6. I loaded a u8glib graphic example running on a mega2560. Project built uploaded and ran to first breakpoint in loop. I selected run and it seems the comm link broke. I read the readme and tried resetting the user interface. The result was 0x00007FF9E5C903AA referenced at 0x000000007FFA610D. The memory could not be written. After this, Atmel studio closed and restarted.
Any suggestions?
Thanks,
Jim
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: debugger fails after first breakpoint
Reply #1 - Aug 15th, 2015 at 12:27pm
Print Post  
Thanks for the report.

What did you click or press when you "selected run"?


  
Back to top
IP Logged
 
Jim Brooks
Junior Member
**
Offline


Posts: 11
Location: Canada
Joined: Mar 2nd, 2013
Re: debugger fails after first breakpoint
Reply #2 - Aug 17th, 2015 at 5:16am
Print Post  
I right clicked and selected run to cursor.
This caused the build.buildevent/toolchain... window to open and a window saying please select a connected tool and interface and try again. Note up to this point things seems ok. I have a previous window that showed graphiTest|Expression on COM30. IN the table for name I had millis() and 2033 for data and min.
I will try to attach a screen shot. no luck with screenshot. probably too big. Would be nice if I got a proper error.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: debugger fails after first breakpoint
Reply #3 - Aug 17th, 2015 at 12:16pm
Print Post  
I didn't know there was a right click "run to cursor" in the code editor.

That is attempting an atmel compile and not an arduino/visual micro compile.

I will look at capturing that menu so to avoid confusion.

What happens when you use one of the std command such as F5 or debug>start alt+f7, or the green/blue arrows on the toolbar?

  
Back to top
IP Logged
 
Jim Brooks
Junior Member
**
Offline


Posts: 11
Location: Canada
Joined: Mar 2nd, 2013
Re: debugger fails after first breakpoint
Reply #4 - Aug 17th, 2015 at 5:03pm
Print Post  
I notice when the project compiles, first ist does a simple compile, then one for debug version.
Is this correct? Do I need to change setup?
If I don't use run to cursor, and have a breakpoint set in loop, it stops there good.
I have an IO window open and am looking to see how the spi device is configured.
All registers are 0x00. In fact, pretty much any register shown in this view is shown as 0. Are you displaying real mcu registers or is this a simulation?

Sort of off topic but... You mention uninstalling VU but I can't find where to do that. I thought extension manager but no.
A little help please.
Thanks,
Jim
Undecided
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: debugger fails after first breakpoint
Reply #5 - Aug 17th, 2015 at 5:28pm
Print Post  
Quote:
I notice when the project compiles, first ist does a simple compile, then one for debug version


Yes, this is the default behavior when the visual micro debugger is started. This is because arduino does not really have debug, normally you have to use serial messages in your code. visual micro has to do the same but it happens in background without changing your code. We need to be sure any compilation errors in users code are not confused with possible errors arising fromthe debugger or  breakpoint synatx. So the first compile checks the code without debug and the 2nd includes the debug.

Quote:
If I don't use run to cursor, and have a breakpoint set in loop, it stops there good.


Are you saying that debug works fine if you do not use the context menu "run to cursor"?

Quote:
I have an IO window open and am looking to see how the spi device is configured.
All registers are 0x00. In fact, pretty much any register shown in this view is shown as 0. Are you displaying real mcu registers or is this a simulation?


None of these windows are related to Visual Micro. To see any watch expressions with visual micro you need to add "when hit" messages and/or {expressions}

Quote:
You mention uninstalling VU


Sorry I don't remember this or know what VU is.
  
Back to top
IP Logged
 
Jim Brooks
Junior Member
**
Offline


Posts: 11
Location: Canada
Joined: Mar 2nd, 2013
Re: debugger fails after first breakpoint
Reply #6 - Aug 17th, 2015 at 5:56pm
Print Post  
Thanks for the update. VU is visual micro.
I am trying again using when hit expression.
I find it confusing that you don't have a continue button but then I find a lot of things confusing.
I am trying to find where to set when hit operations. Which menu item do I use?

Thanks,
Jim
  
Back to top
 
IP Logged
 
Jim Brooks
Junior Member
**
Offline


Posts: 11
Location: Canada
Joined: Mar 2nd, 2013
Re: debugger fails after first breakpoint
Reply #7 - Aug 17th, 2015 at 6:09pm
Print Post  
I added a when hit statement for {SPCR}. I had to turn off the tutorial to see it but...
The value returned is still 0x00.
This seems wrong considering the SPI is enabled as a master.
Any other thoughts.
The exact statement is when hit print "The value of SPCR is {SPCR}."
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: debugger fails after first breakpoint
Reply #8 - Aug 17th, 2015 at 6:37pm
Print Post  
So that breakpoint is the same as doing this in the code

Are you still looking at the IO view or has the visual micro debugger started? 
Did the serial window open? 
Did the Expression Watch window open showing "Expressions on COM n"? 
Did the "Micro Trace" output window appear showing the text "The value of SPCR is 0"
« Last Edit: Aug 17th, 2015 at 6:37pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Jim Brooks
Junior Member
**
Offline


Posts: 11
Location: Canada
Joined: Mar 2nd, 2013
Re: debugger fails after first breakpoint
Reply #9 - Aug 18th, 2015 at 4:19am
Print Post  
Yes serial window GraphicTest Expressions on COM30 opened.
I see the millis data as well as SPCR.
millis data is 14485 min 2033
SPCR data is 0 min is 0.
Name column contains - 
GraphicsTest.ino, line 280
character 1,
Next line in Name column is SPCR.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: debugger fails after first breakpoint
Reply #10 - Aug 18th, 2015 at 11:13am
Print Post  
Great, the debugger is working SPCR is 0

Are you sure it should contain a value? As I said I don't know much about these things but I thought SPCR is a state register that it written to by your code?

Also worth noting that some registers can not be read without upsetting the state
« Last Edit: Aug 18th, 2015 at 12:53pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Jim Brooks
Junior Member
**
Offline


Posts: 11
Location: Canada
Joined: Mar 2nd, 2013
Re: debugger fails after first breakpoint
Reply #11 - Aug 18th, 2015 at 2:09pm
Print Post  
At the moment this is why I'm using the debugger
U8glib is controlling an lcd via the spi ports.
The 2560 is master
The port should have spi enable and master bits set in spcr?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: debugger fails after first breakpoint
Reply #12 - Aug 18th, 2015 at 2:15pm
Print Post  
Ok thanks for the info.

The debugger sets up the Serial and then injects Serial.print(SPCR) which is then displayed in messages and the watch expressions list.

If you format the input using the published arduino formats that is also supported {SPCR,HEX} which equates to Serial.print(SPCR,HEX)

As you can see the debugger is incredibly simple and leaves little room for discussion about why a value os zero, unless I am missing the point.
« Last Edit: Aug 18th, 2015 at 2:15pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint