targets: print help when no build or load action

This commit is contained in:
Florent Kermarrec 2019-12-17 10:06:42 +01:00
parent 107cca8428
commit c85fb39547
4 changed files with 12 additions and 0 deletions

View File

@ -200,6 +200,9 @@ def main():
parser.add_argument("--load", action="store_true", help="load bitstream (to SRAM)")
args = parser.parse_args()
if not args.build and not args.load:
parser.print_help()
if args.build:
os.system("cd usb3_core/daisho && make && ./usb_descrip_gen")
os.system("cp usb3_core/daisho/usb3/*.init build/gateware/")

View File

@ -151,6 +151,9 @@ def main():
parser.add_argument("--device", default="xc7a35t", help="FPGA device (xc7a35t (default) or xc7a100t)")
args = parser.parse_args()
if not args.build and not args.load:
parser.print_help()
if args.build:
os.system("cd usb3_core/daisho && make && ./usb_descrip_gen")
os.system("cp usb3_core/daisho/usb3/*.init build/gateware/")

View File

@ -151,6 +151,9 @@ def main():
parser.add_argument("--load", action="store_true", help="load bitstream (to SRAM)")
args = parser.parse_args()
if not args.build and not args.load:
parser.print_help()
if args.build:
os.system("cd usb3_core/daisho && make && ./usb_descrip_gen")
os.system("cp usb3_core/daisho/usb3/*.init build/gateware/")

View File

@ -215,6 +215,9 @@ def main():
parser.add_argument("--load", action="store_true", help="load bitstream (to SRAM)")
args = parser.parse_args()
if not args.build and not args.load:
parser.print_help()
if args.build:
os.system("cd usb3_core/daisho && make && ./usb_descrip_gen")
os.system("cp usb3_core/daisho/usb3/*.init build/gateware/")