forked from M-Labs/artiq
1
0
Fork 0

artiq_flash: fix flashing Sayma RTM from package

This commit is contained in:
Sebastien Bourdeauducq 2019-11-05 15:18:58 +08:00
parent 98854473dd
commit e2f9f59472
1 changed files with 7 additions and 2 deletions

View File

@ -364,6 +364,11 @@ def main():
variant_dir = variant variant_dir = variant
else: else:
variant_dir = args.target + "-" + variant variant_dir = args.target + "-" + variant
if args.target == "sayma":
if args.srcbuild:
rtm_variant_dir = variant
else:
rtm_variant_dir = "sayma-rtm"
if args.host is None: if args.host is None:
client = LocalClient() client = LocalClient()
@ -405,7 +410,7 @@ def main():
programmer.write_binary(*config["gateware"], gateware_bin) programmer.write_binary(*config["gateware"], gateware_bin)
if args.target == "sayma" and variant != "master": if args.target == "sayma" and variant != "master":
rtm_gateware_bin = convert_gateware( rtm_gateware_bin = convert_gateware(
artifact_path("rtm", "gateware", "top.bit"), header=True) artifact_path(rtm_variant_dir, "gateware", "top.bit"), header=True)
programmer.write_binary(*config["rtm_gateware"], programmer.write_binary(*config["rtm_gateware"],
rtm_gateware_bin) rtm_gateware_bin)
elif action == "bootloader": elif action == "bootloader":
@ -425,7 +430,7 @@ def main():
elif action == "load": elif action == "load":
if args.target == "sayma": if args.target == "sayma":
if variant != "simplesatellite" and variant != "master": if variant != "simplesatellite" and variant != "master":
rtm_gateware_bit = artifact_path("rtm", "gateware", "top.bit") rtm_gateware_bit = artifact_path(rtm_variant_dir, "gateware", "top.bit")
programmer.load(rtm_gateware_bit, 0) programmer.load(rtm_gateware_bit, 0)
gateware_bit = artifact_path(variant_dir, "gateware", "top.bit") gateware_bit = artifact_path(variant_dir, "gateware", "top.bit")
programmer.load(gateware_bit, 1) programmer.load(gateware_bit, 1)