Connect and Disconenct
Before using the rtt
or reset
commands you first need to connect the debugger. Currently erase
and flash
do not require a connect, as that is done as part of the command.
from lager import lager
dut = lager.DUT()
# connect debugger to device and put into Halt state
dut.connect(halt=True)
~ lager debug connect --dut 1
Before powering down your device you can disconnect the debugger to put it in a known state. This isn't required, but is good practice.
# Disconnect
dut.disconnect()
~ lager debug disconnect --dut 1