Debugger ======== .. py:class:: DUT Device Under Test .. py:method:: erase(self, *, start_addr=None, length=None) Erase a region of flash .. code-block:: python :emphasize-lines: 4 from lager import lager dut = lager.DUT() dut.erase(start_addr=0x80000000, length=65536) :param int start_addr: start address in flash :param int length: size of flash to erase .. py:method:: reset(self, halt=False) Reset a device. .. code-block:: python :emphasize-lines: 4 from lager import lager dut = lager.DUT() dut.reset(halt=True) :param bool halt: stop device after reset if true .. py:method:: flash(self, file_name, *, file_type, start_addr=None) Flash a device. .. code-block:: python :emphasize-lines: 6,7 from lager import lager, ImageType dut = lager.DUT() dut.reset(halt=True) # Flash Your Device Under Device dut.flash("path/to/my/image/my_image.hex") :param str file_name: path to image :param ImageType file_type: hex or binary file :param int start_addr: start address of binary image