build/xilinx: simplify LITEX_ENV_ISE/VIVADO handling.
This commit is contained in:
parent
e91c317139
commit
4a1756208d
|
@ -115,9 +115,8 @@ def _run_ise(build_name, mode, ngdbuild_opt, toolchain, platform):
|
||||||
script_ext = ".sh"
|
script_ext = ".sh"
|
||||||
shell = ["bash"]
|
shell = ["bash"]
|
||||||
build_script_contents = "# Autogenerated by LiteX / git: " + tools.get_litex_git_revision() + "\nset -e\n"
|
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 os.getenv("LITEX_ENV_ISE", False):
|
||||||
if litex_env_ise is not None:
|
build_script_contents += "source " + os.path.join(os.getenv("LITEX_ENV_ISE"), "settings64.sh\n")
|
||||||
build_script_contents += "source " + os.path.join(litex_env_ise, "settings64.sh\n")
|
|
||||||
fail_stmt = ""
|
fail_stmt = ""
|
||||||
if mode == "edif":
|
if mode == "edif":
|
||||||
ext = "ngo"
|
ext = "ngo"
|
||||||
|
|
|
@ -73,9 +73,8 @@ def _build_script(build_name):
|
||||||
tools.write_to_file(script_file, script_contents)
|
tools.write_to_file(script_file, script_contents)
|
||||||
else:
|
else:
|
||||||
script_contents = "# Autogenerated by LiteX / git: " + tools.get_litex_git_revision() + "\nset -e\n"
|
script_contents = "# Autogenerated by LiteX / git: " + tools.get_litex_git_revision() + "\nset -e\n"
|
||||||
litex_env_vivado = os.getenv("LITEX_ENV_VIVADO", None)
|
if os.getenv("LITEX_ENV_VIVADO", False):
|
||||||
if litex_env_vivado is not None:
|
script_contents += "source " + os.path.join(os.getenv("LITEX_ENV_VIVADO"), "settings64.sh\n")
|
||||||
script_contents += "source " + os.path.join(litex_env_vivado, "settings64.sh\n")
|
|
||||||
script_contents += "vivado -mode batch -source " + build_name + ".tcl\n"
|
script_contents += "vivado -mode batch -source " + build_name + ".tcl\n"
|
||||||
script_file = "build_" + build_name + ".sh"
|
script_file = "build_" + build_name + ".sh"
|
||||||
tools.write_to_file(script_file, script_contents)
|
tools.write_to_file(script_file, script_contents)
|
||||||
|
|
Loading…
Reference in New Issue