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 Issue with Define (Read 2675 times)
OldManHubbard
Newbies
*
Offline


Posts: 2
Joined: Feb 7th, 2016
Issue with Define
Feb 7th, 2016 at 6:10pm
Print Post  
I am having an issue with Define statements not appearing to be working with VisualMicro using Visual Studio 2015 (free).  I was able to compile my code with VisualMicro prior to upgrading to Arduino 1.6.7.  

My code still compiles with Arduino but not with Visual Studio.  Below is the defines statement.  I select the correct board "ATTiny85" and then try to compile, for the Ardiuno IDE it works, for the Visual Micro it ignores the define and goes to the else Include "Wire.h".  At which point compile errors are thrown as the a tiny does not support wire.h.  If i comment out the Defines to force it then all is good.  I looked at the header file and the defines are there 
#define __AVR_ATtiny85__
#define __AVR_ATTINY85__

Any help would be appreciated.

Here is my code:

     #if defined(__AVR_ATtiny84__) || (__AVR_ATtiny2313__) || defined (__AVR_ATtiny85__) || defined (__AVR_ATTINY85__)
           #include "TinyWireM.h"      // include this if ATtiny84 or ATtiny85 or ATtiny2313
           #define Wire TinyWireM
     #else
           #include "Wire.h"           // original lib include
     #endif
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Issue with Define
Reply #1 - Feb 7th, 2016 at 11:43pm
Print Post  
I deleted my previous response because this turned out to be a bug with hardware preprocessor definitions that inherit the main arduino avr core (as with AtTiny)

Please install the latest release which is currently 1602.7.1
  
Back to top
IP Logged
 
OldManHubbard
Newbies
*
Offline


Posts: 2
Joined: Feb 7th, 2016
Re: Issue with Define
Reply #2 - Feb 8th, 2016 at 1:27am
Print Post  
Thanks that fixed the issue
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint