This commit is contained in:
Joel Challis 2025-07-16 03:14:57 +01:00 committed by GitHub
commit 2db1c3d06d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -96,7 +96,7 @@ def _find_bootloader():
details = 'halfkay' details = 'halfkay'
else: else:
details = 'qmk-hid' details = 'qmk-hid'
elif bl in {'apm32-dfu', 'gd32v-dfu', 'kiibohd', 'stm32-dfu'}: elif bl in {'apm32-dfu', 'at32-dfu', 'gd32v-dfu', 'kiibohd', 'stm32-dfu'}:
details = (vid, pid) details = (vid, pid)
else: else:
details = None details = None
@ -176,7 +176,7 @@ def _flash_dfu_util(details, file):
# kiibohd # kiibohd
elif details[0] == '1c11' and details[1] == 'b007': elif details[0] == '1c11' and details[1] == 'b007':
cli.run(['dfu-util', '-a', '0', '-d', f'{details[0]}:{details[1]}', '-D', file], capture_output=False) cli.run(['dfu-util', '-a', '0', '-d', f'{details[0]}:{details[1]}', '-D', file], capture_output=False)
# STM32, APM32, or GD32V DFU # STM32, APM32, AT32, or GD32V DFU
else: else:
cli.run(['dfu-util', '-a', '0', '-d', f'{details[0]}:{details[1]}', '-s', '0x08000000:leave', '-D', file], capture_output=False) cli.run(['dfu-util', '-a', '0', '-d', f'{details[0]}:{details[1]}', '-s', '0x08000000:leave', '-D', file], capture_output=False)
@ -226,7 +226,7 @@ def flasher(mcu, file):
return (True, "Please make sure 'teensy_loader_cli' or 'hid_bootloader_cli' is available on your system.") return (True, "Please make sure 'teensy_loader_cli' or 'hid_bootloader_cli' is available on your system.")
else: else:
return (True, "Specifying the MCU with '-m' is necessary for HalfKay/HID bootloaders!") return (True, "Specifying the MCU with '-m' is necessary for HalfKay/HID bootloaders!")
elif bl in {'apm32-dfu', 'gd32v-dfu', 'kiibohd', 'stm32-dfu'}: elif bl in {'apm32-dfu', 'at32-dfu', 'gd32v-dfu', 'kiibohd', 'stm32-dfu'}:
_flash_dfu_util(details, file) _flash_dfu_util(details, file)
elif bl == 'wb32-dfu': elif bl == 'wb32-dfu':
if _flash_wb32_dfu_updater(file): if _flash_wb32_dfu_updater(file):