From ab87af90a391e842c3d2e76c7a2dad5d5db0ad5a Mon Sep 17 00:00:00 2001 From: Arksine Date: Sat, 25 Apr 2020 14:20:25 -0400 Subject: stm32f4: Add support for HID bootloader Signed-off-by: Eric Callahan --- scripts/flash_usb.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'scripts/flash_usb.py') 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)) -- cgit v1.2.3-70-g09d2