diff options
| author | Joel Challis <git@zvecr.com> | 2025-07-16 14:56:29 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-16 14:56:29 +0100 |
| commit | 507c948ed8bb927096c6951ef75d8398fae040f9 (patch) | |
| tree | 93c97fbfd288125f5e37ae1d1dada1622521de55 /lib/python/qmk | |
| parent | f0b04b2a3a3b21cbb833a26de6f68fac100b1b94 (diff) | |
Allow `qmk flash <filename>` to flash AT32 boards (#25497)
Diffstat (limited to 'lib/python/qmk')
| -rw-r--r-- | lib/python/qmk/flashers.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/python/qmk/flashers.py b/lib/python/qmk/flashers.py index 2cca4941d3..22d9133d65 100644 --- a/lib/python/qmk/flashers.py +++ b/lib/python/qmk/flashers.py | |||
| @@ -96,7 +96,7 @@ def _find_bootloader(): | |||
| 96 | details = 'halfkay' | 96 | details = 'halfkay' |
| 97 | else: | 97 | else: |
| 98 | details = 'qmk-hid' | 98 | details = 'qmk-hid' |
| 99 | elif bl in {'apm32-dfu', 'gd32v-dfu', 'kiibohd', 'stm32-dfu'}: | 99 | elif bl in {'apm32-dfu', 'at32-dfu', 'gd32v-dfu', 'kiibohd', 'stm32-dfu'}: |
| 100 | details = (vid, pid) | 100 | details = (vid, pid) |
| 101 | else: | 101 | else: |
| 102 | details = None | 102 | details = None |
| @@ -176,7 +176,7 @@ def _flash_dfu_util(details, file): | |||
| 176 | # kiibohd | 176 | # kiibohd |
| 177 | elif details[0] == '1c11' and details[1] == 'b007': | 177 | elif details[0] == '1c11' and details[1] == 'b007': |
| 178 | cli.run(['dfu-util', '-a', '0', '-d', f'{details[0]}:{details[1]}', '-D', file], capture_output=False) | 178 | cli.run(['dfu-util', '-a', '0', '-d', f'{details[0]}:{details[1]}', '-D', file], capture_output=False) |
| 179 | # STM32, APM32, or GD32V DFU | 179 | # STM32, APM32, AT32, or GD32V DFU |
| 180 | else: | 180 | else: |
| 181 | cli.run(['dfu-util', '-a', '0', '-d', f'{details[0]}:{details[1]}', '-s', '0x08000000:leave', '-D', file], capture_output=False) | 181 | cli.run(['dfu-util', '-a', '0', '-d', f'{details[0]}:{details[1]}', '-s', '0x08000000:leave', '-D', file], capture_output=False) |
| 182 | 182 | ||
| @@ -226,7 +226,7 @@ def flasher(mcu, file): | |||
| 226 | return (True, "Please make sure 'teensy_loader_cli' or 'hid_bootloader_cli' is available on your system.") | 226 | return (True, "Please make sure 'teensy_loader_cli' or 'hid_bootloader_cli' is available on your system.") |
| 227 | else: | 227 | else: |
| 228 | return (True, "Specifying the MCU with '-m' is necessary for HalfKay/HID bootloaders!") | 228 | return (True, "Specifying the MCU with '-m' is necessary for HalfKay/HID bootloaders!") |
| 229 | elif bl in {'apm32-dfu', 'gd32v-dfu', 'kiibohd', 'stm32-dfu'}: | 229 | elif bl in {'apm32-dfu', 'at32-dfu', 'gd32v-dfu', 'kiibohd', 'stm32-dfu'}: |
| 230 | _flash_dfu_util(details, file) | 230 | _flash_dfu_util(details, file) |
| 231 | elif bl == 'wb32-dfu': | 231 | elif bl == 'wb32-dfu': |
| 232 | if _flash_wb32_dfu_updater(file): | 232 | if _flash_wb32_dfu_updater(file): |
