From: Florent Kermarrec Date: Thu, 18 Jun 2015 22:52:39 +0000 (+0200) Subject: mibuild/xilinx/ise: fix source and set source to False by default on Windows (tools... X-Git-Tag: 24jan2021_ls180~2099^2~47 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7d8f4d1009c4e411c186d1328d0d4f84a74e3575;p=litex.git mibuild/xilinx/ise: fix source and set source to False by default on Windows (tools supposed to be in the PATH) --- diff --git a/mibuild/xilinx/ise.py b/mibuild/xilinx/ise.py index 784d33fc..6edd3dc2 100644 --- a/mibuild/xilinx/ise.py +++ b/mibuild/xilinx/ise.py @@ -107,9 +107,9 @@ def _run_ise(build_name, ise_path, source, mode, ngdbuild_opt, script_ext = ".sh" shell = ["bash"] build_script_contents = "# Autogenerated by mibuild\nset -e\n" - - settings = common.settings(ise_path, ver, "ISE_DS") - build_script_contents += source_cmd + settings + "\n" + if source: + settings = common.settings(ise_path, ver, "ISE_DS") + build_script_contents += source_cmd + settings + "\n" if mode == "edif": ext = "edif" else: @@ -145,6 +145,10 @@ def _default_ise_path(): return "/opt/Xilinx" +def _default_source(): + return False if sys.platform == "win32" else True + + class XilinxISEToolchain: def __init__(self): self.xst_opt = """-ifmt MIXED @@ -158,7 +162,7 @@ class XilinxISEToolchain: self.ise_commands = "" def build(self, platform, fragment, build_dir="build", build_name="top", - ise_path=_default_ise_path(), source=True, run=True, mode="xst"): + ise_path=_default_ise_path(), source=_default_source(), run=True, mode="xst"): tools.mkdir_noerror(build_dir) os.chdir(build_dir)