Conversation
fe90f52 to
b1ad197
Compare
makefiles/boards/groups.inc.mk
Outdated
| nrf52840dk \ | ||
| nrf52dk \ | ||
| nrf6310 \ | ||
| nucleo144-f207 \ |
There was a problem hiding this comment.
question: something like nucleo144-% wouldn't work here?
makefiles/boards/groups.inc.mk
Outdated
| ALL_BOARDS := $(foreach group,$(MCUGROUPS.arch),$(MCUGROUP.$(group))) | ||
|
|
||
| ifneq ($(BOARD), $(filter $(BOARD),$(ALL_BOARDS) none)) | ||
| $(error Board $(BOARD) is not in any group) |
There was a problem hiding this comment.
this error should be a little more descriptive by hinting where to add the board to some group, otherwise it might be hard for someone not familiar with this feature to know what to do about it.
|
Is there a reason for a centralized file? For me it would make more sense to add a number of groups in a board makefile or something else in the board specific directory? |
|
Could the same effect be achieved by using FEATURES_PROVIDED? |
|
Having a centralized list may be more difficult to maintain when boards are added or removed, but easier to maintain if new groups are added. |
|
besides maintaining a central list, it also goes against modularity, i.e., having boards, drivers, etc outside the RIOT core repo (in the future). After some thought I'm with @bergzand and @gebart, and that it would be better to create those groups based on something that can be defined within the boards directory or configuration. Though I'm not sure if |
|
First: I am a big fan of this PR. In my opinion, it improves the situation by mainly enabling us to do things (that were either cumbersome or not possible before):
Regarding the actual implementation: I think whether using or central file or not depends on the answer of these questions:
Integrating a central file with external boards should be a straight forward process. I would propose something like -include ${BOARD_GROUP_EXT}in the groups file. This allows for defining some external groups somewhere (including external boards, or simply doing custom sub-groups useful for individual developers), and use it by building with while MCUGROUP.mine := samr21-xpro stm32f3discovery external_board_123
MCUGROUP.cortexm += external_board_123Other remarks:
|
+1
+1
+1
Sounds like an idea. Then again, we don't add/remove boards that often. If any PR that does that fails CI tests if a board is not added/removed, I think we should be good. |
We could move the actual grouping into a file in $(RIOTBOARD). That way, should anyone provide a different RIOTBOARD folder, it is at least easily possible to override. |
The main reason is that in order to spread this information over 100+ files, all those would need to be parsed. Apart from being slow (I'm assuming this), the grouping is very useful to not parse e.g., blacklisted board folders. |
yap. But also having the possibility to 'extend' the board group file would enable us to (i) use custom, short-term groups (whatever a developer seems fit, but does not have any reason to be in master -> group of random boards that I have on my desk etc), and (ii) to combine external boards with the internal board path. So maybe do both? |
|
boards/groups.inc.mk
Outdated
| msba2 \ | ||
| # | ||
|
|
||
| BOARD_GROUP.avr8 := \ |
There was a problem hiding this comment.
Would it make sense to change this (and the others as well) to BOARD_GROUP += ...? This way one could add temporary elements from the command line, possibly useful when playing with new boards?
dist/tools/boards/check.sh
Outdated
| # Copyright (c) 2017 Kaspar Schleiser <[email protected]> | ||
| # | ||
| # This script checks whether the board groups defined in boards/groups.mk | ||
| # contain and only contai boards that actually exist in the tree. |
bc98f12 to
08c81f6
Compare
Where do you see the difficulty? adding/removing boards would require to edit the list, but that doesn't happen that often, no? |
We currently allow RIOTBOARD to override the board directotry. This is still possible. Do you see other modularity concerns? |
To exaggerate a bit: Its like when you run a liqueur store and have to maintain a list with the names of all adults above (or the opposite, i.e., all kids below) 16 or 18 that are (not) allowed to buy alcohol instead of just checking ID cards for the persons age. Further, while you only specified a small number of groups (for now), it is easily imaginable that others will add on numerous lists to make arbitrary board selections, and to maintain/update those lists will be cumbersome in the long run. Though I agree with @haukepetersen that I also want to raise another issue I see with this PR: its rather |
Sticking with this analogy: if a customer comes to the counter and wants to buy a bottle of gin, it is indeed quite easy to check his/her/its ID to figure out if the person is allowed to do so. But in the use case presented here, we have a different scenario: we want to get a list of all persons who like gin, or who are over/under 18. In this case, it is much simpler and faster, to look a a list we might have in the store instead of calling every single person! Analogy aside: as I wrote before, the key point here is the performance aspect, so can we/do we want to cope with the drawback of having to parse a (potentially large) number of files instead of a single file? And is the maintenance of a central group file really soo bad, considering the use of wildcards ( |
|
From what I understand from the source:
So the use is mainly for CI and not users, because you cannot do specific application depending on a board group. How I understand it: The information that is now used for grouping looks like a specific value for a property. And in that sense, it is similar to FEATURE_PROVIDED but with pre-calculated query results for, maybe, performance reasons. Tell me if I am wrong, as I only rely on code and not documentation. |
Also, there are currently many "central" lists like They would become much shorter and more maintainable. Using FEATURES_PROVIDED for board grouping would, need more logic for the blacklist case, as in, how do we blacklist a board that does provide a feature. Using the central file might not be optimal in terms of maintainability, but adding the decentralized solution to our make system seems way more work to me, and it is not clear that the performance overhead would be acceptable. I suggest we go with this PR's concept for now and change to something not using a centralized file as soon as that has been done. |
ba782e2 to
7f7f5b3
Compare
You're right. |
|
Closed in favour of #9081. |
This PR adds infrastructure to group boards (e.g., by architecture, by bit-width, ...).
Another commit shows how this can be used within application makefiles for black/whitelisting.