Where to find the attribution name for a certain board?
The Arduino defines to identify a board are in form of ARDUINO_&lt;board&gt;, where &lt;board&gt; is the value from &lt;x&gt;.build.board from boards.txt for board &lt;x&gt;

For example for Arduino AVR boards, in the boards.txt file is uno.build.board=AVR_UNO so the define is ARDUINO_AVR_UNO.

And Arduino has 'architecture' identification define too. This has form of ARDUINO_ARCH_&lt;arch.name&gt;. The &lt;arch.name&gt; is the uppercase version of the folder name with the boards package version. For example AVR for packages/arduino/hardware/avr/1.6.21.