-
Notifications
You must be signed in to change notification settings - Fork 34
ARDUINO=100 always added as define to g++ #176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I'm not clear on why
In other words, I was under the impression that this was used by the IDE and not by a particular board. Can someone enlighten me on the proper use of this |
I'll look for the specifics, but there was some change to Arduino core library at 1.0.6 and an external library had |
It's not used by the IDE, it's defined by the IDE. The ARDUINO macro serves two purposes: Indicate that the code is being compiled by the Arduino build system. So you can do things like this: #if defined(ARDUINO)
#include <Arduino.h>
#elif defined(PARTICLE)
#include <application.h>
#else
#error unsupported build system
#endif This particular code is used to deal with the fact that Particle uses the Arduino core API, meaning that most Arduino code can be used with Particle, and vice versa, but Particle changed the core library's primary header filename from "Arduino.h" to "application.h". Indicate which version of the Arduino IDE is being used for the compilation, so you can do things like this: #if defined(ARDUINO) && ARDUINO >= 100
#include <Arduino.h>
#else
#include <WProgram.h>
#endif This code is used to deal with Arduino changing the core library's primary header filename from "WProgram.h" (an artifact of Arduino's origin as Wiring) to "Arduino.h" in the Arduino IDE 1.0.0 release. More information: |
This is where I ran into the problem (line 90):
And, just to clarify, it isn't needed by a particular board. This was just the showing how I came to the warning (and I happen to be using the Mega2560). It could have been any board that supports Ethernet. It was just a demo that if, for whatever reason, you wanted to provide your own value for |
Sorry for my poor wording there, I meant to say that the definition is associated with the IDE as a whole and not individual boards. i.e. the IDE "uses" the Based on what I'm hearing here, it sounds like it's perfectly appropriate for me to be defining Worrying about the (note to future self: on one hand, it could involve iterating the entire CI process over a set of possible values like I've been hesitant to merge #179 because it breaks my fundamental assumption that there is only one Arduino IDE version for me to install and imitate (thus, whether the right value is |
Actually, I think you are right to be concerned. I brought in the current version of Ethernet and found that it didn't work. My work-around might be wrong. It would probably have been better if I brought in an old version of Ethernet to match ARDUINO=100. But, my preference would be for Arduino CI to be more current (1.6 if not 1.8.13). If you were going to move forward, then I'd be helped; if you don't, then I should go look for an old version of Ethernet. My preference for a current version of ARDUINO is that I'm writing production code and will be deploying on 1.8.13 (or later). |
I think the right course of action for me is to resolve #185 before anything else |
I agree that #185 is better. |
cpp_library.rb:327 hard-codes
-DARDUINO=100
on command lineruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin19]
Bundler version 1.17.2
arduino_ci (0.3.0)
Apple clang version 12.0.0 (clang-1200.0.32.2)
java version "11.0.7" 2020-04-14 LTS
.arduino-ci.yaml
:Warning
Arduino Architecture(s) Affected: Mega2560
The text was updated successfully, but these errors were encountered: