boards: use explicit paths for file inclusion#12999
boards: use explicit paths for file inclusion#12999leandrolanzieri merged 3 commits intoRIOT-OS:masterfrom
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? |
leandrolanzieri
left a comment
There was a problem hiding this comment.
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. |
leandrolanzieri
left a comment
There was a problem hiding this comment.
It looks like dist/tools/flatc/flatc is not part of this?
c93bbbe to
6a0eaec
Compare
leandrolanzieri
left a comment
There was a problem hiding this comment.
Everything looks good. ACK!
|
@leandrolanzieri thanks for the review! |
Contribution description
While testing #12972 I realized that when having an external
nativeboard name e.g.:BOARD=native-externalit will try to include headers inRIOTBASEwith 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.depsince it is a hack for dependency resolution.Testing procedure
change native to externalnative
mv native/ external-nativecompile on external BOARD, fails without this change.