targets/sipeed_tang_nano_4k: adding description to write Gowin EMCU firmware

This commit is contained in:
Gwenhael Goavec-Merou 2023-12-14 13:24:19 +01:00
parent 4166a94a1f
commit e8bc9fa81d
1 changed files with 13 additions and 1 deletions

View File

@ -165,8 +165,20 @@ def main():
if args.flash: if args.flash:
prog = soc.platform.create_programmer() prog = soc.platform.create_programmer()
prog.flash(0, builder.get_bitstream_filename(mode="flash", ext=".fs")) # FIXME prog.flash(0, builder.get_bitstream_filename(mode="flash", ext=".fs")) # FIXME
if args.cpu_type != "gowin_emcu":
prog.flash(0, builder.get_bios_filename(), external=True) prog.flash(0, builder.get_bios_filename(), external=True)
if args.cpu_type == "gowin_emcu":
import time
bios_filename = builder.get_bios_filename()
msg = "\n"
msg += "Gowin EMCU firmware must be written in flash with:\n"
msg += f"openFPGALoader -b tangnano4k --mcufw {bios_filename}\n"
msg += "Warning: this will erase ALL the internal flash"
msg += "\n"
print(msg)
time.sleep(2)
if __name__ == "__main__": if __name__ == "__main__":
main() main()