rfnoc: Add vivado-path to rfnoc_image_builder

Adds a --vivado-path option to rfnoc_image_builder that, if present,
gets passed to setupenv.sh for the target device. This can be used to
specify the location of Vivado if it is not installed in one of the
default search locations.
This commit is contained in:
Wade Fife 2021-09-08 09:29:43 -05:00 committed by Aaron Rossetto
parent 9806989b5a
commit 11f0852d85
2 changed files with 8 additions and 0 deletions

View File

@ -780,6 +780,8 @@ def build(fpga_path, device, image_core_path, edge_file, **args):
logging.debug("Temporarily changing working directory to %s", build_dir)
os.chdir(build_dir)
make_cmd = ". ./setupenv.sh "
if "vivado_path" in args and args["vivado_path"]:
make_cmd = make_cmd + "--vivado-path=" + args["vivado_path"] + " "
if "clean_all" in args and args["clean_all"]:
make_cmd = make_cmd + "&& make cleanall "
target = args["target"] if "target" in args else ""

View File

@ -100,6 +100,11 @@ def setup_parser():
"-c", "--clean-all",
help="Cleans the IP before a new build",
action="store_true")
parser.add_argument(
"-p", "--vivado-path",
help="Path to the base install for Xilinx Vivado if not in default "
"location (e.g., /tools/Xilinx/Vivado).",
default=None)
return parser
@ -216,6 +221,7 @@ def main():
output_path=args.image_core_output,
router_hex_path=args.router_hex_output,
include_paths=args.include_dir,
vivado_path=args.vivado_path,
)
if __name__ == "__main__":