1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

Makefile*: Allow multiple external board dirs

- Add the new EXTERNAL_BOARD_DIRS variable that can contain a space separated
  list of folders containing external boards
- Introduce $(BOARDDIR) as shortcut for $(BOARDSDIR)/$(BOARD)
- Map the existing BOARDSDIR to the new approach
    - If BOARDSDIR is provided by the user, it will be added to
      EXTERNAL_BOARD_DIRS for backward compatibility. (And a warning is issued
      to encourage users migrating to EXTRA_BOARDS.)
    - BOARDSDIR is updated after the board is found to "$(BOARDDIR)/..".
        - Useful for `include $(BOARDSDIR)/common/external_common/Makefile.dep`
        - Provides backward compatibility
This commit is contained in:
Marian Buschsieweke 2020-04-14 15:23:23 +02:00
parent 1c22ee8782
commit ba7815163c
No known key found for this signature in database
GPG Key ID: 61F64C6599B1539F
16 changed files with 112 additions and 92 deletions

View File

@ -2,7 +2,7 @@
-include $(APPDIR)/Makefile.board.dep -include $(APPDIR)/Makefile.board.dep
# include board dependencies # include board dependencies
-include $(BOARDSDIR)/$(BOARD)/Makefile.dep -include $(BOARDDIR)/Makefile.dep
# include cpu dependencies # include cpu dependencies
-include $(RIOTCPU)/$(CPU)/Makefile.dep -include $(RIOTCPU)/$(CPU)/Makefile.dep

View File

@ -9,7 +9,7 @@
# Moving 'CPU/CPU_MODEL' to Makefile.features is an ongoing work and may not # Moving 'CPU/CPU_MODEL' to Makefile.features is an ongoing work and may not
# reflect the state of all boards for the moment. # reflect the state of all boards for the moment.
include $(BOARDSDIR)/$(BOARD)/Makefile.features include $(BOARDDIR)/Makefile.features
# Sanity check # Sanity check
ifeq (,$(CPU)) ifeq (,$(CPU))

View File

