qmk/qmk_firmware

Compile breaks when you have empty layers in your JSON file [Bug]

Open

#8,328 opened on Mar 6, 2020

View on GitHub
 (4 comments) (2 reactions) (0 assignees)C (43,867 forks)batch import
bughelp wanted

Repository metrics

Stars
 (20,368 stars)
PR merge metrics
 (Avg merge 20d 9h) (27 merged PRs in 30d)

Description

.json file from QMK Configurator does not compile correctly with qmk compile when there are empty layers before the final mapped layer.

Describe the Bug

  1. I created a .json on QMK Configurator that had the following layer setup:
  • 0 through 3 had keys configured
  • 4-9 were empty (they were empty arrays)
  • 10 had all my Fn keys in it
  1. I exported it to my computer because the Online Configurator has been very slow today
  2. I set up QMK Firmware on my Mac with:
  • Python 3.x (the latest as of today)
  • Ran qmk setup
  • Ran qmk compile <name of my json file>

Compile errors, and no creation of a .hex file.

ompiling: keyboards/idobo/idobo.c                                                                  [OK]
Compiling: keyboards/idobo/keymaps/jdev-id75-bigbang-qw-dvk-fullbalancedmargin/keymap.c            keyboards/idobo/keymaps/jdev-id75-bigbang-qw-dvk-fullbalancedmargin/keymap.c:14:26: error: macro "LAYOUT_ortho_5x15" requires 75 arguments, but only 1 given
  [4] = LAYOUT_ortho_5x15(),
                          ^
keyboards/idobo/keymaps/jdev-id75-bigbang-qw-dvk-fullbalancedmargin/keymap.c:14:8: error: 'LAYOUT_ortho_5x15' undeclared here (not in a function)
  [4] = LAYOUT_ortho_5x15(),
        ^~~~~~~~~~~~~~~~~
keyboards/idobo/keymaps/jdev-id75-bigbang-qw-dvk-fullbalancedmargin/keymap.c:15:26: error: macro "LAYOUT_ortho_5x15" requires 75 arguments, but only 1 given
  [5] = LAYOUT_ortho_5x15(),
                          ^
keyboards/idobo/keymaps/jdev-id75-bigbang-qw-dvk-fullbalancedmargin/keymap.c:16:26: error: macro "LAYOUT_ortho_5x15" requires 75 arguments, but only 1 given
  [6] = LAYOUT_ortho_5x15(),
                          ^
keyboards/idobo/keymaps/jdev-id75-bigbang-qw-dvk-fullbalancedmargin/keymap.c:17:26: error: macro "LAYOUT_ortho_5x15" requires 75 arguments, but only 1 given
  [7] = LAYOUT_ortho_5x15(),
                          ^
keyboards/idobo/keymaps/jdev-id75-bigbang-qw-dvk-fullbalancedmargin/keymap.c:18:26: error: macro "LAYOUT_ortho_5x15" requires 75 arguments, but only 1 given
  [8] = LAYOUT_ortho_5x15(),
                          ^
keyboards/idobo/keymaps/jdev-id75-bigbang-qw-dvk-fullbalancedmargin/keymap.c:19:26: error: macro "LAYOUT_ortho_5x15" requires 75 arguments, but only 1 given
  [9] = LAYOUT_ortho_5x15(),
                          ^
 [ERRORS]
 | 
 | 
 | 
make[1]: *** [.build/obj_idobo_jdev-id75-bigbang-qw-dvk-fullbalancedmargin/keyboards/idobo/keymaps/jdev-id75-bigbang-qw-dvk-fullbalancedmargin/keymap.o] Error 1
make: *** [idobo:jdev-id75-bigbang-qw-dvk-fullbalancedmargin] Error 1
Make finished with errors

System Information

  • Keyboard: Idobo 75
    • Revision (if applicable):
  • Operating system: Mac OS
  • AVR GCC version:
  • ARM GCC version:
  • QMK Firmware version:
  • Any keyboard related software installed?
    • AutoHotKey
    • Karabiner
    • Other:

Additional Context

Generating .hex files from the online QMK Configurator with empty layers was never an issue.

Contributor guide