Erasing

Erase allows you to erase all or parts of your DUT's flash.

erase_section_flash.py
 from lager import DUT

 mcu0 = DUT(mcu=0)

 # Erase your device
 # 64k flash, start address 0x08000000
 mcu0.erase(address=0x08000000, length=65536)
Erase Section of DUT's Flash
~  lager debug erase 0x08000000 65536 --dut 1

Erase entire contents.

erase_entire_flash.py
 # Erase entire flash
 mcu0.erase()
Erase Entire DUT Flash
~  lager debug erase --dut 1