-
-
Notifications
You must be signed in to change notification settings - Fork 384
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document interfaces that should be implemented by boards platforms #985
Comments
For each source file found, gcc -E is continuously run until it doesn't report any error. When it reports an error, it is in the form of Ethernet.h: No such file or directory #include <Ethernet.h> Ethernet.h is searched from known libraries, its -I param added to gcc -E and gcc -E is rerun If Ethernet.h is not found, preprocessing fails and reports an error If found, the collected list of -I params is used to preprocess another (sketch or library) source file, until all dependendent libraries are resolved Fixes #33 Signed-off-by: Federico Fissore <f.fissore@arduino.cc>
One additional angle should be covered: The interface that the Arduino core offers to its variants and derived (board-only) platforms. E.g., what variables does each tool, recipe, programmer, etc. assume are present and how they are used. |
Other thing that should be documented(assuming it's the intended behavior) is that Burn Bootloader uses the platform.txt of the selected board but Upload Using Programmer uses the platform.txt of the selected programmer. This has caused confusion for me and at least two other 3rd party cores because it wasn't documented(see arduino/Arduino#2886 and SpenceKonde/ATTinyCore@9c50151). Edit: I've added this information to the wiki. |
Also note this proposal I made (quite) a while ago already, which suggests to apply some versioning scheme to these interfaces, to make it easier to change them in the future while keeping compatibility: https://groups.google.com/a/arduino.cc/g/developers/c/H6vCRlgRTCo/m/22oQfVY3AgAJ |
I just noticed that in the area of versioning, the SAMD core already applies some versioning to its variants by letting the variants define a constant to indicate what version of the core-variant interface they implement (I think). I dont' think there's any specific documentation about what this version number implies exactly, though. |
Subscribing for interest, via Arduino-CI/arduino_ci#251 I am trying to put boundaries around what would be considered the proper set of compilation mocks for Arduino, and the lack of official documentation on stuff like these: #define portOutputRegister(P) ( (volatile uint8_t *)( pgm_read_word( port_to_output_PGM + (P))) )
#define portInputRegister(P) ( (volatile uint8_t *)( pgm_read_word( port_to_input_PGM + (P))) )
#define portModeRegister(P) ( (volatile uint8_t *)( pgm_read_word( port_to_mode_PGM + (P))) ) I can't find any official-looking documentation to say whether these are meant to exist for the long term and/or what their function should be (so that I can create proper unit tests for my mockups of them). |
Describe the request
We need some more exhaustive documentation about the "interface" that a core or variant should expose.
In particular:
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.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
Additional requests
Issue checklist
The text was updated successfully, but these errors were encountered: