esp8266: Rework board variant support to require mpconfigvariant file.

Following how esp32 has been reworked, each variant now has a corresponding
`mpconfigvariant_VARIANT.mk` file associated with it.  The base variant
also has a `mpconfigvariant.mk` file because it has options that none of
the other variants use.

Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
Damien George
2024-06-05 23:09:09 +10:00
parent 43ebbec0c5
commit daa948fe05
6 changed files with 53 additions and 52 deletions

View File

@@ -16,6 +16,12 @@ endif
$(error Invalid BOARD specified: $(BOARD_DIR))
endif
ifneq ($(BOARD_VARIANT),)
ifeq ($(wildcard $(BOARD_DIR)/mpconfigvariant_$(BOARD_VARIANT).mk),)
$(error Invalid BOARD_VARIANT specified: $(BOARD_VARIANT))
endif
endif
# If the build directory is not given, make it reflect the board name (and
# optionally the board variant).
ifneq ($(BOARD_VARIANT),)
@@ -26,8 +32,13 @@ endif
include ../../py/mkenv.mk
# Optional
-include $(BOARD_DIR)/mpconfigboard.mk
# Include board specific .mk file, and optional board variant .mk file.
include $(BOARD_DIR)/mpconfigboard.mk
ifeq ($(BOARD_VARIANT),)
-include $(BOARD_DIR)/mpconfigvariant.mk
else
include $(BOARD_DIR)/mpconfigvariant_$(BOARD_VARIANT).mk
endif
# qstr definitions (must come before including py.mk)
QSTR_DEFS = qstrdefsport.h #$(BUILD)/pins_qstr.h