-
Notifications
You must be signed in to change notification settings - Fork 2.1k
boards: concept for defining board revisions #7975
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
Conversation
@x3ro might be interested |
How about BOARD_VARIANT? |
It like music :-) Maybe not quite, but I like it. Anyway, I think the wording question is only secondary for now. First of all:
|
Side note: from a user perspective, we might event make the variant selection completely transparent making use of alias names (#7976), e.g.:
|
Some care should be taken to differentiate board revision and boards that have a lot in common. Because for wsn430 boards, even if they are called 1.3 and 1.4 they are two different boards with different radios and existed and still both exist and are deployed in IoT-LAB. The "version number" is just a bad naming convention. Are both boards revisions "compatible" enough to be abstracted. If at some point, examples need to test for a board variant, I think we lost. |
I think that is something we need to define: do we want to abstract revisions (e.g. calliope-mini 0.3 vs 1.0), or are we taking this rather from a software point of view (hence
No sure I understand this point correctly. But to make it clear: the CI MUST always build/test all available variants/revisions! |
Is the goal to use the revision be a high level thing, to simplify user life (at APPLICATION configuration /command line parsing time) or for the developer to write boards support ? Because its two different things, and requires two different ways of solving it. |
will not pursue this any longer, reopen at will... |
based on #7973 (which is a trivial minimal cleanup thing)
This PR is meant to quickly demonstrate an idea I had this morning, possibly enabling us to prevent some code duplication in the future: The idea is to introduce a revision number/value for boards, enabling us to cope better with these minimal changes/impacts that board revisions have on the actual board code/configuration.
Rationale: When developing hardware, a board goes typically through a number of (development) revisions, until the design is considered stable/working. The changes between these revisions are from a software perspective mostly very small (changed pin mappings, oscillators, or maybe different radio, etc). It would be nice to model these revisions in software to be able to quickly adapt and maintain code with not much overhead.
As of now, we keep separate board folders for every board revision (e.g.
remote reva, revb, pa
). Or alternatively we drop (early) development revisions completely and only support the (stable/latest) revision of a certain board (as just done for thecalliope-mini
), but this approach makes it pretty cumbersome to keep on using the old hardware revisions (which is sometimes a shame).So this PR presents an idea for using
BOARDREV
as board revision specifier, enabling us to specify not only the board to build for, but also a specific revision. So for example one can do now:The board revision can for each board of course be set to a default value (typically the newest revision), or a board implementation could throw an error if none is set. For boards without revisions the variable is just ignored, so nothing changes for them.
Open issues / questions to answer:
BOARDREV
? Shoul we use something more generic likeBOARDFLAVOR
orBOARDSPEC
? Idea is to use the same concept for boards that are similar but not really revisions of each other ->nucleos
: