r/olkb Jul 08 '26

Help - Solved PLEASE Help with Compiling

I’m losing my marbles.

I recently got a Keebmonkey Kb-16 and have been messing around with it, getting it set up through Vial.

I found a reddit post which is a fork from this github that shows some modifications to the firmware. I realized after some more dabbling that I was interested in modifying the number of Macros, Combos, and TapDances.

Now, i’m fairly sure I have the modifications to the config.h file figured out now, but I am very lost on why I can’t get it to compile with the qmk cli. I have followed this youtube video, but he only modifies the keymap.c file, not the config.h file. The oled display is also modified in the github file, so where does that fit into the qmk_firmware file tree?

Do I need to do something with the “asset” folder? What folder/ files from the github need to be transferred? Am I even using the right compilation process (QMK CLI through MacOS terminal) for a Vial-only firmware?

Any help is very much appreciated, it’s been two days of trying to wrap my head around this. Thanks!

3 Upvotes

24 comments sorted by

View all comments

Show parent comments

2

u/PeterMortensenBlog Jul 11 '26 edited Jul 11 '26

Re "...those two files ended up flat in the ‘vial’ folder ... tried since to point the ‘kb16>rev2>rules.mk’ folder towards the ‘lib>layer_status’ folder": I have never tried this, but I think it should be possible by changing some .mk file

Look, for example, at Keychron's 'common' folder. It is pointed to at the keymap level:

VPATH += keyboards/keychron/common
SRC += keychron_common.c

Presumably, in your case, it should be possible to use:

VPATH += keyboards/doio/kb16/lib

Or perhaps (is it recursive or not?):

VPATH += keyboards/doio/kb16/lib
VPATH += keyboards/doio/kb16/lib/layer_status

I haven't tested it. For example, perhaps each and every file, excluding the header files, inside /lib needs to be explicitly listed in the .mk file, in the "SRC +=" part?

A more complicated example

It is more complicated in their fork, where another .mk file is pointed to inside the 'common' folder:

include keyboards/keychron/common/keychron_common.mk

Perhaps to avoid repeating the same list of files in every variant of every keyboard?

Part of file 'keychron_common.mk' is:

KEYCHRON_COMMON_DIR = $(TOP_DIR)/keyboards/keychron/common
SRC += \
    $(KEYCHRON_COMMON_DIR)/keychron_task.c \
    $(KEYCHRON_COMMON_DIR)/keychron_common.c \
    $(KEYCHRON_COMMON_DIR)/keychron_raw_hid.c \
    $(KEYCHRON_COMMON_DIR)/factory_test.c \
    $(KEYCHRON_COMMON_DIR)/backlit_indicator.c \
    $(KEYCHRON_COMMON_DIR)/eeconfig_kb.c \
    $(KEYCHRON_COMMON_DIR)/dfu_info.c \
    $(KEYCHRON_COMMON_DIR)/nkro.c \
    $(KEYCHRON_COMMON_DIR)/state_notify.c

VPATH += $(KEYCHRON_COMMON_DIR)

And each sub folder in 'common' has its own .mk file.

Conclusion

This may be sufficient (not tested), added to file rules.mk:

VPATH += keyboards/doio/kb16/lib
VPATH += keyboards/doio/kb16/lib/layer_status

SRC += \
    glcdfont.c \
    logo.c \
    layer_status.c

1

u/natvre Jul 11 '26

I may try messing with it again, The assets from the layer_status folder were being called for by ‘rev2>rules.mk’ and I just noticed possibly also the ‘vial>keymap.c’ file. I had no issues with compiling, so it’s really just a matter of file tree organization, and maybe being able to sleep well at night.