summaryrefslogtreecommitdiff
path: root/lib/python
diff options
context:
space:
mode:
authorErovia <Erovia@users.noreply.github.com>2021-02-01 20:55:35 +0100
committerGitHub <noreply@github.com>2021-02-01 20:55:35 +0100
commit7db826dce89eb16fa0b6362852b97f5a0e4880d5 (patch)
tree7268acd8730338a6973004ce5df8102d38c50358 /lib/python
parentd7126709225a9d6632602c6d7bd345e039e9e58d (diff)
downloadqmk_firmware-7db826dce89eb16fa0b6362852b97f5a0e4880d5.tar.gz
qmk_firmware-7db826dce89eb16fa0b6362852b97f5a0e4880d5.zip
CLI: Fix json flashing (#11765)
Diffstat (limited to 'lib/python')
-rw-r--r--lib/python/qmk/cli/flash.py4
-rw-r--r--lib/python/qmk/commands.py5
2 files changed, 6 insertions, 3 deletions
diff --git a/lib/python/qmk/cli/flash.py b/lib/python/qmk/cli/flash.py
index b3827e8003..a876290035 100644
--- a/lib/python/qmk/cli/flash.py
+++ b/lib/python/qmk/cli/flash.py
@@ -76,9 +76,9 @@ def flash(cli):
if cli.args.filename:
# Handle compiling a configurator JSON
- user_keymap = parse_configurator_json(cli.args.filename, parallel=cli.config.flash.parallel)
+ user_keymap = parse_configurator_json(cli.args.filename)
keymap_path = qmk.path.keymap(user_keymap['keyboard'])
- command = compile_configurator_json(user_keymap, cli.args.bootloader, **envs)
+ command = compile_configurator_json(user_keymap, cli.args.bootloader, parallel=cli.config.flash.parallel, **envs)
cli.log.info('Wrote keymap to {fg_cyan}%s/%s/keymap.c', keymap_path, user_keymap['keymap'])
diff --git a/lib/python/qmk/commands.py b/lib/python/qmk/commands.py
index f58062004f..3c6f0d001d 100644
--- a/lib/python/qmk/commands.py
+++ b/lib/python/qmk/commands.py
@@ -98,7 +98,7 @@ def write_version_h(git_version, build_date, chibios_version, chibios_contrib_ve
version_h_file.write_text('\n'.join(version_h))
-def compile_configurator_json(user_keymap, parallel=1, **env_vars):
+def compile_configurator_json(user_keymap, bootloader=None, parallel=1, **env_vars):
"""Convert a configurator export JSON file into a C file and then compile it.
Args:
@@ -153,6 +153,9 @@ def compile_configurator_json(user_keymap, parallel=1, **env_vars):
'build_keyboard.mk',
])
+ if bootloader:
+ make_command.append(bootloader)
+
for key, value in env_vars.items():
make_command.append(f'{key}={value}')