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.

connect_dut.py
 from lager import lager

 dut = lager.DUT()

 # connect debugger to device and put into Halt state
 dut.connect(halt=True)
Connect DUT to debugger
~  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.py
 # Disconnect
 dut.disconnect()
Disconnect DUT
~  lager debug disconnect --dut 1