forked from mirrors/qmk_firmware
Also fix flash
This commit is contained in:
parent
033c7af292
commit
294caf1ff1
1 changed files with 3 additions and 2 deletions
|
@ -4,6 +4,7 @@ You can compile a keymap already in the repo or using a QMK Configurator export.
|
|||
A bootloader must be specified.
|
||||
"""
|
||||
import subprocess
|
||||
from argparse import FileType
|
||||
|
||||
import qmk.path
|
||||
from milc import cli
|
||||
|
@ -28,7 +29,7 @@ def print_bootloader_help():
|
|||
|
||||
|
||||
@cli.argument('-bl', '--bootloader', default='flash', help='The flash command, corresponding to qmk\'s make options of bootloaders.')
|
||||
@cli.argument('filename', nargs='?', arg_only=True, help='The configurator export JSON to compile. Use this if you dont want to specify a keymap and keyboard.')
|
||||
@cli.argument('filename', nargs='?', arg_only=True, type=FileType('r'), help='The configurator export JSON to compile.')
|
||||
@cli.argument('-km', '--keymap', help='The keymap to build a firmware for. Use this if you dont have a configurator file. Ignored when a configurator file is supplied.')
|
||||
@cli.argument('-kb', '--keyboard', help='The keyboard to build a firmware for. Use this if you dont have a configurator file. Ignored when a configurator file is supplied.')
|
||||
@cli.argument('-b', '--bootloaders', action='store_true', help='List the available bootloaders.')
|
||||
|
@ -65,7 +66,7 @@ def flash(cli):
|
|||
cli.log.info('Creating {fg_cyan}%s{style_reset_all} keymap in {fg_cyan}%s', user_keymap['keymap'], keymap_path)
|
||||
|
||||
# Convert the JSON into a C file and write it to disk.
|
||||
command = compile_configurator_json(cli.args.filename, cli.args.bootloader)
|
||||
command = compile_configurator_json(user_keymap, cli.args.bootloader)
|
||||
|
||||
cli.log.info('Wrote keymap to {fg_cyan}%s/%s/keymap.c', keymap_path, user_keymap['keymap'])
|
||||
|
||||
|
|
Loading…
Reference in a new issue