tools/litex_term: always use binary mode (for jtag_uart and jtagbone) and remove parameter.

Fix jtag_uart regression and allow serialboot.
This commit is contained in:
Florent Kermarrec 2021-02-05 09:40:21 +01:00
parent 92f4cd1423
commit 4f15be746c
1 changed files with 3 additions and 8 deletions

View File

@ -126,10 +126,9 @@ class CrossoverUART:
from litex.build.openocd import OpenOCD
class JTAGUART:
def __init__(self, config="openocd_xc7_ft2232.cfg", port=20000, binary_mode=False): # FIXME: add command line arguments
def __init__(self, config="openocd_xc7_ft2232.cfg", port=20000): # FIXME: add command line arguments
self.config = config
self.port = port
self.binary_mode = binary_mode
def open(self):
self.file, self.name = pty.openpty()
@ -156,10 +155,6 @@ class JTAGUART:
while True:
r = os.read(self.file, 1)
self.tcp.send(r)
if not self.binary_mode:
if r == bytes("\n".encode("utf-8")):
self.tcp.send("\r".encode("utf-8"))
self.tcp.send("\n".encode("utf-8"))
def tcp2pty(self):
while True: