Fix broken keyboards (#11412)
* Fix a couple errors * add a dependency for the generated headers
This commit is contained in:
parent
f27d8d9448
commit
11bd98f684
@ -35,7 +35,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
* | 40 | 41 | 42 | 46 | 4a | 4b | 4c | 4d |
|
* | 40 | 41 | 42 | 46 | 4a | 4b | 4c | 4d |
|
||||||
* `-----------------------------------------------------------'
|
* `-----------------------------------------------------------'
|
||||||
*/
|
*/
|
||||||
#define KEYMAP_ANSI( \
|
#define LAYOUT_ansi( \
|
||||||
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, \
|
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, \
|
||||||
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \
|
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \
|
||||||
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2c, k2d, \
|
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/>.
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define KEYMAP_ANSI LAYOUT_ansi
|
||||||
|
@ -39,15 +39,16 @@ def generate_layouts(cli):
|
|||||||
# Build the layouts.h file.
|
# Build the layouts.h file.
|
||||||
layouts_h_lines = ['/* This file was generated by `qmk generate-layouts`. Do not edit or copy.' ' */', '', '#pragma once']
|
layouts_h_lines = ['/* This file was generated by `qmk generate-layouts`. Do not edit or copy.' ' */', '', '#pragma once']
|
||||||
|
|
||||||
if 'direct' in kb_info_json['matrix_pins']:
|
if 'matrix_pins' in kb_info_json:
|
||||||
col_num = len(kb_info_json['matrix_pins']['direct'][0])
|
if 'direct' in kb_info_json['matrix_pins']:
|
||||||
row_num = len(kb_info_json['matrix_pins']['direct'])
|
col_num = len(kb_info_json['matrix_pins']['direct'][0])
|
||||||
elif 'cols' in kb_info_json['matrix_pins'] and 'rows' in kb_info_json['matrix_pins']:
|
row_num = len(kb_info_json['matrix_pins']['direct'])
|
||||||
col_num = len(kb_info_json['matrix_pins']['cols'])
|
elif 'cols' in kb_info_json['matrix_pins'] and 'rows' in kb_info_json['matrix_pins']:
|
||||||
row_num = len(kb_info_json['matrix_pins']['rows'])
|
col_num = len(kb_info_json['matrix_pins']['cols'])
|
||||||
else:
|
row_num = len(kb_info_json['matrix_pins']['rows'])
|
||||||
cli.log.error('%s: Invalid matrix config.', cli.config.generate_layouts.keyboard)
|
else:
|
||||||
return False
|
cli.log.error('%s: Invalid matrix config.', cli.config.generate_layouts.keyboard)
|
||||||
|
return False
|
||||||
|
|
||||||
for layout_name in kb_info_json['layouts']:
|
for layout_name in kb_info_json['layouts']:
|
||||||
if kb_info_json['layouts'][layout_name]['c_macro']:
|
if kb_info_json['layouts'][layout_name]['c_macro']:
|
||||||
|
@ -134,6 +134,9 @@ def _extract_indicators(info_data, config_c):
|
|||||||
_log_warning(info_data, f'Indicator {json_key} is specified in both info.json and config.h, the config.h value wins.')
|
_log_warning(info_data, f'Indicator {json_key} is specified in both info.json and config.h, the config.h value wins.')
|
||||||
|
|
||||||
if config_key in config_c:
|
if config_key in config_c:
|
||||||
|
if 'indicators' not in info_data:
|
||||||
|
info_data['indicators'] = {}
|
||||||
|
|
||||||
info_data['indicators'][json_key] = config_c.get(config_key)
|
info_data['indicators'][json_key] = config_c.get(config_key)
|
||||||
|
|
||||||
return info_data
|
return info_data
|
||||||
|
@ -324,27 +324,27 @@ $1_CXXFLAGS = $$(ALL_CXXFLAGS) $$($1_DEFS) $$($1_INCFLAGS) $$($1_CONFIG_FLAGS) $
|
|||||||
$1_ASFLAGS = $$(ALL_ASFLAGS) $$($1_DEFS) $$($1_INCFLAGS) $$($1_CONFIG_FLAGS)
|
$1_ASFLAGS = $$(ALL_ASFLAGS) $$($1_DEFS) $$($1_INCFLAGS) $$($1_CONFIG_FLAGS)
|
||||||
|
|
||||||
# Compile: create object files from C source files.
|
# Compile: create object files from C source files.
|
||||||
$1/%.o : %.c $1/%.d $1/cflags.txt $1/compiler.txt | $(BEGIN)
|
$1/%.o : %.c $1/%.d $1/cflags.txt $1/compiler.txt $(KEYBOARD_OUTPUT)/src/info_config.h $(KEYBOARD_OUTPUT)/src/layouts.h | $(BEGIN)
|
||||||
@mkdir -p $$(@D)
|
@mkdir -p $$(@D)
|
||||||
@$$(SILENT) || printf "$$(MSG_COMPILING) $$<" | $$(AWK_CMD)
|
@$$(SILENT) || printf "$$(MSG_COMPILING) $$<" | $$(AWK_CMD)
|
||||||
$$(eval CMD := $$(CC) -c $$($1_CFLAGS) $$(INIT_HOOK_CFLAGS) $$(GENDEPFLAGS) $$< -o $$@ && $$(MOVE_DEP))
|
$$(eval CMD := $$(CC) -c $$($1_CFLAGS) $$(INIT_HOOK_CFLAGS) $$(GENDEPFLAGS) $$< -o $$@ && $$(MOVE_DEP))
|
||||||
@$$(BUILD_CMD)
|
@$$(BUILD_CMD)
|
||||||
|
|
||||||
# Compile: create object files from C++ source files.
|
# Compile: create object files from C++ source files.
|
||||||
$1/%.o : %.cpp $1/%.d $1/cxxflags.txt $1/compiler.txt | $(BEGIN)
|
$1/%.o : %.cpp $1/%.d $1/cxxflags.txt $1/compiler.txt $(KEYBOARD_OUTPUT)/src/info_config.h $(KEYBOARD_OUTPUT)/src/layouts.h | $(BEGIN)
|
||||||
@mkdir -p $$(@D)
|
@mkdir -p $$(@D)
|
||||||
@$$(SILENT) || printf "$$(MSG_COMPILING_CXX) $$<" | $$(AWK_CMD)
|
@$$(SILENT) || printf "$$(MSG_COMPILING_CXX) $$<" | $$(AWK_CMD)
|
||||||
$$(eval CMD=$$(CC) -c $$($1_CXXFLAGS) $$(INIT_HOOK_CFLAGS) $$(GENDEPFLAGS) $$< -o $$@ && $$(MOVE_DEP))
|
$$(eval CMD=$$(CC) -c $$($1_CXXFLAGS) $$(INIT_HOOK_CFLAGS) $$(GENDEPFLAGS) $$< -o $$@ && $$(MOVE_DEP))
|
||||||
@$$(BUILD_CMD)
|
@$$(BUILD_CMD)
|
||||||
|
|
||||||
$1/%.o : %.cc $1/%.d $1/cxxflags.txt $1/compiler.txt | $(BEGIN)
|
$1/%.o : %.cc $1/%.d $1/cxxflags.txt $1/compiler.txt $(KEYBOARD_OUTPUT)/src/info_config.h $(KEYBOARD_OUTPUT)/src/layouts.h | $(BEGIN)
|
||||||
@mkdir -p $$(@D)
|
@mkdir -p $$(@D)
|
||||||
@$$(SILENT) || printf "$$(MSG_COMPILING_CXX) $$<" | $$(AWK_CMD)
|
@$$(SILENT) || printf "$$(MSG_COMPILING_CXX) $$<" | $$(AWK_CMD)
|
||||||
$$(eval CMD=$$(CC) -c $$($1_CXXFLAGS) $$(INIT_HOOK_CFLAGS) $$(GENDEPFLAGS) $$< -o $$@ && $$(MOVE_DEP))
|
$$(eval CMD=$$(CC) -c $$($1_CXXFLAGS) $$(INIT_HOOK_CFLAGS) $$(GENDEPFLAGS) $$< -o $$@ && $$(MOVE_DEP))
|
||||||
@$$(BUILD_CMD)
|
@$$(BUILD_CMD)
|
||||||
|
|
||||||
# Assemble: create object files from assembler source files.
|
# Assemble: create object files from assembler source files.
|
||||||
$1/%.o : %.S $1/asflags.txt $1/compiler.txt | $(BEGIN)
|
$1/%.o : %.S $1/asflags.txt $1/compiler.txt $(KEYBOARD_OUTPUT)/src/info_config.h $(KEYBOARD_OUTPUT)/src/layouts.h | $(BEGIN)
|
||||||
@mkdir -p $$(@D)
|
@mkdir -p $$(@D)
|
||||||
@$(SILENT) || printf "$$(MSG_ASSEMBLING) $$<" | $$(AWK_CMD)
|
@$(SILENT) || printf "$$(MSG_ASSEMBLING) $$<" | $$(AWK_CMD)
|
||||||
$$(eval CMD=$$(CC) -c $$($1_ASFLAGS) $$< -o $$@)
|
$$(eval CMD=$$(CC) -c $$($1_ASFLAGS) $$< -o $$@)
|
||||||
|
Loading…
Reference in New Issue
Block a user