flash_usb: Change dfu-util to reset the board after a flash on stm32f4

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2019-10-26 18:06:32 -04:00
parent 4b4e309e1b
commit c694da3753
1 changed files with 2 additions and 4 deletions

View File

@ -201,16 +201,14 @@ If attempting to flash via 3.3V serial, then use:
"""
def flash_stm32f4(options, binfile):
start = "0x%x:leave" % (options.start,)
try:
flash_dfuutil(options.device, binfile,
["-R", "-a", "0", "-s", str(options.start)], options.sudo)
["-R", "-a", "0", "-s", start], options.sudo)
except error as e:
sys.stderr.write(STM32F4_HELP % (
options.device, str(e), options.device))
sys.exit(-1)
sys.stdout.write("\n\nFlash appears successful.\n"
"Device must be manually reset for new code to run.\n"
"\n")
MCUTYPES = {
'atsam3': flash_atsam3, 'atsam4': flash_atsam4, 'atsamd': flash_atsamd,