diff options
author | Zach White <skullydazed@gmail.com> | 2021-01-02 18:08:17 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-03 13:08:17 +1100 |
commit | 11bd98f684148ed9577b263189121e52027d66d9 (patch) | |
tree | a10d89e82aae10765082c3cc0a6893ac17ca89f7 | |
parent | f27d8d94489342d4ce7ba9955cd062c725350db9 (diff) | |
download | qmk_firmware-11bd98f684148ed9577b263189121e52027d66d9.tar.gz qmk_firmware-11bd98f684148ed9577b263189121e52027d66d9.zip |
Fix broken keyboards (#11412)
* Fix a couple errors
* add a dependency for the generated headers
-rw-r--r-- | keyboards/jm60/jm60.h | 4 | ||||
-rwxr-xr-x | lib/python/qmk/cli/generate/layouts.py | 19 | ||||
-rw-r--r-- | lib/python/qmk/info.py | 3 | ||||
-rw-r--r-- | tmk_core/rules.mk | 8 |
4 files changed, 20 insertions, 14 deletions
diff --git a/keyboards/jm60/jm60.h b/keyboards/jm60/jm60.h index f83b94f90..34ca4d3d6 100644 --- a/keyboards/jm60/jm60.h +++ b/keyboards/jm60/jm60.h | |||
@@ -35,7 +35,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
35 | * | 40 | 41 | 42 | 46 | 4a | 4b | 4c | 4d | | 35 | * | 40 | 41 | 42 | 46 | 4a | 4b | 4c | 4d | |
36 | * `-----------------------------------------------------------' | 36 | * `-----------------------------------------------------------' |
37 | */ | 37 | */ |
38 | #define KEYMAP_ANSI( \ | 38 | #define LAYOUT_ansi( \ |
39 | k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, \ | 39 | k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, \ |
40 | k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \ | 40 | k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \ |
41 | k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2c, k2d, \ | 41 | k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2c, k2d, \ |
@@ -51,3 +51,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
51 | } | 51 | } |
52 | 52 | ||
53 | #endif | 53 | #endif |
54 | |||
55 | #define KEYMAP_ANSI LAYOUT_ansi | ||
diff --git a/lib/python/qmk/cli/generate/layouts.py b/lib/python/qmk/cli/generate/layouts.py index 809f0ef7e..273870e15 100755 --- a/lib/python/qmk/cli/generate/layouts.py +++ b/lib/python/qmk/cli/generate/layouts.py | |||
@@ -39,15 +39,16 @@ def generate_layouts(cli): | |||
39 | # Build the layouts.h file. | 39 | # Build the layouts.h file. |
40 | layouts_h_lines = ['/* This file was generated by `qmk generate-layouts`. Do not edit or copy.' ' */', '', '#pragma once'] | 40 | layouts_h_lines = ['/* This file was generated by `qmk generate-layouts`. Do not edit or copy.' ' */', '', '#pragma once'] |
41 | 41 | ||
42 | if 'direct' in kb_info_json['matrix_pins']: | 42 | if 'matrix_pins' in kb_info_json: |
43 | col_num = len(kb_info_json['matrix_pins']['direct'][0]) | 43 | if 'direct' in kb_info_json['matrix_pins']: |
44 | row_num = len(kb_info_json['matrix_pins']['direct']) | 44 | col_num = len(kb_info_json['matrix_pins']['direct'][0]) |
45 | elif 'cols' in kb_info_json['matrix_pins'] and 'rows' in kb_info_json['matrix_pins']: | 45 | row_num = len(kb_info_json['matrix_pins']['direct']) |
46 | col_num = len(kb_info_json['matrix_pins']['cols']) | 46 | elif 'cols' in kb_info_json['matrix_pins'] and 'rows' in kb_info_json['matrix_pins']: |
47 | row_num = len(kb_info_json['matrix_pins']['rows']) | 47 | col_num = len(kb_info_json['matrix_pins']['cols']) |
48 | else: | 48 | row_num = len(kb_info_json['matrix_pins']['rows']) |
49 | cli.log.error('%s: Invalid matrix config.', cli.config.generate_layouts.keyboard) | 49 | else: |
50 | return False | 50 | cli.log.error('%s: Invalid matrix config.', cli.config.generate_layouts.keyboard) |
51 | return False | ||
51 | 52 | ||
52 | for layout_name in kb_info_json['layouts']: | 53 | for layout_name in kb_info_json['layouts']: |
53 | if kb_info_json['layouts'][layout_name]['c_macro']: | 54 | if kb_info_json['layouts'][layout_name]['c_macro']: |
diff --git a/lib/python/qmk/info.py b/lib/python/qmk/info.py index d7b128aa6..2954a17e0 100644 --- a/lib/python/qmk/info.py +++ b/lib/python/qmk/info.py | |||
@@ -134,6 +134,9 @@ def _extract_indicators(info_data, config_c): | |||
134 | _log_warning(info_data, f'Indicator {json_key} is specified in both info.json and config.h, the config.h value wins.') | 134 | _log_warning(info_data, f'Indicator {json_key} is specified in both info.json and config.h, the config.h value wins.') |
135 | 135 | ||
136 | if config_key in config_c: | 136 | if config_key in config_c: |
137 | if 'indicators' not in info_data: | ||
138 | info_data['indicators'] = {} | ||
139 | |||
137 | info_data['indicators'][json_key] = config_c.get(config_key) | 140 | info_data['indicators'][json_key] = config_c.get(config_key) |
138 | 141 | ||
139 | return info_data | 142 | return info_data |
diff --git a/tmk_core/rules.mk b/tmk_core/rules.mk index a77e55dd1..b595ddb1d 100644 --- a/tmk_core/rules.mk +++ b/tmk_core/rules.mk | |||
@@ -324,27 +324,27 @@ $1_CXXFLAGS = $$(ALL_CXXFLAGS) $$($1_DEFS) $$($1_INCFLAGS) $$($1_CONFIG_FLAGS) $ | |||
324 | $1_ASFLAGS = $$(ALL_ASFLAGS) $$($1_DEFS) $$($1_INCFLAGS) $$($1_CONFIG_FLAGS) | 324 | $1_ASFLAGS = $$(ALL_ASFLAGS) $$($1_DEFS) $$($1_INCFLAGS) $$($1_CONFIG_FLAGS) |
325 | 325 | ||
326 | # Compile: create object files from C source files. | 326 | # Compile: create object files from C source files. |
327 | $1/%.o : %.c $1/%.d $1/cflags.txt $1/compiler.txt | $(BEGIN) | 327 | $1/%.o : %.c $1/%.d $1/cflags.txt $1/compiler.txt $(KEYBOARD_OUTPUT)/src/info_config.h $(KEYBOARD_OUTPUT)/src/layouts.h | $(BEGIN) |
328 | @mkdir -p $$(@D) | 328 | @mkdir -p $$(@D) |
329 | @$$(SILENT) || printf "$$(MSG_COMPILING) $$<" | $$(AWK_CMD) | 329 | @$$(SILENT) || printf "$$(MSG_COMPILING) $$<" | $$(AWK_CMD) |
330 | $$(eval CMD := $$(CC) -c $$($1_CFLAGS) $$(INIT_HOOK_CFLAGS) $$(GENDEPFLAGS) $$< -o $$@ && $$(MOVE_DEP)) | 330 | $$(eval CMD := $$(CC) -c $$($1_CFLAGS) $$(INIT_HOOK_CFLAGS) $$(GENDEPFLAGS) $$< -o $$@ && $$(MOVE_DEP)) |
331 | @$$(BUILD_CMD) | 331 | @$$(BUILD_CMD) |
332 | 332 | ||
333 | # Compile: create object files from C++ source files. | 333 | # Compile: create object files from C++ source files. |
334 | $1/%.o : %.cpp $1/%.d $1/cxxflags.txt $1/compiler.txt | $(BEGIN) | 334 | $1/%.o : %.cpp $1/%.d $1/cxxflags.txt $1/compiler.txt $(KEYBOARD_OUTPUT)/src/info_config.h $(KEYBOARD_OUTPUT)/src/layouts.h | $(BEGIN) |
335 | @mkdir -p $$(@D) | 335 | @mkdir -p $$(@D) |
336 | @$$(SILENT) || printf "$$(MSG_COMPILING_CXX) $$<" | $$(AWK_CMD) | 336 | @$$(SILENT) || printf "$$(MSG_COMPILING_CXX) $$<" | $$(AWK_CMD) |
337 | $$(eval CMD=$$(CC) -c $$($1_CXXFLAGS) $$(INIT_HOOK_CFLAGS) $$(GENDEPFLAGS) $$< -o $$@ && $$(MOVE_DEP)) | 337 | $$(eval CMD=$$(CC) -c $$($1_CXXFLAGS) $$(INIT_HOOK_CFLAGS) $$(GENDEPFLAGS) $$< -o $$@ && $$(MOVE_DEP)) |
338 | @$$(BUILD_CMD) | 338 | @$$(BUILD_CMD) |
339 | 339 | ||
340 | $1/%.o : %.cc $1/%.d $1/cxxflags.txt $1/compiler.txt | $(BEGIN) | 340 | $1/%.o : %.cc $1/%.d $1/cxxflags.txt $1/compiler.txt $(KEYBOARD_OUTPUT)/src/info_config.h $(KEYBOARD_OUTPUT)/src/layouts.h | $(BEGIN) |
341 | @mkdir -p $$(@D) | 341 | @mkdir -p $$(@D) |
342 | @$$(SILENT) || printf "$$(MSG_COMPILING_CXX) $$<" | $$(AWK_CMD) | 342 | @$$(SILENT) || printf "$$(MSG_COMPILING_CXX) $$<" | $$(AWK_CMD) |
343 | $$(eval CMD=$$(CC) -c $$($1_CXXFLAGS) $$(INIT_HOOK_CFLAGS) $$(GENDEPFLAGS) $$< -o $$@ && $$(MOVE_DEP)) | 343 | $$(eval CMD=$$(CC) -c $$($1_CXXFLAGS) $$(INIT_HOOK_CFLAGS) $$(GENDEPFLAGS) $$< -o $$@ && $$(MOVE_DEP)) |
344 | @$$(BUILD_CMD) | 344 | @$$(BUILD_CMD) |
345 | 345 | ||
346 | # Assemble: create object files from assembler source files. | 346 | # Assemble: create object files from assembler source files. |
347 | $1/%.o : %.S $1/asflags.txt $1/compiler.txt | $(BEGIN) | 347 | $1/%.o : %.S $1/asflags.txt $1/compiler.txt $(KEYBOARD_OUTPUT)/src/info_config.h $(KEYBOARD_OUTPUT)/src/layouts.h | $(BEGIN) |
348 | @mkdir -p $$(@D) | 348 | @mkdir -p $$(@D) |
349 | @$(SILENT) || printf "$$(MSG_ASSEMBLING) $$<" | $$(AWK_CMD) | 349 | @$(SILENT) || printf "$$(MSG_ASSEMBLING) $$<" | $$(AWK_CMD) |
350 | $$(eval CMD=$$(CC) -c $$($1_ASFLAGS) $$< -o $$@) | 350 | $$(eval CMD=$$(CC) -c $$($1_ASFLAGS) $$< -o $$@) |