RTT

RTT is a debug monitoring tool developed by Segger. It allows you to stream log information from your application without involving the CPU or taking up peripheral UART pins.

rtt.py
 from lager import lager

 dut = lager.DUT()
 rtt = lager.RTT()
 dut.connect(halt=True)
 dut.reset(halt=False)
 line = rtt.read_line(timeout=1).decode().strip()
 print(line)
Stream RTT Logs from DUT
~  lager debug connect --dut 1
~  lager debug rtt --dut 1