From e5ca0c5ed5d75bd4292a700a499f04bcf7d66095 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Sat, 7 Jun 2014 13:43:23 +0200 Subject: [PATCH] make.py: add platform-option --- make.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/make.py b/make.py index 3d0df7217..94add6ca8 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)