Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

efinix_ti375_c529_dev_kit: add flash function #651

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion litex_boards/platforms/efinix_ti375_c529_dev_kit.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,13 @@

# FAN.
("fan_speed_control", 0, Pins("T19"), IOStandard("3.3_V_LVCMOS")),

# Leds
("user_led", 0, Pins("R20")),
("user_led", 1, Pins("V4"), IOStandard("3.3_V_LVCMOS")),
("user_led", 2, Pins("U6"), IOStandard("3.3_V_LVCMOS")),
("user_led", 3, Pins("L18")),
("user_led", 4, Pins("E19")),
]


Expand Down Expand Up @@ -240,7 +247,7 @@ def __init__(self, toolchain="efinity"):
EfinixPlatform.__init__(self, "Ti375C529C4", _io, _connectors, iobank_info=_bank_info, toolchain=toolchain)

def create_programmer(self):
return EfinixProgrammer()
return EfinixProgrammer(family=self.family)

def do_finalize(self, fragment):
EfinixPlatform.do_finalize(self, fragment)
Expand Down
5 changes: 5 additions & 0 deletions litex_boards/targets/efinix_ti375_c529_dev_kit.py
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,7 @@ def generate():
def main():
from litex.build.parser import LiteXArgumentParser
parser = LiteXArgumentParser(platform=efinix_ti375_c529_dev_kit.Platform, description="LiteX SoC on Efinix Ti375 C529 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("--cpu-clk-freq", default=100e6, type=float, help="System clock frequency.")
parser.add_target_argument("--with-ohci", action="store_true", help="Enable USB OHCI.")
Expand Down Expand Up @@ -581,5 +582,9 @@ def main():
prog = soc.platform.create_programmer()
prog.load_bitstream(builder.get_bitstream_filename(mode="sram"))

if args.flash:
prog = soc.platform.create_programmer()
prog.flash(0, builder.get_bitstream_filename(mode="flash", ext=".hex"), device_id=0x006A0A79)

if __name__ == "__main__":
main()