From: Sebastien Bourdeauducq Date: Wed, 4 Nov 2015 06:57:48 +0000 (+0800) Subject: integration/builder: add gateware toolchain path command line switch X-Git-Tag: 24jan2021_ls180~2106^2 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=71fd951df29364146706e47d243467c82b4c4837;p=litex.git integration/builder: add gateware toolchain path command line switch --- diff --git a/misoc/integration/builder.py b/misoc/integration/builder.py index bf8aff82..6594673d 100644 --- a/misoc/integration/builder.py +++ b/misoc/integration/builder.py @@ -30,6 +30,7 @@ def _makefile_escape(s): class Builder: def __init__(self, soc, output_dir=None, compile_software=True, compile_gateware=True, + gateware_toolchain_path=None, csr_csv=None): self.soc = soc if output_dir is None: @@ -41,6 +42,7 @@ class Builder: self.output_dir = os.path.abspath(output_dir) self.compile_software = compile_software self.compile_gateware = compile_gateware + self.gateware_toolchain_path = gateware_toolchain_path self.csr_csv = csr_csv self.software_packages = [] @@ -130,8 +132,12 @@ class Builder: self._generate_includes() self._generate_software() self._initialize_rom() + if self.gateware_toolchain_path is None: + kwargs = dict() + else: + kwargs = {"toolchain_path": self.gateware_toolchain_path} self.soc.build(build_dir=os.path.join(self.output_dir, "gateware"), - run=self.compile_gateware) + run=self.compile_gateware, **kwargs) def builder_args(parser): @@ -144,6 +150,9 @@ def builder_args(parser): parser.add_argument("--no-compile-gateware", action="store_true", help="do not compile the gateware, only generate " "HDL source files and build scripts") + parser.add_argument("--gateware-toolchain-path", default=None, + help="set gateware toolchain (ISE, Quartus, etc.) " + "installation path") parser.add_argument("--csr-csv", default=None, help="store CSR map in CSV format into the " "specified file") @@ -154,5 +163,6 @@ def builder_argdict(args): "output_dir": args.output_dir, "compile_software": not args.no_compile_software, "compile_gateware": not args.no_compile_gateware, + "gateware_toolchain_path": args.gateware_toolchain_path, "csr_csv": args.csr_csv }