stm32: Move board variant config to mpconfigboard.mk. #9056
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 newquery-variants
target is added stm32/Makefile get this. Then the board's mpconfigboard.mk can use the value of the optionalBOARD_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:
build-stm32-extra.sh
and add the variant loop tobuild-boards.sh
.Also removes pybv3 from the autobuild as this isn't use by the downloads page.