Skip to content

Commit

Permalink
samd: Update the variant scheme.
Browse files Browse the repository at this point in the history
- Remove the query_variant tag from Makefile.
- Remove the definition of BOARD_VARIANTS.

- Use uppercase for board variants.
- Append the variant name to the build directory name.

Signed-off-by: robert-hh <robert@hammelrath.com>
  • Loading branch information
robert-hh committed Aug 15, 2023
1 parent da14bc0 commit 0f18337
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 13 deletions.
7 changes: 4 additions & 3 deletions ports/samd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ ifeq ($(wildcard $(BOARD_DIR)/.),)
$(error Invalid BOARD specified: $(BOARD_DIR))
endif

ifneq ($(BOARD_VARIANT),)
BUILD ?= build-$(BOARD)-$(BOARD_VARIANT)
else
BUILD ?= build-$(BOARD)
endif

CROSS_COMPILE ?= arm-none-eabi-
UF2CONV ?= $(TOP)/tools/uf2conv.py
Expand Down Expand Up @@ -194,9 +198,6 @@ OBJ += $(addprefix $(BUILD)/, $(LIBM_SRC_C:.c=.o))
OBJ += $(addprefix $(BUILD)/, $(DRIVERS_SRC_C:.c=.o))
OBJ += $(addprefix $(BUILD)/, $(TINYUSB_SRC_C:.c=.o))

query-variants:
$(ECHO) "VARIANTS:" $(BOARD_VARIANTS)

all: $(BUILD)/firmware.uf2

$(BUILD)/firmware.elf: $(OBJ)
Expand Down
2 changes: 1 addition & 1 deletion ports/samd/boards/ADAFRUIT_FEATHER_M4_EXPRESS/board.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
],
"mcu": "samd51",
"variants": {
"wlan": "WiFi support using a ESP32 module with NINA firmware"
"WLAN": "WiFi support using a ESP32 module with NINA firmware"
},
"product": "Feather M4 Express",
"thumbnail": "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,3 @@ TEXT0 = 0x4000
# The ?='s allow overriding in mpconfigboard.mk.
# MicroPython settings
MICROPY_HW_CODESIZE ?= 496K

BOARD_VARIANTS += "wlan"
2 changes: 1 addition & 1 deletion ports/samd/boards/ADAFRUIT_ITSYBITSY_M4_EXPRESS/board.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
],
"mcu": "samd51",
"variants": {
"wlan": "WiFi support using a ESP32 module with NINA firmware"
"WLAN": "WiFi support using a ESP32 module with NINA firmware"
},
"product": "ItsyBitsy M4 Express",
"thumbnail": "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,3 @@ TEXT0 = 0x4000
# The ?='s allow overriding in mpconfigboard.mk.
# MicroPython settings
MICROPY_HW_CODESIZE ?= 496K

BOARD_VARIANTS += "wlan"
2 changes: 1 addition & 1 deletion ports/samd/boards/ADAFRUIT_METRO_M4_EXPRESS/board.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
],
"mcu": "samd51",
"variants": {
"wlan": "WLAN using the on-board Airlift module"
"WLAN": "WLAN using the on-board Airlift module"
},
"product": "Metro M4 Express Airlift",
"thumbnail": "",
Expand Down
2 changes: 1 addition & 1 deletion ports/samd/boards/SPARKFUN_SAMD51_THING_PLUS/board.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
],
"mcu": "samd51",
"variants": {
"wlan": "WiFi support using a ESP32 module with NINA firmware"
"WLAN": "WiFi support using a ESP32 module with NINA firmware"
},
"product": "Sparkfun SAMD51 Thing Plus",
"thumbnail": "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@ TEXT0 = 0x4000
# The ?='s allow overriding in mpconfigboard.mk.
# MicroPython settings
MICROPY_HW_CODESIZE ?= 1008K
BOARD_VARIANTS += "wlan"
2 changes: 1 addition & 1 deletion ports/samd/mcu/samd51/mpconfigmcu.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ MICROPY_HW_CODESIZE ?= 368K
MICROPY_VFS_LFS2 ?= 1
MICROPY_VFS_FAT ?= 1

ifeq ($(BOARD_VARIANT),wlan)
ifeq ($(BOARD_VARIANT),WLAN)
MICROPY_PY_NETWORK ?= 1
MICROPY_PY_NETWORK_NINAW10 ?= 1
ifeq ($(MICROPY_HW_CODESIZE),496K)
Expand Down

0 comments on commit 0f18337

Please sign in to comment.