8000 stm32: Move board variant config to mpconfigboard.mk. by jimmo · Pull Request #9056 · micropython/micropython · GitHub
[go: up one dir, main page]

Skip to content

stm32: Move board variant config to mpconfigboard.mk. #9056

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

Merged
merged 1 commit into from
Aug 26, 2022

Conversation

jimmo
Copy link
Member
@jimmo jimmo commented Aug 15, 2022

There's a little-known feature in the scripts that build firmware for micropython.org/download that allows a board to have multiple "variants" defined. For example "PYBV11 with threading".

This currently works by having the autobuild script explicitly know about the variants and what arguments to pass to make. Then the board.json knows about the generated filenames.

I want to:
a) Standardise this across ports.
b) Move the definition of variants into the board config.
c) Use it for existing boards that are very similar but we currently have separate board definitions for (e.g. boards that are identical other than their flash size, e.g. https://github.com/micropython/micropython/tree/master/ports/rp2/boards/PIMORONI_PICOLIPO_4MB, or for identical boards with different external components, e.g. https://github.com/micropython/micropython/tree/master/ports/rp2/boards/W5500_EVB_PICO vs the 5100S).

Rather than having the autobuild know about the particular variants, this PR makes the board's mpconfigboard.mk describe them and have the autobuild discover them automatically.

The implementation is that a board can configure the BOARD_VARIANTS variable, and a new query-variants target is added stm32/Makefile get this. Then the board's mpconfigboard.mk can use the value of the optional BOARD_VARIANT variable to configure as required.

This is just a first step towards the goals above, and just implements it for stm32 -- the next step would be:

  • Move the query-variants target to the common makefile, and also implement for cmake targets.
  • Remove build-stm32-extra.sh and add the variant loop to build-boards.sh.

Also removes pybv3 from the autobuild as this isn't use by the downloads page.

Rather than having the autobuild know about the particular variants, have
the mpconfigboard.mk describe them and make autobuild discover them
automatically.

Adds a "query-variants" target to stm32/Makefile to allow the set of
possible variants to be queried.

Removes pybv3 from the autobuild as this isn't use by the downloads page.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
@dpgeorge dpgeorge merged commit 492ba5e into micropython:master Aug 26, 2022
tannewt added a commit to tannewt/circuitpython that referenced this pull request Jun 11, 2024
tannewt added a commit to tannewt/circuitpython that referenced this pull request Jun 11, 2024
tannewt added a commit to tannewt/circuitpython that referenced this pull request Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0