Unfortunately, some of my boards cannot be detected, i.e. my Adafruit Itsybitsy M0 and Arduino Due programming port. For Feather Huzzah (esp8266) and Feather M4 it works well though.
How can I determine the board type name, in case also other ones still not being checked yet?
The Adafruit Itsybitsy M0 specific macro is ARDUINO_ITSYBITSY_M0.
The SAM3X8E macro already used in the last set of pin definitions will match for the Due.
As for how to to determine board-specific macros in general, here's the documentation:
The uno.build.board property is used to set a compile-time variable ARDUINO_{build.board} to allow use of conditional code between #ifdefs. The Arduino IDE automatically generates a build.board value if not defined. In this case the variable defined at compile time will be ARDUINO_AVR_UNO.
So the way I found the Adafruit Itsybitsy M0 macro was to look in the Adafruit SAMD Boards boards.txt file for the Adafruit ItsyBitsy M0 board definition:
The -DARDUINO_{build.board} compiler flag is turned into -DARDUINO_ITSYBITSY_M0 when compiling for the Adafruit ItsyBitsy M0.
You could also use the Due's board-specific macro ARDUINO_SAM_DUE. The SAM3X8E macro will match any board that uses the SAM3X8E microcontroller. Likely any SAM3X8E-based Arduino boards would use the Due's pin mapping so that should be no problem. Using the board-specific macros can be a little more problematic because there are always new boards coming out, each of which will have their own macro so it's hard to keep code up to date with all the possible board macros.
thank you, pert,
ARDUINO_ITSYBITSY_M0 is fine, it works!
Now also ARDUINO_SAM_DUE and SAM3X8E
are accepted, the Due boards cores were broken - after uninstall and reinstall M3 cores it's fine now again (AFAICS )
dsyleixa: SAM3X8E for all boards which are powered by an M3
But this is not correct. There are many Cortex M3 microcontrollers other than the SAM3X8E. It would be more accurate to say that AVR_ATmega328P matches all boards which are powered by an AVR.
If you're asking for the macro to match boards using the SAMD21G18A microcontroller then you can use SAMD21G18A. If you want any SAMD microcontroller, try SAMD_SERIES.