Skip to content

Plugin generates incorrect ARDUINO macro value for 1.6.X versions of IDE #254

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

Closed
george-hawkins opened this issue May 14, 2015 · 5 comments

Comments

@george-hawkins
Copy link

With the switch to 1.6.X the Arduino developers changed the format of the ARDUINO macro.

Previously e.g. 1.5.8 was mapped to 158, i.e. one digit per component of the version number, but this meant they couldn't easily encode e.g. 1.5.10.

So they moved to two digits for the minor and patch components of the version number, so 1.6.0 became 10600 (the current committed revision is 10605).

You can see this switch in format in commit b9e186e.

Here in BaseNoGui.java you can see they define REVISION, this is picked up by PreferencesData.java that writes it out to the IDE preferences as runtime.ide.version which in turn is picked up by the platform.txt files as the value used for the ARDUINO macro.

This all means that at the moment when I use the 1.6.1 Arduino IDE the IDE specifies -DARDUINO=10601 while the Eclipse plugin specifies a different value, i.e. -DARDUINO=161.

@jantje
Copy link
Member

jantje commented May 14, 2015

Would life not be easier if the value was simply put in the platform.txt file?
I'm not using these defines but someone will sooner or later. So I'll mod it

jantje added a commit that referenced this issue May 14, 2015
@george-hawkins
Copy link
Author

It might indeed be simpler if things were setup as you suggest.

The ARDUINO macro is quite important, even if you're not using it directly. It's value is checked by various include files in the standard Arduino libraries and by lot's of third party libraries.

PS thanks for all your work on the Arduino plugin for Eclipse. It's a super product - I'd go mad without it 😃

@jantje
Copy link
Member

jantje commented May 16, 2015

Did the fix fix it?

@george-hawkins
Copy link
Author

Cool - I now see -DARDUINO=10601 😃

@jantje
Copy link
Member

jantje commented May 18, 2015

txs for testin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants