Skip to content
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

cmake: Fix shield bug when BOARD_ROOT is a list #23609

Conversation

SebastianBoe
Copy link
Collaborator

Fix bug where SHIELDS would be marked as "not found" in the
NOT_FOUND_SHIELD_LIST when they were present, just not in the first
BOARD root in the BOARD_ROOT list.

Instead of marking shields in the NOT_FOUND_SHIELD_LIST, we (continue)
popping shields from SHIELD and check if there are any shields left in
SHIELD.

Signed-off-by: Sebastian Bøe sebastian.boe@nordicsemi.no

Fix bug where SHIELDS would be marked as "not found" in the
NOT_FOUND_SHIELD_LIST when they were present, just not in the first
BOARD root in the BOARD_ROOT list.

Instead of marking shields in the NOT_FOUND_SHIELD_LIST, we (continue)
popping shields from SHIELD and check if there are any shields left in
SHIELD.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
@SebastianBoe SebastianBoe requested a review from nashif as a code owner March 19, 2020 15:50
@SebastianBoe SebastianBoe requested a review from erwango March 19, 2020 15:51
@SebastianBoe SebastianBoe added area: Build System area: Shields Shields (add-on boards) bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug labels Mar 19, 2020
@carlescufi carlescufi requested a review from anangl March 19, 2020 15:55
Copy link
Member

@anangl anangl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested a case that previously ended up with the error message "No shield named 'adafruit_2_8_tft_touch_v2' found". With this patch it worked correctly.

list(APPEND
shield_dts_fixups
${shield_dir}/${s_dir}/dts_fixup.h
list(APPEND
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that still possible to have shields fixup?
This is not the case anymore in main tree at least, I'm not sure in case of out-of tree shields
Maybe this could be totally removed (in a dedicated change).

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have not been following the DT changes, so I'm not sure.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok.
So, after a quick look, there is nothing that prevent it, but this mainly depends on drivers (sensors and components available on shields) implementations which should no use them.
Now, this is correctly done in in-tree drivers, but we don't know about potential out-of-tree support.
Anyway, support for fixup should be removed short term with on going changes in device tree support. Support removal in shields could be done at that time when supported is removed globally.

@carlescufi carlescufi merged commit a8e90cb into zephyrproject-rtos:master Mar 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Build System area: Shields Shields (add-on boards) bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants