litex_term: make sure to unconfigure console when board is unplugged
This commit is contained in:
parent
e052d7f645
commit
1884649de1
|
@ -268,6 +268,7 @@ class LiteXTerm:
|
||||||
|
|
||||||
except serial.SerialException:
|
except serial.SerialException:
|
||||||
self.reader_alive = False
|
self.reader_alive = False
|
||||||
|
self.console.unconfigure()
|
||||||
raise
|
raise
|
||||||
|
|
||||||
def start_reader(self):
|
def start_reader(self):
|
||||||
|
@ -292,6 +293,7 @@ class LiteXTerm:
|
||||||
self.port.write(b)
|
self.port.write(b)
|
||||||
except:
|
except:
|
||||||
self.writer_alive = False
|
self.writer_alive = False
|
||||||
|
self.console.unconfigure()
|
||||||
raise
|
raise
|
||||||
|
|
||||||
def start_writer(self):
|
def start_writer(self):
|
||||||
|
@ -334,8 +336,8 @@ def _get_args():
|
||||||
def main():
|
def main():
|
||||||
args = _get_args()
|
args = _get_args()
|
||||||
term = LiteXTerm(args.serial_boot, args.kernel, args.kernel_adr, args.images)
|
term = LiteXTerm(args.serial_boot, args.kernel, args.kernel_adr, args.images)
|
||||||
term.console.configure()
|
|
||||||
term.open(args.port, int(float(args.speed)))
|
term.open(args.port, int(float(args.speed)))
|
||||||
|
term.console.configure()
|
||||||
term.start()
|
term.start()
|
||||||
term.join(True)
|
term.join(True)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue