tools: deprecate litex_jtag_uart (now directly integrated in litex_term).

This commit is contained in:
Florent Kermarrec 2020-12-10 15:47:34 +01:00
parent 39b84581f4
commit ee41fbb338
2 changed files with 0 additions and 56 deletions

View File

@ -1,55 +0,0 @@
#!/usr/bin/env python3
#
# This file is part of LiteX.
#
# Copyright (c) 2020 Florent Kermarrec <florent@enjoy-digital.fr>
# SPDX-License-Identifier: BSD-2-Clause
# Proof of Concept to use the JTAG UART with lxterm.
import os
import pty
import threading
import telnetlib
import time
import argparse
from litex.build.openocd import OpenOCD
parser = argparse.ArgumentParser(description="LiteX JTAG UART bridge tool")
parser.add_argument("--config", default="openocd_xc7_ft2232.cfg", help="OpenOCD config file")
parser.add_argument("--telnet-port", default="20000", help="OpenOCD telnet port")
args = parser.parse_args()
def openocd_jtag_telnet():
prog = OpenOCD(args.config)
prog.stream(int(args.telnet_port))
m, s = pty.openpty()
print("LiteX JTAG UART created: {}".format(os.ttyname(s)))
openocd_jtag_telnet_thread = threading.Thread(target=openocd_jtag_telnet)
openocd_jtag_telnet_thread.start()
time.sleep(1)
t = telnetlib.Telnet("localhost", int(args.telnet_port))
def pty2telnet(m):
while True:
r = os.read(m, 1)
t.write(r)
if r == bytes("\n".encode("utf-8")):
t.write("\r".encode("utf-8"))
t.write("\n".encode("utf-8"))
def telnet2pty(m):
while True:
r = t.read_some()
os.write(m, bytes(r))
pty2telnet_thread = threading.Thread(target=pty2telnet, args=[m])
pty2telnet_thread.start()
telnet2pty(m)

View File

@ -39,7 +39,6 @@ setup(
"litex_term=litex.tools.litex_term:main", "litex_term=litex.tools.litex_term:main",
"litex_server=litex.tools.litex_server:main", "litex_server=litex.tools.litex_server:main",
"litex_cli=litex.tools.litex_client:main", "litex_cli=litex.tools.litex_client:main",
"litex_jtag_uart=litex.tools.litex_jtag_uart:main",
"litex_sim=litex.tools.litex_sim:main", "litex_sim=litex.tools.litex_sim:main",
"litex_read_verilog=litex.tools.litex_read_verilog:main", "litex_read_verilog=litex.tools.litex_read_verilog:main",
"litex_simple=litex.boards.targets.simple:main", "litex_simple=litex.boards.targets.simple:main",