From: Florent Kermarrec Date: Wed, 30 Nov 2016 14:28:38 +0000 (+0100) Subject: build/xilinx/vivado: fix settings source on linux X-Git-Tag: 24jan2021_ls180~1927 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4f3ce6db2b1d2a5b4a15560b713fee34e56e9bf9;p=litex.git build/xilinx/vivado: fix settings source on linux --- diff --git a/litex/build/xilinx/vivado.py b/litex/build/xilinx/vivado.py index 424cb1fb..4d9a8d2b 100644 --- a/litex/build/xilinx/vivado.py +++ b/litex/build/xilinx/vivado.py @@ -59,6 +59,8 @@ def _run_vivado(build_name, vivado_path, source, ver=None): r = subprocess.call([build_script_file]) else: build_script_contents = "# Autogenerated by LiteX\nset -e\n" + if vivado_path is None: + vivado_path = "/opt/Xilinx/Vivado" settings = common.settings(vivado_path, ver) build_script_contents += "source " + settings + "\n" build_script_contents += "vivado -mode batch -source " + build_name + ".tcl\n" @@ -112,7 +114,7 @@ class XilinxVivadoToolchain: tools.write_to_file(build_name + ".tcl", "\n".join(tcl)) def build(self, platform, fragment, build_dir="build", build_name="top", - toolchain_path="/opt/Xilinx/Vivado", source=True, run=True, **kwargs): + toolchain_path=None, source=True, run=True, **kwargs): tools.mkdir_noerror(build_dir) cwd = os.getcwd() os.chdir(build_dir)