From 507c948ed8bb927096c6951ef75d8398fae040f9 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Wed, 16 Jul 2025 14:56:29 +0100 Subject: [PATCH] Allow `qmk flash ` to flash AT32 boards (#25497) --- lib/python/qmk/flashers.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/python/qmk/flashers.py b/lib/python/qmk/flashers.py index 2cca4941d33..22d9133d65e 100644 --- a/lib/python/qmk/flashers.py +++ b/lib/python/qmk/flashers.py @@ -96,7 +96,7 @@ def _find_bootloader(): details = 'halfkay' else: 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) else: details = None @@ -176,7 +176,7 @@ def _flash_dfu_util(details, file): # kiibohd 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) - # STM32, APM32, or GD32V DFU + # STM32, APM32, AT32, or GD32V DFU else: 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.") else: 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) elif bl == 'wb32-dfu': if _flash_wb32_dfu_updater(file):