This commit reworks board variants on the esp32 port. It's a simple change
that moves the board variant configuration from an "if" statement within
`mpconfigboard.cmake` into separate files for each variant, with the name
of the variant encoded in the filename: `mpconfigvariant_VARIANT.cmake`.
Optionally, the base variant can have its own options in
`mpconfigvariant.cmake` (this is an optional file, but all other variants
of the base must have a corresponding mpconfigvariant file).
There are two benefits to this:
- The build system now gives an error if the variant that you specified
doesn't exist (because the mpconfigvariant file must exist with the
variant name you specify).
- No more error-prone if-logic needed in the .cmake files.
The way to build a variant is unchanged, still via:
$ make BOARD_VARIANT=VARIANT
Signed-off-by: Damien George <damien@micropython.org>
9 lines
173 B
CMake
9 lines
173 B
CMake
set(SDKCONFIG_DEFAULTS
|
|
${SDKCONFIG_DEFAULTS}
|
|
boards/sdkconfig.spiram
|
|
)
|
|
|
|
list(APPEND MICROPY_DEF_BOARD
|
|
MICROPY_HW_BOARD_NAME="Generic ESP32 module with SPIRAM"
|
|
)
|