build/xilinx: source settings64.sh automatically just before build if LITEX_ENV_ISE...
authorFlorent Kermarrec <florent@enjoy-digital.fr>
Tue, 19 May 2020 14:21:52 +0000 (16:21 +0200)
committerFlorent Kermarrec <florent@enjoy-digital.fr>
Tue, 19 May 2020 14:21:52 +0000 (16:21 +0200)
litex/build/xilinx/ise.py
litex/build/xilinx/vivado.py

index 57864174a59be5a11aad7bff697413e116cebf0f..4e90459986fad102f0a6c1f0dcd850572fe51fba 100644 (file)
@@ -115,6 +115,9 @@ def _run_ise(build_name, mode, ngdbuild_opt, toolchain, platform):
         script_ext = ".sh"
         shell = ["bash"]
         build_script_contents = "# Autogenerated by LiteX / git: " + tools.get_litex_git_revision() + "\nset -e\n"
+        litex_env_ise = os.getenv("LITEX_ENV_ISE", None)
+        if litex_env_ise is not None:
+            build_script_contents += "source " + os.path.join(litex_env_ise, "settings64.sh\n")
         fail_stmt = ""
     if mode == "edif":
         ext = "ngo"
index 8652d7862b7c91d0da9113d6e5e9edaadfa5232a..2f707e2d458b906dbf5b5f1f904f3b9f4c75fc55 100644 (file)
@@ -73,6 +73,9 @@ def _build_script(build_name):
         tools.write_to_file(script_file, script_contents)
     else:
         script_contents = "# Autogenerated by LiteX / git: " + tools.get_litex_git_revision() + "\nset -e\n"
+        litex_env_vivado = os.getenv("LITEX_ENV_VIVADO", None)
+        if litex_env_vivado is not None:
+            script_contents += "source " + os.path.join(litex_env_vivado, "settings64.sh\n")
         script_contents += "vivado -mode batch -source " + build_name + ".tcl\n"
         script_file = "build_" + build_name + ".sh"
         tools.write_to_file(script_file, script_contents)