Use of identifiers (e.g., Dn pin identifiers)

That is correct. Due to the deviation from the established practices by some 3rd party boards platform developers, it is now unfortunately necessary to make the decision regarding which subset of boards you would like your code to be fully compatible with in this case.

1 Like

Please specify "platform".

My understanding of "platforms":
Edit: I meant "architecture" of course.

1.Old (AVR) controller model with dedicated hardware pins.
2. Controllers with a pin patchboard

The Arduino coding model and firmware matches perfectly the board-controller-port levels with board pin labels. Boards without proper pin labels are of no interest to me. Even if it were easy to create the related tables I don't want to support nor bear such laziness. What else will go wrong if the board designer did not understand how to properly integrate it into the Arduino development system?

An Arduino platform is the collection of software components that adds support to the Arduino development software for a given set of "boards". You will often see Arduino community members and unfortunately even Arduino employees incorrectly use the term "core", or less frequently things like "BSP/boards support package", "core package", "hardware package" in place of the correct term "platform".

The Arduino platform framework is documented in the Arduino Platform Specification:

https://arduino.github.io/arduino-cli/latest/platform-specification/

I see. Would it be possible to solve this problem using an preprocessor directives? For example, assuming that the boards/platform that do not have any Dn identifiers will have standard pin mapping, then somehow check for the existence of the identifiers and conditionally define them if undefined (using standard mappings)?

You could definitely expand portability:

#if defined(D2)
byte somePin = D2;
#else
byte somePin = 2;
#endif

However, a variant might use constants instead of macros. For example:

2 posts were split to a new topic: "Platform" vs "BSP" terminology