Skip to content

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 <[email protected]>
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