Arduino Stack Exchange is a question and answer site for developers of open-source hardware and software that is compatible with Arduino. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When one selects a board within Arduino IDE, a preprocessor definition is added to one of the behind-the-scenes files.

After a lot of hunting and some good fortune I found that the format of this definition is:


Some are easy to guess (ARDUINO_AVR_UNO, for example), but others are less so. The Pro Micro has '16' or '8' appended to the definition depending on the speed. I do not know if the definition is different for 5V or 3.3V. I haven't managed to guess the definition for the Mega2560, but it isn't anything obvious.

Question 1: Is there a list in existence of the possible definitions?

Question 2: Is there any distinction, as far as compilation and preprocessor involvement is concerned, between BoardX-5V and BoardX-3.3V, and how is this distinction defined?

share|improve this question
What do you need it for? It would probably be more useful to differentiate between processors (e.g. ATMega328), instead of boards. – Gerben Jan 23 at 17:12
I have a multi-node project that uses an Uno, a Leonardo and a <collective noun> of Pro Minis. The code is nearly identical for the three versions but to ease debugging I want to be able to upload (or at least compile from) the same code for everything. – CharlieHanson Jan 23 at 17:16
up vote 4 down vote accepted

The list of board symbols can be generated by this shell command:

$ grep board= boards.txt | cut -f2 -d= | sort -u

The boards are defined by the "build.board" property in the boards.txt file.

This property is used by the build recipe together with ARDUINO_-prefix.



share|improve this answer
+1, thank you for that list. It's a shame it doesn't spit out the dual-speed versions to remove any doubt, but this answers the question more than well enough. – CharlieHanson Jan 23 at 18:32
The board property is the same for both versions of pro-mini while not for mega. Maybe boards.txt should be updated with distinctive names for the pro-mini variants, e.g. AVR_MINI_16MHZ, AVR_MINI_8MHZ. – Mikael Patel Jan 25 at 15:42

The first blank is the platform. This is "AVR" for AVRs, "SAM" for SAM-based Arduinos, etc. This is derived from the platform directory containing the core.

The second blank is the board. This comes from the entry in boards.txt in the core itself, and is the identifier before the first period.

There is no difference between compilation processes with regards to voltages; any speed difference is given in F_CPU and the board itself should not be checked for this.

So there is no definitive list, since the list is of arbitrary size due to its source.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.