Compile on Arduino

Go To Last Post
4 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi All, I am using arduino 1.6.9 and get this error when compiling:-

 

In file included from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Stream.h:26:0,

                 from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/HardwareSerial.h:29,

                 from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:224,

                 from sketch\ATTiny85.ino.cpp:1:

C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:32:0: warning: "BIN" redefined [enabled by default]

 #define BIN 2

 ^

In file included from c:\program files (x86)\arduino\hardware\tools\avr\avr\include\avr\iotn85.h:38:0,

                 from c:\program files (x86)\arduino\hardware\tools\avr\avr\include\avr\io.h:428,

                 from c:\program files (x86)\arduino\hardware\tools\avr\avr\include\avr\pgmspace.h:88,

                 from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:28,

                 from sketch\ATTiny85.ino.cpp:1:

c:\program files (x86)\arduino\hardware\tools\avr\avr\include\avr\iotnx5.h:55:0: note: this is the location of the previous definition

 #define BIN     7

 ^

 

so BIN is defined in each of the imported files as listed?, is there a way to turn this warning off?, is ignoring the warning bad?, how can it be avoided?

thanks All!

 

* Moved to the Arduino forum by a Moderator *

Last Edited: Sun. May 15, 2016 - 08:31 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It's telling you that it is only defined in iotnx5.h but as that is a system header that you should not change you are going to have to think of a new name for it. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

BIN is used by the Stream class to format a number in binary. Like DEC, HEX.
.
I am not at a PC. I doubt if the Arduino core uses the "system" BIN macro at all. So you can probably ignore the warning.
Note that the Tiny85 is not an official Arduino target. There will be several anomalies when you use non-official cores.
.
Life is much simpler if you stick to official boards. The Nano clones are not much more expensive or bigger than a bare Tiny85.
.
David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I eventually got past the issue by fishing around the internet and found that there is now a module to upload through the new "manager" in arduino that covers the attiny85. Although the way that the manager works, you put a link in and it does the rest, the way the manager is presented is confusing!. The new attiny module is great, because it also covers some of the other attinys!