Skip to content

pass board type from boards.txt [imported] #308

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
cmaglie opened this issue Nov 15, 2012 · 1 comment
Closed

pass board type from boards.txt [imported] #308

cmaglie opened this issue Nov 15, 2012 · 1 comment
Assignees
Milestone

Comments

@cmaglie
Copy link
Member

cmaglie commented Nov 15, 2012

This is Issue 308 moved from a Google Code project.
Added by 2010-07-30T17:41:03.000Z by [email protected].
Please review that bug for more context and additional comments, but update this bug.

Original labels: Type-Enhancement, Priority-Medium

Original description

What change would like to see?

Something that I think is desperately needed is a way to pass a #define from the boards.txt file to the compiler.
For example

arduino.build.define=BOARD_MEGA1280

And allow for as many of these, then would then be passed to the compiler as -DBOARD_MEGA1280

Why?

There are many boards that use the same CPU but have different capabilities. This would allow easier pre-processing in the various files

Would this cause any incompatibilities with previous versions? If so, how
can these be mitigated?

No issues at all.

@cmaglie
Copy link
Member Author

cmaglie commented Sep 19, 2013

This was introduced from 1.5.3, the symbol available at compile time is:

ARDUINO_{board}

for example the Arduino Uno will have:

ARDUINO_AVR_UNO

The value is defined through the build.board key in boards.txt:

uno.build.board=AVR_UNO

@cmaglie cmaglie closed this as completed Sep 19, 2013
tbowmo pushed a commit to tbowmo/Arduino that referenced this issue Jul 14, 2016
ollie1400 pushed a commit to ollie1400/Arduino that referenced this issue May 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant