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 Newbie going mad - Arduino reports error but VM does not! (Read 3159 times)
RB
Newbies
*
Offline


Posts: 4
Joined: Sep 27th, 2016
Newbie going mad - Arduino reports error but VM does not!
Sep 28th, 2016 at 6:07am
Print Post  
In the following code, VM does nto generate any error - but Arduino IDE is much more helpful.  I have tried different Compiler Deep Search options, but haven't been able to generate any warnings so far!

#define StepsPerRevolution 1024
#define MaxSpeed 700
void setup() {
  Serial.begin(115200);   
  while (!Serial) {}  //wait for it to open

  long minCycleTimeMS = (long)(1000 * StepsPerRevolution) / MaxSpeed;
  Serial.print("minCycleTimeMS: "); Serial.println(minCycleTimeMS); //prints -35
  Serial.println(1000 * StepsPerRevolution );                       //prints -24576
  Serial.println(1024000 / MaxSpeed);                               //prints 1462
}
void loop()  {}

Abbreviated Arduino errors
JunkRBS.ino:8:37: warning: integer overflow in expression [-Woverflow]
   long minCycleTimeMS = (long)(1000 * StepsPerRevolution) / MaxSpeed;
                                     ^
JunkRBS.ino:10:23: warning: integer overflow in expression [-Woverflow]

Any advice or assistance would be much appreciated
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Newbie going mad - Arduino reports error but VM does not!
Reply #1 - Sep 28th, 2016 at 12:31pm
Print Post  
Hello,

Can't see any errors just warnings.

You can enable warnings in Visual Micro via vMicro>Compiler>Warnings
  
Back to top
IP Logged
 
RB
Newbies
*
Offline


Posts: 4
Joined: Sep 27th, 2016
Re: Newbie going mad - Arduino reports error but VM does not!
Reply #2 - Sep 28th, 2016 at 5:56pm
Print Post  
I should have said warnings, not errors - apologies.
I have just checked again - and yes I got warnings on the first build.   
But when I repeat the Build, or "Start" which also uploads the code to the Arduino, nothing shows anywhere I can see.  On the "Error List" tab it shows 0 Errors, 0 Warnings, 0 Messages
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Newbie going mad - Arduino reports error but VM does not!
Reply #3 - Sep 28th, 2016 at 6:11pm
Print Post  
Yes because the first compile was successful the output is cached to until something changes. You can see a build,rebuild command which will always give a build and ignore the cache.
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint