Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gherkin: Refactor and Configurator support [resolved] #3140

Merged
merged 4 commits into from
Jun 7, 2018

Conversation

noroadsleft
Copy link
Member

@noroadsleft noroadsleft commented Jun 7, 2018

  • Refactors the Gherkin keyboard to use the new LAYOUT_ortho_3x10 macro.
  • Keymaps are updated to use #include QMK_KEYBOARD_H
  • White space changes throughout
  • info.json added

TODO (Help wanted and appreciated!):

  • Figure out why the bbaserdem and talljoe keymaps fail to compile
    • I seem to recall @Talljoe is running something in his userspace that attempts to convert keymaps between layouts automatically (for example, converting a keymap written for a TKL onto something like a Planck). As I have no experience with the userspace, I don't have the knowledge to debug this. I ran a compile from current master (0.6.48) and I get the same errors on that branch.
      • Marking resolved per talljoe's recommendation to delete or rename.
        The keymap compiles perfectly if the folder is renamed to something other than talljoe
    • Not sure what's going on with the bbaserdem keymap, but I'm working on it. I probably broke something in the refactor. I intend to have this one solved before any merging.

@noroadsleft
Copy link
Member Author

Talljoe keymap compile log (on qmk:master 0.6.48)

$ make gherkin:talljoe
QMK Firmware 0.6.48
Making gherkin with keymap talljoe

avr-gcc.exe (AVR_8_bit_GNU_Toolchain_3.5.4_1709) 4.9.2
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Compiling: users/talljoe/talljoe.c                                                                 users/talljoe/talljoe.c:6:3: error: implicit declaration of function 'TEMPLATE' [-Werror=implicit-function-declaration]
   [_BASE] = TEMPLATE_TKL(
   ^
users/talljoe/talljoe.c:6:3: error: missing braces around initializer [-Werror=missing-braces]
users/talljoe/talljoe.c:6:3: error: (near initialization for 'keymaps[0]') [-Werror=missing-braces]
users/talljoe/talljoe.c:6:3: error: initializer element is not constant
users/talljoe/talljoe.c:6:3: error: (near initialization for 'keymaps[0][0][0]')
users/talljoe/talljoe.c:18:7: error: initializer element is not constant
       _______, _______, _______,                   _______, _______, _______,                   _______, _______, _______, _______),
       ^
users/talljoe/talljoe.c:18:7: error: (near initialization for 'keymaps[1][0][0]')
users/talljoe/talljoe.c:24:7: error: initializer element is not constant
       _______, _______, _______,                   _______, _______, _______,                   _______, _______, _______, _______),
       ^
users/talljoe/talljoe.c:24:7: error: (near initialization for 'keymaps[2][0][0]')
users/talljoe/talljoe.c:30:7: error: initializer element is not constant
       _______, _______, _______,                   _______, _______, _______,                   _______, _______, _______, _______),
       ^
users/talljoe/talljoe.c:30:7: error: (near initialization for 'keymaps[3][0][0]')
users/talljoe/talljoe.c:36:7: error: initializer element is not constant
       _______, _______, _______,                   _______, _______, _______,                   _______, _______, _______, _______),
       ^
users/talljoe/talljoe.c:36:7: error: (near initialization for 'keymaps[4][0][0]')
users/talljoe/talljoe.c:51:7: error: initializer element is not constant
       KC_LCTL, KC_LGUI, KC_LALT,                   NV_SPC2, NV_SPC1, NV_SPC3,                   KC_RALT, KC_RGUI, KC_RCTL, KC_PTT ),
       ^
users/talljoe/talljoe.c:51:7: error: (near initialization for 'keymaps[6][0][0]')
users/talljoe/talljoe.c:57:7: error: initializer element is not constant
       KC_LCTL, KC_LGUI, KC_LALT,                   NM_SPC2, NM_SPC1, NM_SPC3,                   KC_PDOT, KC_PCMM, KC_RCTL, KC_PTT ),
       ^
users/talljoe/talljoe.c:57:7: error: (near initialization for 'keymaps[7][0][0]')
users/talljoe/talljoe.c:64:7: error: initializer element is not constant
       MO_RST , AG_NORM, AG_SWAP,                   XXXXXXX, BL_STEP, XXXXXXX,                   RGB_TOG, XXXXXXX, XXXXXXX, TG_GAME),
       ^
users/talljoe/talljoe.c:64:7: error: (near initialization for 'keymaps[8][0][0]')
users/talljoe/talljoe.c:71:7: error: initializer element is not constant
       RESET  , XXXXXXX, XXXXXXX,                   XXXXXXX, KC_SLEP, XXXXXXX,                   XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX),
       ^
users/talljoe/talljoe.c:71:7: error: (near initialization for 'keymaps[15][0][0]')
cc1.exe: all warnings being treated as errors
 [ERRORS]
 |
 |
 |
make[1]: *** [tmk_core/rules.mk:360: .build/obj_gherkin_talljoe/talljoe.o] Error 1
Make finished with errors
make: *** [Makefile:549: gherkin:talljoe] Error 1

@noroadsleft
Copy link
Member Author

bbaserdem keymap compile log (on qmk:master 0.6.48)

$ make gherkin:bbaserdem
QMK Firmware 0.6.48
Making gherkin with keymap bbaserdem

avr-gcc.exe (AVR_8_bit_GNU_Toolchain_3.5.4_1709) 4.9.2
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Compiling: users/bbaserdem/bbaserdem.c                                                              [OK]
Compiling: keyboards/gherkin/gherkin.c                                                              [OK]
Compiling: keyboards/gherkin/keymaps/bbaserdem/keymap.c                                             [OK]
Compiling: quantum/quantum.c                                                                        [OK]
Compiling: quantum/keymap_common.c                                                                  [OK]
Compiling: quantum/keycode_config.c                                                                 [OK]
Compiling: quantum/process_keycode/process_leader.c                                                 [OK]
Compiling: quantum/matrix.c                                                                         [OK]
Compiling: quantum/process_keycode/process_unicode.c                                                [OK]
Compiling: quantum/process_keycode/process_unicode_common.c                                         [OK]
Compiling: quantum/rgblight.c                                                                       [OK]
Compiling: ./drivers/avr/ws2812.c                                                                   [OK]
Compiling: quantum/led_tables.c                                                                     [OK]
Compiling: ./tmk_core/common/host.c                                                                 [OK]
Compiling: ./tmk_core/common/keyboard.c                                                             [OK]
Compiling: ./tmk_core/common/action.c                                                               [OK]
Compiling: ./tmk_core/common/action_tapping.c                                                       [OK]
Compiling: ./tmk_core/common/action_macro.c                                                         [OK]
Compiling: ./tmk_core/common/action_layer.c                                                         [OK]
Compiling: ./tmk_core/common/action_util.c                                                          [OK]
Compiling: ./tmk_core/common/print.c                                                                [OK]
Compiling: ./tmk_core/common/debug.c                                                                [OK]
Compiling: ./tmk_core/common/util.c                                                                 [OK]
Compiling: ./tmk_core/common/eeconfig.c                                                             [OK]
Compiling: ./tmk_core/common/report.c                                                               [OK]
Compiling: ./tmk_core/common/avr/suspend.c                                                          [OK]
Compiling: ./tmk_core/common/avr/timer.c                                                            [OK]
Compiling: ./tmk_core/common/avr/bootloader.c                                                       [OK]
Assembling: ./tmk_core/common/avr/xprintf.S                                                         [OK]
Compiling: ./tmk_core/common/magic.c                                                                [OK]
Compiling: ./tmk_core/common/backlight.c                                                            [OK]
Compiling: ./tmk_core/protocol/lufa/lufa.c                                                          [OK]
Compiling: tmk_core/protocol/usb_descriptor.c                                                       [OK]
Compiling: ./tmk_core/protocol/lufa/outputselect.c                                                  [OK]
Compiling: lib/lufa/LUFA/Drivers/USB/Class/Common/HIDParser.c                                       [OK]
Compiling: lib/lufa/LUFA/Drivers/USB/Core/AVR8/Device_AVR8.c                                        [OK]
Compiling: lib/lufa/LUFA/Drivers/USB/Core/AVR8/EndpointStream_AVR8.c                                [OK]
Compiling: lib/lufa/LUFA/Drivers/USB/Core/AVR8/Endpoint_AVR8.c                                      [OK]
Compiling: lib/lufa/LUFA/Drivers/USB/Core/AVR8/Host_AVR8.c                                          [OK]
Compiling: lib/lufa/LUFA/Drivers/USB/Core/AVR8/PipeStream_AVR8.c                                    [OK]
Compiling: lib/lufa/LUFA/Drivers/USB/Core/AVR8/Pipe_AVR8.c                                          [OK]
Compiling: lib/lufa/LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.c                                 [OK]
Compiling: lib/lufa/LUFA/Drivers/USB/Core/AVR8/USBInterrupt_AVR8.c                                  [OK]
Compiling: lib/lufa/LUFA/Drivers/USB/Core/ConfigDescriptors.c                                       [OK]
Compiling: lib/lufa/LUFA/Drivers/USB/Core/DeviceStandardReq.c                                       [OK]
Compiling: lib/lufa/LUFA/Drivers/USB/Core/Events.c                                                  [OK]
Compiling: lib/lufa/LUFA/Drivers/USB/Core/HostStandardReq.c                                         [OK]
Compiling: lib/lufa/LUFA/Drivers/USB/Core/USBTask.c                                                 [OK]
Linking: .build/gherkin_bbaserdem.elf                                                               [ERRORS]
 |
 | .build/obj_gherkin_bbaserdem/keyboards/gherkin/keymaps/bbaserdem/keymap.o (symbol from plugin): In function `matrix_init_user':
 | (.text+0x0): multiple definition of `matrix_init_user'
 | .build/obj_gherkin_bbaserdem/bbaserdem.o (symbol from plugin):(.text+0x0): first defined here
 | collect2.exe: error: ld returned 1 exit status
 |
make[1]: *** [tmk_core/rules.mk:286: .build/gherkin_bbaserdem.elf] Error 1
Make finished with errors
make: *** [Makefile:549: gherkin:bbaserdem] Error 1

@Talljoe
Copy link
Contributor

Talljoe commented Jun 7, 2018

Feel free to nuke my keymap in gherkin. I need to migrate it to userspace anyway. Alternatively, rename it to talljoe-gherkin and it won't conflict with userspace anymore.

@noroadsleft
Copy link
Member Author

Wow, quick reply @Talljoe. Appreciate the insight.

I'd rather leave it up to you as to when it gets deleted, as I like my changes to be as non-destructive as possible. I'll rename the folder.

@drashna
Copy link
Member

drashna commented Jun 7, 2018

And @bbaserdem has matrix_init_user defined twice. Once in the keymap and once in the userspace.

renaming the _user part with _keymap, and it should compile.

@noroadsleft
Copy link
Member Author

@drashna I actually just figured out that matrix_init_user was defined twice. I needed to read the error more closely. Thanks!

@noroadsleft noroadsleft changed the title [WIP] Gherkin: Refactor and Configurator support Gherkin: Refactor and Configurator support [resolved] Jun 7, 2018
@drashna
Copy link
Member

drashna commented Jun 7, 2018

Awesome! Thanks!

@drashna drashna merged commit e3c10a7 into qmk:master Jun 7, 2018
@noroadsleft noroadsleft deleted the c10r-gherkin branch June 8, 2018 07:48
yamad pushed a commit to yamad/qmk_firmware that referenced this pull request Apr 10, 2019
* Refactor KEYMAP to LAYOUT_ortho_3x10

* Configurator support

* Renamed @Talljoe's keymap folder

* Renamed matrix_init_user to matrix_init_keymap
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants