Skip to content

Commit

Permalink
Merge pull request #625 from Kanken6174/master
Browse files Browse the repository at this point in the history
simple flash fix for the efinix T20 MIPI DK
  • Loading branch information
trabucayre authored Dec 14, 2024
2 parents a3b3816 + 1727d30 commit 7000fa2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions litex_boards/targets/efinix_trion_t20_mipi_dev_kit.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ def __init__(self, sys_clk_freq=100e6, with_spi_flash=False, with_led_chaser=Tru
def main():
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.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("--with-spi-flash", action="store_true", help="Enable SPI Flash (MMAPed).")
args = parser.parse_args()
Expand All @@ -93,5 +94,10 @@ def main():
prog = soc.platform.create_programmer()
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__":
main()

0 comments on commit 7000fa2

Please sign in to comment.