aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2019-10-26 18:06:32 -0400
committerKevin O'Connor <kevin@koconnor.net>2019-10-26 18:06:32 -0400
commitc694da37532e495e58d1e18a6ad55ad71d56f085 (patch)
tree44c4eb968105c66cc1b6483ab17760265081205e /scripts
parent4b4e309e1bf9ca4fa89e4eaaa9fcaad5586e9a8a (diff)
downloadkutter-c694da37532e495e58d1e18a6ad55ad71d56f085.tar.gz
kutter-c694da37532e495e58d1e18a6ad55ad71d56f085.tar.xz
kutter-c694da37532e495e58d1e18a6ad55ad71d56f085.zip
flash_usb: Change dfu-util to reset the board after a flash on stm32f4
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/flash_usb.py6
1 files 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,