mirror of
https://github.com/micropython/micropython.git
synced 2026-01-06 20:20:14 +01:00
ports: Make BOARD default from BOARD_DIR in Makefile's.
This allows:
$ make BOARD_DIR=path/to/board
to infer BOARD=board, rather than the previous behavior that required
additionally setting BOARD explicitly.
Also makes the same change for VARIANT_DIR -> VARIANT on Unix.
This work was funded through GitHub Sponsors.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
committed by
Damien George
parent
b110266897
commit
69b93527d5
@@ -1,14 +1,23 @@
|
||||
# Select the board to build for:
|
||||
ifdef BOARD_DIR
|
||||
# Custom board path - remove trailing slash and get the final component of
|
||||
# the path as the board name.
|
||||
BOARD ?= $(notdir $(BOARD_DIR:/=))
|
||||
else
|
||||
# If not given on the command line, then default to ADAFRUIT_ITSYBITSY_M4_EXPRESS.
|
||||
BOARD ?= ADAFRUIT_ITSYBITSY_M4_EXPRESS
|
||||
BOARD_DIR ?= boards/$(BOARD)
|
||||
BUILD ?= build-$(BOARD)
|
||||
|
||||
CROSS_COMPILE ?= arm-none-eabi-
|
||||
UF2CONV ?= $(TOP)/tools/uf2conv.py
|
||||
endif
|
||||
|
||||
ifeq ($(wildcard $(BOARD_DIR)/.),)
|
||||
$(error Invalid BOARD specified: $(BOARD_DIR))
|
||||
endif
|
||||
|
||||
BUILD ?= build-$(BOARD)
|
||||
|
||||
CROSS_COMPILE ?= arm-none-eabi-
|
||||
UF2CONV ?= $(TOP)/tools/uf2conv.py
|
||||
|
||||
MCU_SERIES_LOWER = $(shell echo $(MCU_SERIES) | tr '[:upper:]' '[:lower:]')
|
||||
|
||||
include ../../py/mkenv.mk
|
||||
|
||||
Reference in New Issue
Block a user