From 435913f7d8ef153bbe505cdb3f969837ddce11ed Mon Sep 17 00:00:00 2001 From: Gabriel Somlo Date: Sun, 24 May 2020 19:09:25 -0400 Subject: [PATCH] platforms/nexys4ddr: add option to build with spi-mode sdcard support --- litex_boards/targets/nexys4ddr.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/litex_boards/targets/nexys4ddr.py b/litex_boards/targets/nexys4ddr.py index 27fc24f..2dc2484 100755 --- a/litex_boards/targets/nexys4ddr.py +++ b/litex_boards/targets/nexys4ddr.py @@ -95,13 +95,16 @@ def main(): parser.add_argument("--load", action="store_true", help="Load bitstream") builder_args(parser) soc_sdram_args(parser) - parser.add_argument("--sys-clk-freq", default=75e6, help="System clock frequency (default=75MHz)") - parser.add_argument("--with-ethernet", action="store_true", help="Enable Ethernet support") + parser.add_argument("--sys-clk-freq", default=75e6, help="System clock frequency (default=75MHz)") + parser.add_argument("--with-ethernet", action="store_true", help="Enable Ethernet support") + parser.add_argument("--with-spi-sdcard", action="store_true", help="enable SPI-mode SDCard support") args = parser.parse_args() soc = BaseSoC(sys_clk_freq=int(float(args.sys_clk_freq)), with_ethernet=args.with_ethernet, **soc_sdram_argdict(args)) + if args.with_spi_sdcard: + soc.add_spi_sdcard() builder = Builder(soc, **builder_argdict(args)) builder.build(run=args.build)