tools/litex_server: add --jtag-config args to provide OpenOCD configuration file.

This commit is contained in:
Florent Kermarrec 2021-01-26 14:32:36 +01:00
parent 2e1b9ed948
commit 331124dd23
1 changed files with 3 additions and 2 deletions

View File

@ -177,6 +177,7 @@ def main():
# JTAG arguments # JTAG arguments
parser.add_argument("--jtag", action="store_true", help="Select JTAG interface") parser.add_argument("--jtag", action="store_true", help="Select JTAG interface")
parser.add_argument("--jtag-config", default="openocd_xc7_ft232.cfg", help="OpenOCD JTAG configuration file")
# UDP arguments # UDP arguments
parser.add_argument("--udp", action="store_true", help="Select UDP interface") parser.add_argument("--udp", action="store_true", help="Select UDP interface")
@ -211,7 +212,7 @@ def main():
elif args.jtag: elif args.jtag:
from litex.tools.litex_term import JTAGUART from litex.tools.litex_term import JTAGUART
from litex.tools.remote.comm_uart import CommUART from litex.tools.remote.comm_uart import CommUART
bridge = JTAGUART() bridge = JTAGUART(config=args.jtag_config)
bridge.open() bridge.open()
print("[CommUART] port: JTAG / ", end="") print("[CommUART] port: JTAG / ", end="")
comm = CommUART(os.ttyname(bridge.name), debug=args.debug) comm = CommUART(os.ttyname(bridge.name), debug=args.debug)