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

Refactor board configurations #1

Open
danngreen opened this issue Apr 4, 2023 · 0 comments · May be fixed by #5
Open

Refactor board configurations #1

danngreen opened this issue Apr 4, 2023 · 0 comments · May be fixed by #5

Comments

@danngreen
Copy link
Member

Goal:

  1. Allow selection of board with build system. This will allow us to build for multiple boards without changing any source code (currently you have to change a using namespace Board =...

  2. Allow specifying custom board config file, which may be outside of mp1-boot source dir. For instance, including mp1-boot in another project

  3. Allowing adding new options to board config without forcing all board config files to be updated.

Proposal:

Goals 1 and 2 can be done by building with make BOARD_CONF=xxx, where xxx can be a known board (DK2 or OSD32), or a path to a custom board_conf.hh file. This has been roughly implemented in the ssbl-option branch (still needs work).

Goal 3 can be addressed by changing namespace Board to struct Board, which inherits from a struct of constexpr members with default values. A new field can be added to the default struct, and all boards will inherit the default. Thus creating new fields won't break existing board configs.

With Board as a class type, it can be passed as a template parameter, which might be useful for checks like if constexpr (requires {typename Board::SomeThing})

@danngreen danngreen linked a pull request Nov 30, 2023 that will close this issue
@danngreen danngreen linked a pull request Nov 30, 2023 that will close this issue
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 a pull request may close this issue.

1 participant