@ -23,24 +23,24 @@ include $(RIOT_MAKEFILES_GLOBAL_PRE)
-include Makefile.local -include Makefile.local
# set undefined variables # set undefined variables
RIOTBASE ?= $(_riotbase) RIOTBASE ?= $(_riotbase)
RIOTCPU ?= $(RIOTBASE)/cpu RIOTCPU ?= $(RIOTBASE)/cpu
# Deprecated to set RIOTBOARD, use BOARDSDIR # Deprecated to set RIOTBOARD, use EXTERNAL_BOARD_DIRS
RIOTBOARD ?= $(RIOTBASE)/boards RIOTBOARD ?= $(RIOTBASE)/boards
BOARDSDIR ?= $(RIOTBOARD) EXTERNAL_BOARD_DIRS ?=
RIOTMAKE ?= $(RIOTBASE)/makefiles RIOTMAKE ?= $(RIOTBASE)/makefiles
RIOTPKG ?= $(RIOTBASE)/pkg RIOTPKG ?= $(RIOTBASE)/pkg
RIOTTOOLS ?= $(RIOTBASE)/dist/tools RIOTTOOLS ?= $(RIOTBASE)/dist/tools
RIOTPROJECT ?= $(shell git rev-parse --show-toplevel 2>/dev/null || pwd) RIOTPROJECT ?= $(shell git rev-parse --show-toplevel 2>/dev/null || pwd)
GITCACHE ?= $(RIOTTOOLS)/git/git-cache GITCACHE ?= $(RIOTTOOLS)/git/git-cache
GIT_CACHE_DIR ?= $(HOME)/.gitcache GIT_CACHE_DIR ?= $(HOME)/.gitcache
BUILD_DIR ?= $(RIOTBASE)/build BUILD_DIR ?= $(RIOTBASE)/build
APPDIR ?= $(CURDIR) APPDIR ?= $(CURDIR)
BINDIRBASE ?= $(APPDIR)/bin BINDIRBASE ?= $(APPDIR)/bin
BINDIR ?= $(BINDIRBASE)/$(BOARD) BINDIR ?= $(BINDIRBASE)/$(BOARD)
PKGDIRBASE ?= $(BINDIRBASE)/pkg/$(BOARD) PKGDIRBASE ?= $(BINDIRBASE)/pkg/$(BOARD)
DLCACHE ?= $(RIOTTOOLS)/dlcache/dlcache.sh DLCACHE ?= $(RIOTTOOLS)/dlcache/dlcache.sh
DLCACHE_DIR ?= $(RIOTBASE)/.dlcache DLCACHE_DIR ?= $(RIOTBASE)/.dlcache
# include CI info such as BOARD_INSUFFICIENT_MEMORY, if existing # include CI info such as BOARD_INSUFFICIENT_MEMORY, if existing
-include Makefile.ci -include Makefile.ci
@ -67,34 +67,52 @@ __OVERRIDE_DIRECTORY_VARIABLES := $(__DIRECTORY_VARIABLES)
# Use absolute paths in recursive "make" even if overridden on command line. # Use absolute paths in recursive "make" even if overridden on command line.
MAKEOVERRIDES += $(foreach v,$(__OVERRIDE_DIRECTORY_VARIABLES),$(v)=$($(v))) MAKEOVERRIDES += $(foreach v,$(__OVERRIDE_DIRECTORY_VARIABLES),$(v)=$($(v)))
# Setting EXTERNAL_BOARD_DIRS as command line argument is too messy to handle:
# Even when every path in EXTERNAL_BOARD_DIRS is turned into an absolute path
# using override, sub-makes will still get the original value. Using
# MAKEOVERRIDES has issues with spaces in the values, which are used as
# separator in EXTERNAL_BOARD_DIRS. So we just enforce setting the value
# either in a Makefile, or as environment variable.
ifeq ($(origin EXTERNAL_BOARD_DIRS),command line)
# In Docker absolute paths are always given, so only fail when not in docker
ifeq ($(INSIDE_DOCKER),0)
$(error EXTERNAL_BOARD_DIRS must be passed as environment variable, and not as command line argument)
endif
endif
# Deprecation of configuring 'RIOTBOARD' # Deprecation of configuring 'RIOTBOARD'
ifneq ($(abspath $(RIOTBASE)/boards),$(abspath $(RIOTBOARD))) ifneq ($(abspath $(RIOTBASE)/boards),$(abspath $(RIOTBOARD)))
$(warning overriding RIOTBOARD for external boards is deprecated, please use an absolute BOARDSDIR) $(warning overriding RIOTBOARD for external boards is deprecated, use EXTERNAL_BOARD_DIRS instead)
override RIOTBOARD := $(abspath $(RIOTBOARD)) override RIOTBOARD := $(abspath $(RIOTBOARD))
__DIRECTORY_VARIABLES += RIOTBOARD __DIRECTORY_VARIABLES += RIOTBOARD
endif endif
ifneq (,$(BOARDSDIR))
# Only warn users, not the CI.
ifneq ($(RIOT_CI_BUILD),1)
$(warning Using BOARDSDIR is deprecated use EXTERNAL_BOARD_DIRS instead)
$(info EXTERNAL_BOARD_DIRS can contain multiple folders separated by space)
endif
EXTERNAL_BOARD_DIRS += $(BOARDSDIR)
endif
# Make all paths absolute. # Make all paths absolute.
override RIOTBASE := $(abspath $(RIOTBASE)) override RIOTBASE := $(abspath $(RIOTBASE))
override RIOTCPU := $(abspath $(RIOTCPU)) override RIOTCPU := $(abspath $(RIOTCPU))
override RIOTMAKE := $(abspath $(RIOTMAKE)) override RIOTMAKE := $(abspath $(RIOTMAKE))
override RIOTPKG := $(abspath $(RIOTPKG)) override RIOTPKG := $(abspath $(RIOTPKG))
override RIOTTOOLS := $(abspath $(RIOTTOOLS)) override RIOTTOOLS := $(abspath $(RIOTTOOLS))
override RIOTPROJECT := $(abspath $(RIOTPROJECT)) override RIOTPROJECT := $(abspath $(RIOTPROJECT))
override GITCACHE := $(abspath $(GITCACHE)) override GITCACHE := $(abspath $(GITCACHE))
override APPDIR := $(abspath $(APPDIR)) override APPDIR := $(abspath $(APPDIR))
override BUILD_DIR := $(abspath $(BUILD_DIR)) override BUILD_DIR := $(abspath $(BUILD_DIR))
override BINDIRBASE := $(abspath $(BINDIRBASE)) override BINDIRBASE := $(abspath $(BINDIRBASE))
override BINDIR := $(abspath $(BINDIR)) override BINDIR := $(abspath $(BINDIR))
override PKGDIRBASE := $(abspath $(PKGDIRBASE)) override PKGDIRBASE := $(abspath $(PKGDIRBASE))
override DLCACHE_DIR := $(abspath $(DLCACHE_DIR)) override DLCACHE_DIR := $(abspath $(DLCACHE_DIR))
EXTERNAL_BOARD_DIRS := $(foreach dir,\
# Keep standard make behavior for new variables $(EXTERNAL_BOARD_DIRS),\
__DIRECTORY_VARIABLES += \ $(abspath $(dir)))
BOARDSDIR \
#
BOARDSDIR := $(abspath $(BOARDSDIR))
# Ensure that all directories are set and don't contain spaces. # Ensure that all directories are set and don't contain spaces.
ifneq (, $(filter-out 1, $(foreach v,$(__DIRECTORY_VARIABLES),$(words $($(v)))))) ifneq (, $(filter-out 1, $(foreach v,$(__DIRECTORY_VARIABLES),$(words $($(v))))))
@ -159,18 +177,21 @@ else
all: link all: link
# Include Board and CPU configuration, if BOARD is not found in BOARDSDIR # Folders to search: First the external boards, than the official
# e.g. when set by the environment fallback to searching in RIOTBOARD BOARDSDIRS := $(EXTERNAL_BOARD_DIRS) $(RIOTBOARD)
ifeq (,$(wildcard $(BOARDSDIR)/$(BOARD)/.))
ifneq ($(RIOTBOARD),$(BOARDSDIR)) # Take the first folder in $(BOARDSDIRS) that contains a folder named $(BOARD)
# The specified board $(BOARD) was not found in $(BOARDSDIR) fallback to RIOTBOARD BOARDDIR := $(word 1,$(foreach dir,$(BOARDSDIRS),$(wildcard $(dir)/$(BOARD)/.)))
BOARDSDIR = $(RIOTBOARD) # Sanitize folder
endif BOARDDIR := $(abspath $(BOARDDIR))
ifeq ($(RIOTBOARD),$(BOARDSDIR))
ifeq (,$(wildcard $(BOARDSDIR)/$(BOARD)/.)) # Also provide BOARDSDIR for compatibility and for accessing common folders
$(error The specified board $(BOARD) does not exist.) # (e.g. include $(BOARDSDIR)/common/external_common/Makefile.dep)
endif BOARDSDIR := $(dir $(BOARDDIR))
endif
ifeq (,$(BOARDDIR))
$(info Folders searched for the board: $(BOARDSDIRS))
$(error The specified board $(BOARD) does not exist.)
endif endif
include $(RIOTMAKE)/info.inc.mk include $(RIOTMAKE)/info.inc.mk
@ -332,8 +353,8 @@ include $(RIOTMAKE)/pseudomodules.inc.mk
include $(RIOTMAKE)/defaultmodules.inc.mk include $(RIOTMAKE)/defaultmodules.inc.mk
# Include Board and CPU configuration # Include Board and CPU configuration
INCLUDES += $(addprefix -I,$(wildcard $(BOARDSDIR)/$(BOARD)/include)) INCLUDES += $(addprefix -I,$(wildcard $(BOARDDIR)/include))
include $(BOARDSDIR)/$(BOARD)/Makefile.include include $(BOARDDIR)/Makefile.include
INCLUDES += -I$(RIOTCPU)/$(CPU)/include INCLUDES += -I$(RIOTCPU)/$(CPU)/include
include $(RIOTCPU)/$(CPU)/Makefile.include include $(RIOTCPU)/$(CPU)/Makefile.include

View File

@ -226,9 +226,10 @@ All `BOARD`s in RIOT reside in `RIOTBOARD` (`RIOTBOARD` being a make variable
set to `$(RIOTBOARD)/boards`). set to `$(RIOTBOARD)/boards`).
If one wants to use a `BOARD` outside of `RIOTBOARD`, the way to go is setting If one wants to use a `BOARD` outside of `RIOTBOARD`, the way to go is setting
the `BOARDSDIR` variable to the path to the directory containing your external the `EXTERNAL_BOARD_DIRS` variable to the path to the directory containing your
boards, e.g.: `BOARDSDIR=/home/external-boards/` (this would commonly be done external boards, e.g.: `EXTERNAL_BOARD_DIRS=/home/external-boards/` (this would
in your application `Makefile` or your environment). commonly be done in your application `Makefile` or your environment). You can
specify multiple directories separated by spaces.
``` ```
/home/ /home/

View File

@ -1,6 +1,6 @@
MODULE = $(APPLICATION_MODULE) MODULE = $(APPLICATION_MODULE)
DIRS += $(RIOTCPU)/$(CPU) $(BOARDSDIR)/$(BOARD) DIRS += $(RIOTCPU)/$(CPU) $(BOARDDIR)
DIRS += $(RIOTBASE)/core $(RIOTBASE)/drivers $(RIOTBASE)/sys DIRS += $(RIOTBASE)/core $(RIOTBASE)/drivers $(RIOTBASE)/sys
# For regular modules, adding files to BLOBS to their Makefile is sufficient to # For regular modules, adding files to BLOBS to their Makefile is sufficient to

View File

@ -1,19 +1,17 @@
# Default when RIOTBASE is not set and is executed from the RIOT directory # Default when RIOTBASE is not set and is executed from the RIOT directory
RIOTBOARD ?= $(or $(RIOTBASE),$(CURDIR))/boards RIOTBOARD ?= $(or $(RIOTBASE),$(CURDIR))/boards
BOARDSDIR ?= $(RIOTBOARD) BOARDSDIRS ?= $(EXTERNAL_BOARD_DIRS) $(RIOTBOARD)
# List all boards in a directory # List all boards in a directory
# By default, all directories in BOARDSDIR except 'common' # By default, all directories in board directory except 'common'
# use 'wildcard */.' to only list directories # use 'wildcard */.' to only list directories
_get_boards_in_directory = $(filter-out common,$(patsubst $1/%/.,%,$(wildcard $1/*/.))) _get_boards_in_directory = $(filter-out common,$(patsubst $1/%/.,%,$(wildcard $1/*/.)))
# If BOARDSDIR is not in RIOTBOARD also list BOARDS in RIOTBOARD # Use `:=` so that it is evaluated before BOARDSDIRS gets eventually changed
ifneq ($(RIOTBOARD),$(BOARDSDIR)) ALLBOARDS := $(sort \
ALLBOARDS_RIOTBOARD ?= $(call _get_boards_in_directory,$(RIOTBOARD)) $(foreach dir,\
endif $(BOARDSDIRS),\
$(call _get_boards_in_directory,$(dir))))
# Use `:=` so that it is evaluated before BOARDSDIR gets eventually changed
ALLBOARDS := $(sort $(call _get_boards_in_directory,$(BOARDSDIR)) $(ALLBOARDS_RIOTBOARD))
# Set the default value from `BOARDS` # Set the default value from `BOARDS`
BOARDS ?= $(ALLBOARDS) BOARDS ?= $(ALLBOARDS)

View File

@ -79,7 +79,7 @@ riotboot/flash-bootloader: riotboot/bootloader/flash
riotboot/bootloader/%: riotboot/bootloader/%:
$(Q)/usr/bin/env -i \ $(Q)/usr/bin/env -i \
QUIET=$(QUIET) PATH=$(PATH)\ QUIET=$(QUIET) PATH=$(PATH)\
BOARDSDIR=$(BOARDSDIR) BOARD=$(BOARD)\ EXTERNAL_BOARD_DIRS="$(EXTERNAL_BOARD_DIRS)" BOARD=$(BOARD)\
DEBUG_ADAPTER_ID=$(DEBUG_ADAPTER_ID)\ DEBUG_ADAPTER_ID=$(DEBUG_ADAPTER_ID)\
$(MAKE) --no-print-directory -C $(RIOTBOOT_DIR) $* $(MAKE) --no-print-directory -C $(RIOTBOOT_DIR) $*

