qmk / qmk_firmware

Open-source keyboard firmware for Atmel AVR and Arm USB families
https://qmk.fm
GNU General Public License v2.0
18.24k stars 39.3k forks source link

backlight_driver_common.c: Backlight pin/pins not defined #9248

Closed jericdeleon closed 4 years ago

jericdeleon commented 4 years ago

Issue

Intended to compile with qmk compile -kb crkbd -km default. Only thing added was BACKLIGHT_ENABLE = yes in rules.mk. Instead of getting a clean compile, error below is encountered:

➜ qmk compile -kb crkbd -km default
Ψ Compiling keymap with make crkbd:default

QMK Firmware 0.9.0
Making crkbd/rev1 with keymap default

avr-gcc (GCC) 5.4.0
Copyright (C) 2015 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: keyboards/crkbd/ssd1306.c                                                                [OK]
Compiling: keyboards/crkbd/rev1/matrix.c                                                            [OK]
Compiling: keyboards/crkbd/rev1/split_util.c                                                        [OK]
Compiling: keyboards/crkbd/rev1/split_scomm.c                                                       [OK]
Compiling: keyboards/crkbd/lib/glcdfont.c                                                           [OK]
Compiling: keyboards/crkbd/lib/rgb_state_reader.c                                                   [OK]
Compiling: keyboards/crkbd/lib/layer_state_reader.c                                                 [OK]
Compiling: keyboards/crkbd/lib/logo_reader.c                                                        [OK]
Compiling: keyboards/crkbd/lib/keylogger.c                                                          [OK]
Compiling: keyboards/crkbd/crkbd.c                                                                  [OK]
Compiling: keyboards/crkbd/rev1/rev1.c                                                              [OK]
Compiling: keyboards/crkbd/keymaps/default/keymap.c                                                 [OK]
Compiling: quantum/quantum.c                                                                        [OK]
Compiling: quantum/keymap_common.c                                                                  [OK]
Compiling: quantum/keycode_config.c                                                                 [OK]
Compiling: quantum/debounce/sym_g.c                                                                 [OK]
Compiling: quantum/backlight/backlight.c                                                            [OK]
Compiling: quantum/process_keycode/process_backlight.c                                              [OK]
Compiling: quantum/backlight/backlight_driver_common.c                                             quantum/backlight/backlight_driver_common.c:6:6: error: #error "Backlight pin/pins not defined. Please configure."
 #    error "Backlight pin/pins not defined. Please configure."
      ^
quantum/backlight/backlight_driver_common.c:22:36: error: ‘BACKLIGHT_PIN’ undeclared here (not in a function)
 static const pin_t backlight_pin = BACKLIGHT_PIN;
                                    ^
 [ERRORS]
 |
 |
 |
make[1]: *** [tmk_core/rules.mk:386: .build/obj_crkbd_rev1_default/quantum/backlight/backlight_driver_common.o] Error 1
make: *** [Makefile:584: crkbd:default] Error 1
Make finished with errors

System Information

zvecr commented 4 years ago

Backlight is not supported on that board so that would be an expected error. It either runs rgb light or rgb matrix.

jericdeleon commented 4 years ago

I see, so it seems was using an incorrect rules.mk in the first place; I had BACKLIGHT_ENABLE = yes ever since 2 years ago, and it did not raise a compile error when make crkbd:default was the process, and not qmk compile

Thanks!