Commit 08ccf384 authored by Joel Stanley's avatar Joel Stanley

targets/arty: Allow selection of sdcard mod adaptor

The default stays with the Digilent/Antmicro layout, but the user can
optionally provide --sdcard-adaptor numato to use the Numato layout.
Signed-off-by: default avatarJoel Stanley <joel@jms.id.au>
parent 2b490826
......@@ -118,6 +118,7 @@ def main():
sdopts = parser.add_mutually_exclusive_group()
sdopts.add_argument("--with-spi-sdcard", action="store_true", help="Enable SPI-mode SDCard support")
sdopts.add_argument("--with-sdcard", action="store_true", help="Enable SDCard support")
parser.add_argument("--sdcard-adaptor", type=str, help="SDCard PMOD adaptor: digilent (default) or numato")
parser.add_argument("--no-ident-version", action="store_false", help="Disable build time output")
builder_args(parser)
soc_sdram_args(parser)
......@@ -134,7 +135,10 @@ def main():
ident_version = args.no_ident_version,
**soc_sdram_argdict(args)
)
soc.platform.add_extension(arty._sdcard_pmod_io)
if args.sdcard_adaptor == "numato":
soc.platform.add_extension(arty._numato_sdcard_pmod_io)
else:
soc.platform.add_extension(arty._sdcard_pmod_io)
if args.with_spi_sdcard:
soc.add_spi_sdcard()
if args.with_sdcard:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment