From a8c92cd86ffecde9b0c8302f18353c00a0c894b1 Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Tue, 8 Nov 2022 11:55:06 +0100 Subject: [PATCH] targets/simple: Switch back to old version for now. --- litex_boards/targets/simple.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/litex_boards/targets/simple.py b/litex_boards/targets/simple.py index 8071819..439464b 100755 --- a/litex_boards/targets/simple.py +++ b/litex_boards/targets/simple.py @@ -46,7 +46,13 @@ class BaseSoC(SoCCore): def main(): from litex.build.parser import LiteXArgumentParser parser = LiteXArgumentParser(description="Generic LiteX SoC") - parser.add_target_argument("platform", help="Module name of the platform to build for.") + target_group = parser.add_argument_group(title="Target options") + target_group.add_argument("platform", help="Module name of the platform to build for.") + target_group.add_argument("--build", action="store_true", help="Build design.") + target_group.add_argument("--load", action="store_true", help="Load bitstream.") + target_group.add_argument("--toolchain", default=None, help="FPGA toolchain.") + builder_args(parser) + soc_core_args(parser) args = parser.parse_args() platform_module = importlib.import_module(args.platform) @@ -54,10 +60,10 @@ def main(): if args.toolchain is not None: platform_kwargs["toolchain"] = args.toolchain platform = platform_module.Platform(**platform_kwargs) - soc = BaseSoC(platform,**parser.soc_argdict) - builder = Builder(soc, **parser.builder_argdict) + soc = BaseSoC(platform,**soc_core_argdict(args)) + builder = Builder(soc, **builder_argdict(args)) if args.build: - builder.build(**parser.toolchain_argdict) + builder.build() if args.load: prog = soc.platform.create_programmer()