mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
build/xilinx/vivado: fix settings source on linux
This commit is contained in:
parent
7bb2be41e8
commit
4f3ce6db2b
1 changed files with 3 additions and 1 deletions
|
@ -59,6 +59,8 @@ def _run_vivado(build_name, vivado_path, source, ver=None):
|
||||||
r = subprocess.call([build_script_file])
|
r = subprocess.call([build_script_file])
|
||||||
else:
|
else:
|
||||||
build_script_contents = "# Autogenerated by LiteX\nset -e\n"
|
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)
|
settings = common.settings(vivado_path, ver)
|
||||||
build_script_contents += "source " + settings + "\n"
|
build_script_contents += "source " + settings + "\n"
|
||||||
build_script_contents += "vivado -mode batch -source " + build_name + ".tcl\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))
|
tools.write_to_file(build_name + ".tcl", "\n".join(tcl))
|
||||||
|
|
||||||
def build(self, platform, fragment, build_dir="build", build_name="top",
|
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)
|
tools.mkdir_noerror(build_dir)
|
||||||
cwd = os.getcwd()
|
cwd = os.getcwd()
|
||||||
os.chdir(build_dir)
|
os.chdir(build_dir)
|
||||||
|
|
Loading…
Reference in a new issue