From 444a605deae6a561dbe2c49bf3062eae6f3cd887 Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Wed, 18 Nov 2020 15:40:06 +0100 Subject: [PATCH] build/xilinx: fix build with LITEX_ENV_VIVADO/LITEX_ENV_ISE set by user. --- litex/build/xilinx/ise.py | 4 ++-- litex/build/xilinx/vivado.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/litex/build/xilinx/ise.py b/litex/build/xilinx/ise.py index 8607383ea..2e255553a 100644 --- a/litex/build/xilinx/ise.py +++ b/litex/build/xilinx/ise.py @@ -161,10 +161,10 @@ bitgen {bitgen_opt} {build_name}.ncd {build_name}.bit{fail_stmt} tools.write_to_file(build_script_file, build_script_contents, force_unix=False) command = shell + [build_script_file] - if which("ise") is None: + if which("ise") is None and os.getenv("LITEX_ENV_ISE", False) == False: msg = "Unable to find or source ISE toolchain, please either:\n" msg += "- Source ISE's settings manually.\n" - msg += "- Or set LITEX_ISE_VIVADO environment variant to ISE's settings path.\n" + msg += "- Or set LITEX_ENV_ISE environment variant to ISE's settings path.\n" msg += "- Or add ISE toolchain to your $PATH." raise OSError(msg) diff --git a/litex/build/xilinx/vivado.py b/litex/build/xilinx/vivado.py index 26e9f6563..64474b3f9 100644 --- a/litex/build/xilinx/vivado.py +++ b/litex/build/xilinx/vivado.py @@ -90,7 +90,7 @@ def _run_script(script): else: shell = ["bash"] - if which("vivado") is None: + if which("vivado") is None and os.getenv("LITEX_ENV_VIVADO", False) == False: msg = "Unable to find or source Vivado toolchain, please either:\n" msg += "- Source Vivado's settings manually.\n" msg += "- Or set LITEX_ENV_VIVADO environment variant to Vivado's settings path.\n"