From 119ce56f6c6e54666ce7c5fd77c0586441a6a5b8 Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Fri, 29 May 2020 19:26:29 +0200 Subject: [PATCH] targets/nexys_video: add spi-sdcard and sdcard support. --- litex/boards/targets/nexys4ddr.py | 4 ++-- litex/boards/targets/nexys_video.py | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/litex/boards/targets/nexys4ddr.py b/litex/boards/targets/nexys4ddr.py index 30174113b..303055d24 100755 --- a/litex/boards/targets/nexys4ddr.py +++ b/litex/boards/targets/nexys4ddr.py @@ -97,8 +97,8 @@ def main(): 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("--with-spi-sdcard", action="store_true", help="enable SPI-mode SDCard support") - parser.add_argument("--with-sdcard", action="store_true", help="enable SDCard support") + parser.add_argument("--with-spi-sdcard", action="store_true", help="Enable SPI-mode SDCard support") + parser.add_argument("--with-sdcard", action="store_true", help="Enable SDCard support") args = parser.parse_args() soc = BaseSoC(sys_clk_freq=int(float(args.sys_clk_freq)), diff --git a/litex/boards/targets/nexys_video.py b/litex/boards/targets/nexys_video.py index f5ad36971..22dd0366d 100755 --- a/litex/boards/targets/nexys_video.py +++ b/litex/boards/targets/nexys_video.py @@ -96,9 +96,16 @@ def main(): builder_args(parser) soc_sdram_args(parser) 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") + parser.add_argument("--with-sdcard", action="store_true", help="Enable SDCard support") args = parser.parse_args() soc = BaseSoC(with_ethernet=args.with_ethernet, **soc_sdram_argdict(args)) + assert not (args.with_spi_sdcard and args.with_sdcard) + if args.with_spi_sdcard: + soc.add_spi_sdcard() + if args.with_sdcard: + soc.add_sdcard() builder = Builder(soc, **builder_argdict(args)) builder.build(run=args.build)