Open
Description
Describe the request
We need some more exhaustive documentation about the "interface" that a core or variant should expose.
In particular:
- All of the required keys in
platform.txt
,boards.txt
andprogrammers.txt
, and what they are used for, should be listed. These keys form the "external interface" of the core, which can be used by the IDE or arduino-builder. A core can also contain arbitrary other keys, which are used for variable substitutions internally, but cannot be relied on to exist is all cores. Currently, this distinction is blurry and ad-hoc. - All of the macros, functions and variables that a variant of the Arduino core should expose should be documented. Some of these are mean to be used by the sketch directly (and should actually be documented as part of the normal Arduino reference), but some of them are only used internally by the Arduino core as part of another API. Currently, no definitive list of these exists, making variants (both third-party and Arduino ones) inconsistent or incomplete.
Both of these pieces of documentation should be updated when the requirements change in future IDE or core versions, with the changes mentioned explicitly and with the IDE or core version that introduced them.
Describe the current behavior
The **Arduino Platform Specification documents a good deal of the structure and has examples, but is not exhaustive or explicit.
Additional context
Related
- Provide dedicated sets of "extra flags" properties for platform developers and users #846
- Recommend defining standardized MCU and CPU identification macros in platform specification #988
- feature request: add board name string to compile defines in platform.txt file #1007
- reducing arch specific #ifdefs in Firmata lib with better alignment across variant files #1030
- I can not find the platform.local.txt documentation. Arduino#3371
- align constants across core board variants Arduino#3681
- documentation missing: clear overview for identification of boards: supersets, subsets, and single boards docs-content#359
Additional requests
- Preprocessor define to identify compiling with Arduino-IDE/CLI #2751
- https://forum.arduino.cc/t/how-does-ide2-compile-multiple-in-files/1325307/8
Issue checklist
- I searched for previous requests in the issue tracker
- I verified the feature was still missing when using the latest nightly build
- My request contains all necessary details