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 False errors (Read 11341 times)
Harrzack
Member
***
Offline


Posts: 133
Location: Lindenwold, NJ USA
Joined: Dec 28th, 2012
False errors
Nov 22nd, 2013 at 5:11pm
Print Post  
Now VS/VM is complaining with the below message - but there are NO 'if' statements in any of this code.  I do get the Intellisense error on the 'ISR' declaration - but that has not been a problem - I can just ignore it.  This is cropping up on a new .ino/project I'm making with code cut/pasted from other .ino's.   AFAICT there are really no errors in the code.

Alan R.        Shocked


Compiling 'MicroIndexer' for 'Arduino Uno'
Binary sketch size: 2434 bytes (used 8% of a 32256 byte maximum) (0.28 secs)
Compiling debug version of 'MicroIndexer' for 'Arduino Uno'
MicroIndexer.ino : expected unqualified-id before 'if'
Error compiling
« Last Edit: Nov 22nd, 2013 at 5:12pm by Harrzack »  
Back to top
 
IP Logged
 
Harrzack
Member
***
Offline


Posts: 133
Location: Lindenwold, NJ USA
Joined: Dec 28th, 2012
Re: False errors (MORE)
Reply #1 - Nov 22nd, 2013 at 5:26pm
Print Post  
I disabled debug (went to 'RELEASE' mode in VS, and my pgm compiled with no probs.

On random intervals VS will complain of an Exception Error - with some comment that it may relate to a plug-in.  I just got this reading some existing files to edit an Arduino Library/Class file.        Cheesy 

=Alan R.
« Last Edit: Nov 22nd, 2013 at 5:26pm by Harrzack »  
Back to top
 
IP Logged
 
Dennis Mabrey
Junior Member
**
Offline


Posts: 19
Location: Branchburg, NJ
Joined: Oct 22nd, 2013
Re: False errors
Reply #2 - Nov 22nd, 2013 at 6:07pm
Print Post  
Visual Micro inserts its own code when debug is on (obviously).   Seems it is inserting an if statement and that appears to be the problem.

You know how when you compile and upload with VM it will compile twice?  The first one is a normal compile and the other one contains all the debug statements.   Does it fail on its first compile (the non-debug) or does it pass through and fail on the second?

What version of the Arduino IDE did you link VM to?  

I am running Arduino 1.0.5 with Atmel Studio 6.1 and I do not have any problems compiling code using ISRs. 

While I do have VS2012 I wasn't quite sure how well VM and VS2012 were integrated so I erred on the side of caution and went with Atmel (VS2010).

I've had very little real problems with this configuration.

Do you have some code you want me to see if it will compile and upload?

  
Back to top
 
IP Logged
 
Dennis Mabrey
Junior Member
**
Offline


Posts: 19
Location: Branchburg, NJ
Joined: Oct 22nd, 2013
Re: False errors
Reply #3 - Nov 22nd, 2013 at 6:31pm
Print Post  
By the way in case you did not know you can look at the generated cpp file with debug statements so you can see where the offensive if statement is (at least I can in Atmel Studio).

Goto Tools->Visual Micro->Compiler and set verbose to true.   

As an example if I compile for a Nano 328 board it puts make a file (with .cpp extension) in the folder  C:\Users\usename\AppData\Local\VMicro\Arduino\Builds\ProjectName\nano328

Here is what an "empty" ino sketch with debug stuff added looks like (if you are curious)

Code
Select All
/* Visual Micro Debug Header: JoveRadio.ino http://www.visualmicro.com */
unsigned long __VisualMicro_DEBUG_1_HITCOUNTER__	=	0L;
unsigned long __VisualMicro_GlobalLastMillis__ = 0L;  //VM: used to optimise reading of millis()

/*[VM_DEBUG_HEADERS_END]*/
#include "arduino.h"
#include <VM_DBG.h>

//
//
void setup() { bug.transport->println("VMDPV_1|_VMDPV");delay(10); MicroDebug.start(false,false);




}

void loop() {if (millis()>0 || millis()>1) {__VisualMicro_GlobalLastMillis__=millis();if ( __VisualMicro_GlobalLastMillis__ < __VisualMicro_DEBUG_1_HITCOUNTER__ ){__VisualMicro_DEBUG_1_HITCOUNTER__=__VisualMicro_GlobalLastMillis__;}if ((__VisualMicro_GlobalLastMillis__-__VisualMicro_DEBUG_1_HITCOUNTER__)>=250) MDPE");}}




} 

  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: False errors
Reply #4 - Nov 23rd, 2013 at 3:42pm
Print Post  
Hi Dennis,

Sorry for the delayed response.

You have a typo in a break point When Hit condition at the start of the loop. It is attempting to report a variables called =millis(). 

I think you need to remove the = from the front of the {=millis}

Hope I haven't got confused, let me know if this is not the problem.

Thanks

ps: If you "Debug>Start without debugging" you will see the program compilation is OK hence we know the error relates to the debug compile.
  
Back to top
WWW  
IP Logged
 
Dennis Mabrey
Junior Member
**
Offline


Posts: 19
Location: Branchburg, NJ
Joined: Oct 22nd, 2013
Re: False errors
Reply #5 - Nov 23rd, 2013 at 6:27pm
Print Post  
I was not the one with the problem.  The original poster had the issue I was explaining how he could look at the debug version of his code.

I believe his conditional breakpoint might have a problem and was explaining to him how to look at the debug version of the software.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: False errors
Reply #6 - Nov 23rd, 2013 at 6:30pm
Print Post  
Oh Dennis, I am really sorry. Zipping through stuff trying to catch up I read to little toooo quickly  Smiley

Thanks very much!
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint