fix(efinity): fail early when toolchain is missing
This commit is contained in:
+12
-4
@@ -16,10 +16,18 @@ FIRTOOL ?= $(firstword $(wildcard $(SOC_TOOLS_ROOT)/circt-current/bin/firtool) $
|
||||
Z3_LIB_DIR ?= $(firstword $(wildcard $(SOC_TOOLS_ROOT)/z3-current/bin) $(wildcard $(PROJECT_TOOLS_DIR)/z3/*/bin))
|
||||
CIRCT_LIB_DIR ?= $(patsubst %/bin/firtool,%/lib,$(FIRTOOL))
|
||||
VIVADO ?= $(lastword $(sort $(wildcard /tools/Xilinx/*/Vivado/bin/vivado) $(shell command -v vivado 2>/dev/null)))
|
||||
EFINITY_HOME ?= $(lastword $(sort $(wildcard /tools/efinix/efinity/*)))
|
||||
EFINITY_SETUP ?= $(EFINITY_HOME)/bin/setup.sh
|
||||
EFX_RUN ?= $(EFINITY_HOME)/scripts/efx_run.py
|
||||
EFX_PGM ?= $(EFINITY_HOME)/pgm/bin/ftdi_pgm.sh
|
||||
_EFINITY_SETUP_CANDIDATES := $(sort \
|
||||
$(wildcard /tools/efinix/efinity/*/bin/setup.sh) \
|
||||
$(wildcard /opt/efinix/efinity/*/bin/setup.sh) \
|
||||
$(wildcard /opt/efinity/bin/setup.sh) \
|
||||
$(wildcard /opt/efinity/*/bin/setup.sh) \
|
||||
$(wildcard $(HOME)/efinix/efinity/*/bin/setup.sh) \
|
||||
$(wildcard $(HOME)/Efinity/*/bin/setup.sh) \
|
||||
$(wildcard $(PROJECT_TOOLS_DIR)/efinity/*/bin/setup.sh))
|
||||
EFINITY_HOME ?= $(patsubst %/bin/setup.sh,%,$(lastword $(_EFINITY_SETUP_CANDIDATES)))
|
||||
EFINITY_SETUP ?= $(if $(strip $(EFINITY_HOME)),$(EFINITY_HOME)/bin/setup.sh)
|
||||
EFX_RUN ?= $(if $(strip $(EFINITY_HOME)),$(EFINITY_HOME)/scripts/efx_run.py)
|
||||
EFX_PGM ?= $(if $(strip $(EFINITY_HOME)),$(EFINITY_HOME)/pgm/bin/ftdi_pgm.sh)
|
||||
|
||||
# RISCV_TOOLCHAIN may point either to the toolchain root or its bin directory.
|
||||
# TOOLCHAIN keeps compatibility with the existing software Makefiles.
|
||||
|
||||
Reference in New Issue
Block a user