aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/flash_usb.py
diff options
context:
space:
mode:
authorArksine <arksine.code@gmail.com>2020-04-25 14:20:25 -0400
committerKevinOConnor <kevin@koconnor.net>2020-05-28 14:44:51 -0400
commitab87af90a391e842c3d2e76c7a2dad5d5db0ad5a (patch)
tree71c528e511262e05204b4ddc32a2055b5558a888 /scripts/flash_usb.py
parent380ba2a618ed3ccacc79ded93f44d80cc93a2894 (diff)
downloadkutter-ab87af90a391e842c3d2e76c7a2dad5d5db0ad5a.tar.gz
kutter-ab87af90a391e842c3d2e76c7a2dad5d5db0ad5a.tar.xz
kutter-ab87af90a391e842c3d2e76c7a2dad5d5db0ad5a.zip
stm32f4: Add support for HID bootloader
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Diffstat (limited to 'scripts/flash_usb.py')
-rwxr-xr-xscripts/flash_usb.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/scripts/flash_usb.py b/scripts/flash_usb.py
index 7a02da45..550051f3 100755
--- a/scripts/flash_usb.py
+++ b/scripts/flash_usb.py
@@ -219,6 +219,8 @@ Failed to flash to %s: %s
If the device is already in bootloader mode it can be flashed with the
following command:
make flash FLASH_DEVICE=0483:df11
+ OR
+ make flash FLASH_DEVICE=1209:beba
If attempting to flash via 3.3V serial, then use:
make serialflash FLASH_DEVICE=%s
@@ -228,8 +230,11 @@ 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", start], options.sudo)
+ if options.start == 0x8004000:
+ flash_hidflash(options.device, binfile, options.sudo)
+ else:
+ flash_dfuutil(options.device, binfile,
+ ["-R", "-a", "0", "-s", start], options.sudo)
except error as e:
sys.stderr.write(STM32F4_HELP % (
options.device, str(e), options.device))