targets/trellisboard: add '--with-spi-sdcard' build option

Signed-off-by: Gabriel Somlo <gsomlo@gmail.com>
This commit is contained in:
Gabriel Somlo 2020-03-19 22:14:54 -04:00
parent 69a78c8c66
commit f021c1de5f
1 changed files with 4 additions and 0 deletions

View File

@ -126,11 +126,15 @@ def main():
help="system clock frequency (default=75MHz)") help="system clock frequency (default=75MHz)")
parser.add_argument("--with-ethernet", action="store_true", parser.add_argument("--with-ethernet", action="store_true",
help="enable Ethernet support") help="enable Ethernet support")
parser.add_argument("--with-spi-sdcard", action="store_true",
help="enable SPI-mode SDCard support")
args = parser.parse_args() args = parser.parse_args()
soc = BaseSoC(sys_clk_freq=int(float(args.sys_clk_freq)), soc = BaseSoC(sys_clk_freq=int(float(args.sys_clk_freq)),
with_ethernet=args.with_ethernet, with_ethernet=args.with_ethernet,
**soc_sdram_argdict(args)) **soc_sdram_argdict(args))
if args.with_spi_sdcard:
soc.add_spi_sdcard()
builder = Builder(soc, **builder_argdict(args)) builder = Builder(soc, **builder_argdict(args))
builder_kargs = trellis_argdict(args) if args.toolchain == "trellis" else {} builder_kargs = trellis_argdict(args) if args.toolchain == "trellis" else {}
builder.build(**builder_kargs) builder.build(**builder_kargs)