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: Fall back to ZEPHYR_BASE when the board is not in BOARD_ROOT #10267

Merged

Conversation

SebastianBoe
Copy link
Collaborator

It is very inconvenient to maintain an application that both runs on a
Zephyr board and an out-of-tree board.

It forces one to write build scripts like this in the app:

if(BOARD STREQUAL my_out_of_tree_board)
set(BOARD_ROOT some/out/of/tree/board/path)
endif()

To avoid this we change the semantics of BOARD_ROOT. Instead of it
being a path to the board root it is now a prioritized list of board
root directories. Zephyr will append ZEPHYR_BASE to BOARD_ROOT.

This ensures that Zephyr boards can be used when the out-of-tree board
directory can not supply the requested board.

Misc. refactorings that clean up how BOARD_ROOT and BOARD_DIR are
used.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
It is very inconvenient to maintain an application that both runs on a
Zephyr board and an out-of-tree board.

It forces one to write build scripts like this in the app:

if(BOARD STREQUAL my_out_of_tree_board)
  set(BOARD_ROOT some/out/of/tree/board/path)
endif()

To avoid this we change the semantics of BOARD_ROOT. Instead of it
being a path to the board root it is now a prioritized list of board
root directories. Zephyr will append ZEPHYR_BASE to BOARD_ROOT.

This ensures that Zephyr boards can be used when the out-of-tree board
directory can not supply the requested board.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
@codecov-io
Copy link

Codecov Report

Merging #10267 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #10267   +/-   ##
=======================================
  Coverage   53.05%   53.05%           
=======================================
  Files         214      214           
  Lines       26200    26200           
  Branches     5646     5646           
=======================================
  Hits        13900    13900           
  Misses      10027    10027           
  Partials     2273     2273

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 46592e6...b987f21. Read the comment docs.

@nashif nashif merged commit d6de4c7 into zephyrproject-rtos:master Oct 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants