xvc2dap: actually configure jtag

This commit is contained in:
Triss 2021-09-21 22:29:13 +02:00
parent 9fbeb421dd
commit d481618537
1 changed files with 7 additions and 0 deletions

View File

@ -168,6 +168,8 @@ def xvc2dap_do(args: Any) -> int:
try: try:
dap.connect() dap.connect()
dap.configure_jtag(args.irlen)
with socket.socket() as sock: with socket.socket() as sock:
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
sock.bind((args.address, args.port)) sock.bind((args.address, args.port))
@ -204,6 +206,11 @@ def main() -> int:
help="Connect to the CMSIS-DAP device with the "+\ help="Connect to the CMSIS-DAP device with the "+\
"specified serial number, defaults to the first device found.") "specified serial number, defaults to the first device found.")
parser.add_argument('--irlen', type=int, default=None, nargs='+',
help="devices and IRLEN configuration, defaults to "+\
"CMSIS-DAP-specific value (usually 1 dev, irlen "+\
"4). Use multiple --irlen args for multiple devices.")
parser.add_argument('address', type=str, default='localhost', nargs='?', parser.add_argument('address', type=str, default='localhost', nargs='?',
help="Host to bind to, for the XVC server, default "+\ help="Host to bind to, for the XVC server, default "+\
"localhost") "localhost")