make.py: avoid some actions in make all (do not flash if load-bitstream is specified or if bios is in blockram)

This commit is contained in:
Florent Kermarrec 2015-02-27 10:18:30 +01:00
parent 77a6f580e2
commit e4de5a0c9d
1 changed files with 23 additions and 18 deletions

View File

@ -119,7 +119,9 @@ CPU type: {}
actions["clean"] = True
actions["build-bitstream"] = True
actions["build-bios"] = True
if not actions["load-bitstream"]:
actions["flash-bitstream"] = True
if not hasattr(soc, "init_bios_memory"):
actions["flash-bios"] = True
if actions["build-bitstream"] and hasattr(soc, "init_bios_memory"):
actions["build-bios"] = True
@ -188,11 +190,12 @@ CPU type: {}
vns = platform.build(soc, build_name=build_name, **build_kwargs)
soc.do_exit(vns)
if actions["load-bitstream"] or actions["flash-bitstream"] or actions["flash-bios"]:
prog = platform.create_programmer()
if actions["load-bitstream"]:
prog = platform.create_programmer()
prog.load_bitstream("build/" + build_name + platform.bitstream_ext)
if actions["flash-bitstream"]:
prog = platform.create_programmer()
prog.set_flash_proxy_dir(args.flash_proxy_dir)
if prog.needs_bitreverse:
flashbit = "build/" + build_name + ".fpg"
@ -202,6 +205,8 @@ CPU type: {}
else:
flashbit = "build/" + build_name + ".bin"
prog.flash(0, flashbit)
if actions["flash-bios"]:
prog = platform.create_programmer()
prog.set_flash_proxy_dir(args.flash_proxy_dir)
prog.flash(soc.cpu_reset_address, "software/bios/bios.bin")