simple flash fix for the efinix T20 MIPI DK
This commit is contained in:
parent
a3b38163e8
commit
1727d30175
|
@ -77,6 +77,7 @@ class BaseSoC(SoCCore):
|
||||||
def main():
|
def main():
|
||||||
from litex.build.parser import LiteXArgumentParser
|
from litex.build.parser import LiteXArgumentParser
|
||||||
parser = LiteXArgumentParser(platform=efinix_trion_t20_mipi_dev_kit.Platform, description="LiteX SoC on Efinix Trion T20 MIPI Dev Kit.")
|
parser = LiteXArgumentParser(platform=efinix_trion_t20_mipi_dev_kit.Platform, description="LiteX SoC on Efinix Trion T20 MIPI Dev Kit.")
|
||||||
|
parser.add_target_argument("--flash", action="store_true", help="Flash bitstream.")
|
||||||
parser.add_target_argument("--sys-clk-freq", default=100e6, type=float, help="System clock frequency.")
|
parser.add_target_argument("--sys-clk-freq", default=100e6, type=float, help="System clock frequency.")
|
||||||
parser.add_target_argument("--with-spi-flash", action="store_true", help="Enable SPI Flash (MMAPed).")
|
parser.add_target_argument("--with-spi-flash", action="store_true", help="Enable SPI Flash (MMAPed).")
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
@ -93,5 +94,10 @@ def main():
|
||||||
prog = soc.platform.create_programmer()
|
prog = soc.platform.create_programmer()
|
||||||
prog.load_bitstream(builder.get_bitstream_filename(mode="sram"))
|
prog.load_bitstream(builder.get_bitstream_filename(mode="sram"))
|
||||||
|
|
||||||
|
if args.flash:
|
||||||
|
from litex.build.openfpgaloader import OpenFPGALoader
|
||||||
|
prog = OpenFPGALoader("trion_t120_bga576")
|
||||||
|
prog.flash(0, builder.get_bitstream_filename(mode="flash", ext=".hex")) # FIXME
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
|
|
Loading…
Reference in New Issue