diff options
author | Nick Brassel <[email protected]> | 2025-02-28 09:23:04 +1100 |
---|---|---|
committer | Nick Brassel <[email protected]> | 2025-02-28 09:23:04 +1100 |
commit | a63fd7f01cdabd9ce85bb09ae2b573fd3b8e60aa (patch) | |
tree | 35d817580e5244d62a150a2d012f72906a610977 /lib/python/qmk/flashers.py | |
parent | 6d0e5728aa61b442885d48caf49d29e5c60e8197 (diff) | |
parent | cdb865cf60b17593f5c811c24a21d7b3030d8653 (diff) | |
download | qmk_firmware-a63fd7f01cdabd9ce85bb09ae2b573fd3b8e60aa.tar.gz qmk_firmware-a63fd7f01cdabd9ce85bb09ae2b573fd3b8e60aa.zip |
Merge remote-tracking branch 'upstream/develop'0.28.0
Diffstat (limited to 'lib/python/qmk/flashers.py')
-rw-r--r-- | lib/python/qmk/flashers.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/python/qmk/flashers.py b/lib/python/qmk/flashers.py index 7ee1bc8de7..2cca4941d3 100644 --- a/lib/python/qmk/flashers.py +++ b/lib/python/qmk/flashers.py @@ -202,6 +202,10 @@ def _flash_mdloader(file): def _flash_uf2(file): + output = cli.run(['util/uf2conv.py', '--info', file]).stdout + if 'UF2 File' not in output: + return True + cli.run(['util/uf2conv.py', '--deploy', file], capture_output=False) @@ -235,7 +239,8 @@ def flasher(mcu, file): elif bl == 'md-boot': _flash_mdloader(file) elif bl == '_uf2_compatible_': - _flash_uf2(file) + if _flash_uf2(file): + return (True, "Flashing only supports uf2 format files.") else: return (True, "Known bootloader found but flashing not currently supported!") |