From 1976fd4b9063088d0d9d07d4236bc817c2ec4c71 Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Thu, 10 Dec 2020 13:54:21 +0100 Subject: [PATCH] tools: deprecate litex_crossover_uart (now directly integrated in litex_term). --- litex/tools/litex_crossover_uart.py | 49 ----------------------------- setup.py | 1 - 2 files changed, 50 deletions(-) delete mode 100755 litex/tools/litex_crossover_uart.py diff --git a/litex/tools/litex_crossover_uart.py b/litex/tools/litex_crossover_uart.py deleted file mode 100755 index 3e6190178..000000000 --- a/litex/tools/litex_crossover_uart.py +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/env python3 - -# -# This file is part of LiteX. -# -# Copyright (c) 2020 Florent Kermarrec -# SPDX-License-Identifier: BSD-2-Clause - -# Proof of Concept to use the crossover UART with lxterm over a bridge. - -import os -import pty -import threading -import argparse - -from litex import RemoteClient - -parser = argparse.ArgumentParser(description="LiteX Crossover UART bridge tool") -parser.add_argument("--host", default="localhost", help="Host IP address") -parser.add_argument("--base-address", default="0x00000000", help="Wishbone base address") -args = parser.parse_args() - -wb = RemoteClient(host=args.host, base_address=int(args.base_address, 0)) -wb.open() - -# # # - -def pty2crossover(m): - while True: - r = os.read(m, 1) - wb.regs.uart_xover_rxtx.write(ord(r)) - -def crossover2pty(m): - while True: - if wb.regs.uart_xover_rxempty.read() == 0: - r = wb.regs.uart_xover_rxtx.read() - os.write(m, bytes(chr(r).encode("utf-8"))) - -m, s = pty.openpty() -print("LiteX Crossover UART created: {}".format(os.ttyname(s))) - -pty2crossover_thread = threading.Thread(target=pty2crossover, args=[m]) -pty2crossover_thread.start() - -crossover2pty(m) - -# # # - -wb.close() diff --git a/setup.py b/setup.py index 8414e8051..5fa12acd4 100755 --- a/setup.py +++ b/setup.py @@ -40,7 +40,6 @@ setup( "litex_server=litex.tools.litex_server:main", "litex_cli=litex.tools.litex_client:main", "litex_jtag_uart=litex.tools.litex_jtag_uart:main", - "litex_crossover_uart=litex.tools.litex_crossover_uart:main", "litex_sim=litex.tools.litex_sim:main", "litex_read_verilog=litex.tools.litex_read_verilog:main", "litex_simple=litex.boards.targets.simple:main",