From: Sebastien Bourdeauducq Date: Sat, 7 Jun 2014 11:43:23 +0000 (+0200) Subject: make.py: add platform-option X-Git-Tag: 24jan2021_ls180~2701 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e5ca0c5ed5d75bd4292a700a499f04bcf7d66095;p=litex.git make.py: add platform-option --- diff --git a/make.py b/make.py index 3d0df721..94add6ca 100755 --- a/make.py +++ b/make.py @@ -38,6 +38,7 @@ Load/flash actions use the existing outputs, and do not trigger new builds. parser.add_argument("-s", "--sub-target", default="", help="variant of the SoC type to build") parser.add_argument("-p", "--platform", default=None, help="platform to build for") parser.add_argument("-Ot", "--target-option", default=[], nargs=2, action="append", help="set target-specific option") + parser.add_argument("-Op", "--platform-option", default=[], nargs=2, action="append", help="set platform-specific option") parser.add_argument("-X", "--external", default="", help="use external directory for targets, platforms and imports") parser.add_argument("--csr_csv", default="csr.csv", help="CSV file to save the CSR map into") @@ -85,7 +86,8 @@ if __name__ == "__main__": else: platform_name = args.platform platform_module = _misoc_import("mibuild.platforms", external_platform, platform_name) - platform = platform_module.Platform() + platform_kwargs = dict((k, autotype(v)) for k, v in args.platform_option) + platform = platform_module.Platform(**platform_kwargs) if args.external: platform.soc_ext_path = os.path.abspath(args.external)