Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI flashers should allow files outside qmk_firmware folder #19454

Merged
merged 1 commit into from
Jan 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions lib/python/qmk/flashers.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,25 +178,25 @@ def flasher(mcu, file):
# Add a small sleep to avoid race conditions
time.sleep(1)
if bl == 'atmel-dfu':
_flash_atmel_dfu(details, file.name)
_flash_atmel_dfu(details, file)
elif bl == 'caterina':
if _flash_caterina(details, file.name):
if _flash_caterina(details, file):
return (True, "The Caterina bootloader was found but is not writable. Check 'qmk doctor' output for advice.")
elif bl == 'hid-bootloader':
if mcu:
if _flash_hid_bootloader(mcu, details, file.name):
if _flash_hid_bootloader(mcu, details, 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 == 'stm32-dfu' or bl == 'apm32-dfu' or bl == 'gd32v-dfu' or bl == 'kiibohd':
_flash_dfu_util(details, file.name)
_flash_dfu_util(details, file)
elif bl == 'usbasploader' or bl == 'usbtinyisp':
if mcu:
_flash_isp(mcu, bl, file.name)
_flash_isp(mcu, bl, file)
else:
return (True, "Specifying the MCU with '-m' is necessary for ISP flashing!")
elif bl == 'md-boot':
_flash_mdloader(file.name)
_flash_mdloader(file)
else:
return (True, "Known bootloader found but flashing not currently supported!")

Expand Down