-
Notifications
You must be signed in to change notification settings - Fork 2.1k
boards: use explicit paths for file inclusion #12999
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
boards: use explicit paths for file inclusion #12999
Conversation
I'm not sure I understand the use case. |
Sorry, I'll give more details. With the addition of
Because $(BOARD) doesn't have the expected name. I don't know how much of a use case there is for this. But this goes in the direction of saying all our And actually I would change it for all boards and add a static check: git grep \/\$\(BOARD\) boards/
|
e9df414
to
dfde913
Compare
@miri64 I updated the PR description and testing procedure with what I mentioned. |
df97bd4
to
1baf3a7
Compare
Rebased and squashed since review doesn't seem to have started yet. Also added a build system sanity check. |
1baf3a7
to
8016227
Compare
Thanks for the explanation. This makes sense. |
Oops, sorry /o. Hit the wrong button by accident. |
ping @miri64! |
Sorry, I should have explained: I first and foremost wanted to understand if the concept makes sense. IMHO it does, so I gave the label for that. However, I also think the final decision should be made by someone else, as this is not my usual work area ;-). |
Maybe @leandrolanzieri @smlng can take a look? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes sense (besides the presented use case), we don't need to use an interface here as we already know which board we are referring to. Too bad we have to add the exception for nrf52
boards for now.
I performed the proposed test procedure and using the external native board works now. Also the static check is working correctly and variables maintain their values. Only some nitpicks:
- In the message of 109ebf7:
- eternal -> external
- presente -> present
8016227
to
3baa142
Compare
With the introduction of BOARDSDIR external boards can re-use common code of BOARDS present in RIOTBASE. To be able to do this file references may not use $(BOARD) since BOARD will be set by the external BOARD.
Makefile.dep is already included for the board no need to do it here.
3baa142
to
c93bbbe
Compare
@leandrolanzieri thanks for testing and reviewing, addressed comments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like dist/tools/flatc/flatc
is not part of this?
c93bbbe
to
6a0eaec
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything looks good. ACK!
@leandrolanzieri thanks for the review! |
Contribution description
While testing #12972 I realized that when having an external
native
board name e.g.:BOARD=native-external
it will try to include headers inRIOTBASE
with the external BOARD name, thus failing.EDIT: I extended this to all of the cases of:
git grep \/\$\(BOARD\) boards/
Except for
boards/common/nrf52/Makefile.include:include $(RIOTBOARD)/$(BOARD)/Makefile.dep
since it is a hack for dependency resolution.Testing procedure
change native to externalnative
mv native/ external-native
compile on external BOARD, fails without this change.