efinix_trion_t120_bga576_dev_kit: Add Flash support (Through openFPGALoader).
This commit is contained in:
parent
195bf176cf
commit
914e330a86
|
@ -78,6 +78,7 @@ def main():
|
|||
parser = argparse.ArgumentParser(description="LiteX SoC on Efinix Trion T120 BGA576 Dev Kit")
|
||||
parser.add_argument("--build", action="store_true", help="Build bitstream")
|
||||
parser.add_argument("--load", action="store_true", help="Load bitstream")
|
||||
parser.add_argument("--flash", action="store_true", help="Flash bitstream")
|
||||
parser.add_argument("--sys-clk-freq", default=100e6, help="System clock frequency (default: 100MHz)")
|
||||
parser.add_argument("--with-spi-flash", action="store_true", help="Enable SPI Flash (MMAPed)")
|
||||
builder_args(parser)
|
||||
|
@ -95,5 +96,10 @@ def main():
|
|||
prog = soc.platform.create_programmer()
|
||||
prog.load_bitstream(os.path.join(builder.gateware_dir, f"outflow/{soc.build_name}.bit"))
|
||||
|
||||
if args.flash:
|
||||
from litex.build.openfpgaloader import OpenFPGALoader
|
||||
prog = OpenFPGALoader("trion_t120_bga576")
|
||||
prog.flash(0, os.path.join(builder.gateware_dir, f"outflow/{soc.build_name}.hex"))
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
|
Loading…
Reference in New Issue