From c694da37532e495e58d1e18a6ad55ad71d56f085 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Sat, 26 Oct 2019 18:06:32 -0400 Subject: [PATCH] flash_usb: Change dfu-util to reset the board after a flash on stm32f4 Signed-off-by: Kevin O'Connor --- scripts/flash_usb.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/scripts/flash_usb.py b/scripts/flash_usb.py index de267f1f..9bad5040 100755 --- a/scripts/flash_usb.py +++ b/scripts/flash_usb.py @@ -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,