View File

@ -251,11 +251,11 @@ DOCKER_VOLUMES_AND_ENV += $(if $(wildcard $(GIT_CACHE_DIR)),-e 'GIT_CACHE_DIR=$(
DOCKER_VOLUMES_AND_ENV += $(call docker_volumes_mapping,$(EXTERNAL_MODULE_DIRS),$(DOCKER_BUILD_ROOT)/external,) DOCKER_VOLUMES_AND_ENV += $(call docker_volumes_mapping,$(EXTERNAL_MODULE_DIRS),$(DOCKER_BUILD_ROOT)/external,)
DOCKER_OVERRIDE_CMDLINE += $(call docker_cmdline_mapping,EXTERNAL_MODULE_DIRS,$(DOCKER_BUILD_ROOT)/external,) DOCKER_OVERRIDE_CMDLINE += $(call docker_cmdline_mapping,EXTERNAL_MODULE_DIRS,$(DOCKER_BUILD_ROOT)/external,)
# Remap 'BOARDSDIR' if it is external # Remap 'EXTERNAL_BOARD_DIRS' if they are external
DOCKER_VOLUMES_AND_ENV += $(call docker_volumes_mapping,$(BOARDSDIR),,boards) DOCKER_VOLUMES_AND_ENV += $(call docker_volumes_mapping,$(EXTERNAL_BOARD_DIRS),$(DOCKER_BUILD_ROOT)/external,)
# Value is overridden from command line if it is not the default value # Value is overridden from command line if it is not the default value
# This allows handling even if the value is set in the 'Makefile'. # This allows handling even if the value is set in the 'Makefile'.
DOCKER_OVERRIDE_CMDLINE += $(if $(findstring $(RIOTBOARD),$(BOARDSDIR)),,$(call docker_cmdline_mapping,BOARDSDIR,,boards)) DOCKER_OVERRIDE_CMDLINE += $(call docker_cmdline_mapping,EXTERNAL_BOARD_DIRS,$(DOCKER_BUILD_ROOT)/external,)
# External module directories sanity check: # External module directories sanity check:
# #

View File

@ -11,7 +11,7 @@ include $(RIOTMAKE)/defaultmodules.inc.mk
USEMODULE += $(filter-out $(DISABLE_MODULE),$(DEFAULT_MODULE)) USEMODULE += $(filter-out $(DISABLE_MODULE),$(DEFAULT_MODULE))
include $(RIOTMAKE)/dependency_resolution.inc.mk include $(RIOTMAKE)/dependency_resolution.inc.mk
BOARDSDIR_GLOBAL := $(BOARDSDIR) BOARDDIR_GLOBAL := $(BOARDDIR)
USEMODULE_GLOBAL := $(USEMODULE) USEMODULE_GLOBAL := $(USEMODULE)
USEPKG_GLOBAL := $(USEPKG) USEPKG_GLOBAL := $(USEPKG)
FEATURES_REQUIRED_GLOBAL := $(FEATURES_REQUIRED) FEATURES_REQUIRED_GLOBAL := $(FEATURES_REQUIRED)
@ -24,7 +24,6 @@ FEATURES_BLACKLIST_GLOBAL := $(FEATURES_BLACKLIST)
define board_unsatisfied_features define board_unsatisfied_features
BOARD := $(1) BOARD := $(1)
BOARDSDIR := $(BOARDSDIR_GLOBAL)
USEMODULE := $(USEMODULE_GLOBAL) USEMODULE := $(USEMODULE_GLOBAL)
USEPKG := $(USEPKG_GLOBAL) USEPKG := $(USEPKG_GLOBAL)
DISABLE_MODULE := $(DISABLE_MODULE_GLOBAL) DISABLE_MODULE := $(DISABLE_MODULE_GLOBAL)
@ -35,6 +34,9 @@ define board_unsatisfied_features
FEATURES_CONFLICT_MSG := $(FEATURES_CONFLICT_MSG_GLOBAL) FEATURES_CONFLICT_MSG := $(FEATURES_CONFLICT_MSG_GLOBAL)
FEATURES_BLACKLIST:= $(FEATURES_BLACKLIST_GLOBAL) FEATURES_BLACKLIST:= $(FEATURES_BLACKLIST_GLOBAL)
# Find matching board folder
BOARDDIR := $(word 1,$(foreach dir,$(BOARDSDIRS),$(wildcard $(dir)/$(BOARD)/.)))
# Remove board specific variables set by Makefile.features/Makefile.dep # Remove board specific variables set by Makefile.features/Makefile.dep
FEATURES_PROVIDED := FEATURES_PROVIDED :=
FEATURES_USED := FEATURES_USED :=
@ -46,12 +48,6 @@ define board_unsatisfied_features
undefine CPU_ARCH undefine CPU_ARCH
undefine CPU_FAM undefine CPU_FAM
# Replicate Makefile.include handling that sets BOARDSDIR to RIOTBOARD
# when BOARD is not found in BOARDSDIR
ifeq (,$(wildcard $(BOARDSDIR_GLOBAL)/$(BOARD)/.))
BOARDSDIR = $(RIOTBOARD)
endif
include $(RIOTBASE)/Makefile.features include $(RIOTBASE)/Makefile.features
# FEATURES_USED must be populated first in this case so that dependency # FEATURES_USED must be populated first in this case so that dependency
# resolution can take optional features into account during the first pass. # resolution can take optional features into account during the first pass.
@ -132,4 +128,4 @@ info-boards-features-missing:
# Reset BOARDSDIR so unchanged for makefiles included after, for now only # Reset BOARDSDIR so unchanged for makefiles included after, for now only
# needed for buildtests.inc.mk # needed for buildtests.inc.mk
BOARDSDIR := $(BOARDSDIR_GLOBAL) BOARDDIR := $(BOARDDIR_GLOBAL)

View File

@ -34,10 +34,11 @@ info-build:
@echo 'CPU: $(CPU)' @echo 'CPU: $(CPU)'
@echo 'MCU: $(MCU)' @echo 'MCU: $(MCU)'
@echo '' @echo ''
@echo 'RIOTBASE: $(RIOTBASE)' @echo 'RIOTBASE: $(RIOTBASE)'
@echo 'BOARDSDIR: $(BOARDSDIR)' @echo 'BOARDDIR: $(BOARDDIR)'
@echo 'RIOTCPU: $(RIOTCPU)' @echo 'EXTERNAL_BOARD_DIRS:$(EXTERNAL_BOARD_DIRS)'
@echo 'RIOTPKG: $(RIOTPKG)' @echo 'RIOTCPU: $(RIOTCPU)'
@echo 'RIOTPKG: $(RIOTPKG)'
@echo '' @echo ''
@echo 'DEFAULT_MODULE: $(sort $(filter-out $(DISABLE_MODULE), $(DEFAULT_MODULE)))' @echo 'DEFAULT_MODULE: $(sort $(filter-out $(DISABLE_MODULE), $(DEFAULT_MODULE)))'
@echo 'DISABLE_MODULE: $(sort $(DISABLE_MODULE))' @echo 'DISABLE_MODULE: $(sort $(DISABLE_MODULE))'

View File

@ -7,6 +7,7 @@ SCANBUILD_ENV_VARS := \
BINDIR \ BINDIR \
BINDIRBASE \ BINDIRBASE \
BOARD \ BOARD \
BOARDDIR \
BOARDSDIR \ BOARDSDIR \
BUILD_DIR \ BUILD_DIR \
BUILDRELPATH \ BUILDRELPATH \

View File

@ -1,5 +1,5 @@
FLASHER = avrdude FLASHER = avrdude
DIST_PATH = $(BOARDSDIR)/$(BOARD)/dist DIST_PATH = $(BOARDDIR)/dist
AVARICE_PATH = $(RIOTTOOLS)/avarice AVARICE_PATH = $(RIOTTOOLS)/avarice
DEBUGSERVER_PORT = 4242 DEBUGSERVER_PORT = 4242
DEBUGSERVER = $(AVARICE_PATH)/debug_srv.sh DEBUGSERVER = $(AVARICE_PATH)/debug_srv.sh

View File

@ -17,7 +17,7 @@ endif
ifeq (,$(OPENOCD_CONFIG)) ifeq (,$(OPENOCD_CONFIG))
# if no openocd default configuration is provided by the board, # if no openocd default configuration is provided by the board,
# use the STM32 common one # use the STM32 common one
ifeq (0,$(words $(wildcard $(BOARDSDIR)/$(BOARD)/dist/openocd.cfg))) ifeq (0,$(words $(wildcard $(BOARDDIR)/dist/openocd.cfg)))
OPENOCD_CONFIG = $(RIOTBASE)/boards/common/stm32/dist/$(CPU).cfg OPENOCD_CONFIG = $(RIOTBASE)/boards/common/stm32/dist/$(CPU).cfg
endif endif
endif endif

View File

@ -13,7 +13,7 @@ ifneq (,$(DEBUG_ADAPTER))
include $(RIOTMAKE)/tools/openocd-adapters/$(DEBUG_ADAPTER).inc.mk include $(RIOTMAKE)/tools/openocd-adapters/$(DEBUG_ADAPTER).inc.mk
endif endif
OPENOCD_CONFIG ?= $(BOARDSDIR)/$(BOARD)/dist/openocd.cfg OPENOCD_CONFIG ?= $(BOARDDIR)/dist/openocd.cfg
# Export OPENOCD_CONFIG to required targets # Export OPENOCD_CONFIG to required targets
OPENOCD_TARGETS = debug% flash% reset OPENOCD_TARGETS = debug% flash% reset

View File

@ -1,9 +1,9 @@
# http://www.ti.com/tool/uniflash # http://www.ti.com/tool/uniflash
FLASHFILE ?= $(ELFFILE) FLASHFILE ?= $(ELFFILE)
UNIFLASH_CONFIG_CCXML ?= $(BOARDSDIR)/$(BOARD)/dist/$(CPU_MODEL)_$(XDEBUGGER).ccxml UNIFLASH_CONFIG_CCXML ?= $(BOARDDIR)/dist/$(CPU_MODEL)_$(XDEBUGGER).ccxml
UNIFLASH_CONFIG_DAT ?= $(BOARDSDIR)/$(BOARD)/dist/$(CPU_MODEL)_$(XDEBUGGER).dat UNIFLASH_CONFIG_DAT ?= $(BOARDDIR)/dist/$(CPU_MODEL)_$(XDEBUGGER).dat
UNIFLASH_CONFIG_GDB ?= $(BOARDSDIR)/$(BOARD)/dist/$(CPU_MODEL)_gdb.conf UNIFLASH_CONFIG_GDB ?= $(BOARDDIR)/dist/$(CPU_MODEL)_gdb.conf
UNIFLASH_PATH ?= "UNIFLASH_PATH unconfigured" UNIFLASH_PATH ?= "UNIFLASH_PATH unconfigured"
# check which uniflash version is available, either 4.x or 3.x # check which uniflash version is available, either 4.x or 3.x

View File

@ -29,7 +29,9 @@ export APPDEPS # Files / Makefile targets that need to be created
export RIOTBASE # The root folder of RIOT. The folder where this very file lives in. export RIOTBASE # The root folder of RIOT. The folder where this very file lives in.
export RIOTCPU # For third party CPUs this folder is the base of the CPUs. export RIOTCPU # For third party CPUs this folder is the base of the CPUs.
export RIOTBOARD # This folder is the base of the riot boards. export RIOTBOARD # This folder is the base of the riot boards.
export BOARDSDIR # For third party BOARDs this folder is the base of the BOARDs. export BOARDSDIR # This is the folder containing the board dir
export EXTERNAL_BOARD_DIRS # List of folders containing external board dirs
export BOARDDIR # This folder contains the board
export RIOTPKG # For overriding RIOT's pkg directory export RIOTPKG # For overriding RIOT's pkg directory
export RIOTTOOLS # Location of host machine tools export RIOTTOOLS # Location of host machine tools
export RIOTPROJECT # Top level git root of the project being built, or PWD if not a git repository export RIOTPROJECT # Top level git root of the project being built, or PWD if not a git repository