Closed Nebula-0-System closed 3 months ago
Pretty sure your avr-gcc
is just plain too old.
Pretty sure your
avr-gcc
is just plain too old.
if i may ask, what is that? and how do i update it?
It's the compiler that effectively converts the source code for QMK into a usable binary to flash your keyboard.
Unfortunately Debian-derived Linux distro's such as the Linux Mint you're using package an ancient copy of avr-gcc
.
If you've got Docker installed, it's probably simplest to use that to build as the container includes a newer version:
./util/docker_cmd.sh qmk compile -kb kb28 -km aleena
It's the compiler that effectively converts the source code for QMK into a usable binary to flash your keyboard. Unfortunately Debian-derived Linux distro's such as the Linux Mint you're using package an ancient copy of
avr-gcc
.If you've got Docker installed, it's probably simplest to use that to build as the container includes a newer version:
./util/docker_cmd.sh qmk compile -kb kb28 -km aleena
wow, had no idea it'd be something like that. i'll try it and get back to you
new errors, so at least we're getting somewhere. it prompted me to change some values in the code, but still giving errors now that i fixed that
Ψ Compiling keymap with gmake -r -R -f builddefs/build_keyboard.mk -s KEYBOARD=kb28 KEYMAP=aleena KEYBOARD_FILESAFE=kb28 TARGET=kb28_aleena INTERMEDIATE_OUTPUT=.build/obj_kb28_aleena VERBOSE=false COLOR=true SILENT=false QMK_BIN="qmk"
avr-gcc (GCC) 8.3.0
Copyright (C) 2018 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: .build/obj_kb28_aleena/src/default_keyboard.c [OK]
Compiling: quantum/keymap_introspection.c quantum/keymap_introspection.c: In function 'keymap_layer_count_raw':
quantum/keymap_introspection.c:17:49: error: 'keymaps' undeclared (first use in this function)
#define NUM_KEYMAP_LAYERS_RAW ((uint8_t)(sizeof(keymaps) / ((MATRIX_ROWS) * (MATRIX_COLS) * sizeof(uint16_t))))
^~~~~~~
quantum/keymap_introspection.c:20:12: note: in expansion of macro 'NUM_KEYMAP_LAYERS_RAW'
return NUM_KEYMAP_LAYERS_RAW;
^~~~~~~~~~~~~~~~~~~~~
quantum/keymap_introspection.c:17:49: note: each undeclared identifier is reported only once for each function it appears in
#define NUM_KEYMAP_LAYERS_RAW ((uint8_t)(sizeof(keymaps) / ((MATRIX_ROWS) * (MATRIX_COLS) * sizeof(uint16_t))))
^~~~~~~
quantum/keymap_introspection.c:20:12: note: in expansion of macro 'NUM_KEYMAP_LAYERS_RAW'
return NUM_KEYMAP_LAYERS_RAW;
^~~~~~~~~~~~~~~~~~~~~
quantum/keymap_introspection.c: At top level:
quantum/keymap_introspection.c:17:49: error: 'keymaps' undeclared here (not in a function)
#define NUM_KEYMAP_LAYERS_RAW ((uint8_t)(sizeof(keymaps) / ((MATRIX_ROWS) * (MATRIX_COLS) * sizeof(uint16_t))))
^~~~~~~
quantum/keymap_introspection.c:28:16: note: in expansion of macro 'NUM_KEYMAP_LAYERS_RAW'
_Static_assert(NUM_KEYMAP_LAYERS_RAW <= MAX_LAYER, "Number of keymap layers exceeds maximum set by DYNAMIC_KEYMAP_LAYER_COUNT");
^~~~~~~~~~~~~~~~~~~~~
quantum/keymap_introspection.c:17:31: error: expression in static assertion is not an integer
#define NUM_KEYMAP_LAYERS_RAW ((uint8_t)(sizeof(keymaps) / ((MATRIX_ROWS) * (MATRIX_COLS) * sizeof(uint16_t))))
^
quantum/keymap_introspection.c:28:16: note: in expansion of macro 'NUM_KEYMAP_LAYERS_RAW'
_Static_assert(NUM_KEYMAP_LAYERS_RAW <= MAX_LAYER, "Number of keymap layers exceeds maximum set by DYNAMIC_KEYMAP_LAYER_COUNT");
^~~~~~~~~~~~~~~~~~~~~
quantum/keymap_introspection.c: In function 'keymap_layer_count_raw':
quantum/keymap_introspection.c:21:1: error: control reaches end of non-void function [-Werror=return-type]
}
^
cc1: all warnings being treated as errors
[ERRORS]
|
|
|
gmake: *** [builddefs/common_rules.mk:373: .build/obj_kb28_aleena/quantum/keymap_introspection.o] Error 1
again, it's more core stuff to the repo, so i feel i shouldn't need to change it. any other ideas? if not i'll just fix it myself and put in a PR when this is all said and done
If your keyboards/doio/kb28/keymaps/default/keymap.c
is identical to keymaps/doio/kb28/kb28g.c
, you effectively don't have a keymap (which is required).
Examining other keyboards in the repository along with the documentation will provide helpful information about the structure of this file.
If I've misread or misunderstood, perhaps make
is not rebuilding all the files it needs to; running qmk clean
will help there.
If your
keyboards/doio/kb28/keymaps/default/keymap.c
is identical tokeymaps/doio/kb28/kb28g.c
, you effectively don't have a keymap (which is required).Examining other keyboards in the repository along with the documentation will provide helpful information about the structure of this file.
wow, i did not read that well enough, thought that was the default keymap, not that it was just for the LEDs. i also just realized the error specifically states "keymaps undeclared"
i'll fix that now and let you know.
ok got very far, all the way to flashing in fact (after removing #include "kb28g.h"
in the keymap.c), but at the last line i got
sh: 1: hid_bootloader_cli: not found
gmake: *** [platforms/avr/flash.mk:173: flash] Error 127
which i checked, and it requires you to specify the microcontroller, which i did, and it still didn't work.
that said there was a previous issue i thought i solved where it wouldn't let me compile the right bootloader for the chip, so i just chose qmk-hid as it seemed like the generic option and it stopped giving me "invalid bootloader specified". maybe that was a mistake and i didn't actually solve the issue? i don't think so as it did seem to work afterwards.
so i just chose qmk-hid as it seemed like the generic option
There is no generic option for bootloaders; these are hardware-specific.
It would be a good idea to upload the original code as-provided to a public repository, since it is unknown what you've changed or what microcontroller the PCB uses. Given the original error message you mention of an invalid bootloader, seeking assistance with the conversion in the QMK Discord is also recommended.
It doesn't sound like the bootloader situation is simple/standard, and getting this wrong has the potential to "brick" the PCB. (You would need to acquire a hardware programmer to reprogram the bootloader using specific pins if that happens.)
so i just chose qmk-hid as it seemed like the generic option
There is no generic option for bootloaders; these are hardware-specific.
It would be a good idea to upload the original code as-provided to a public repository, since it is unknown what you've changed or what microcontroller the PCB uses. Given the original error message you mention of an invalid bootloader, seeking assistance with the conversion in the QMK Discord is also recommended.
It doesn't sound like the bootloader situation is simple/standard, and getting this wrong has the potential to "brick" the PCB. (You would need to acquire a hardware programmer to reprogram the bootloader using specific pins if that happens.)
alright, thank you. i'll move there and close this then as clearly it's not a bug or whatever, but has to do with the KB code. thanks for the help in getting me closer
Describe the Bug
i'm trying to compile custom firmware for the doio kb28 and i'm struggling as it's giving me constant trouble, namely with files in the quantum folder, which i feel shouldn't be happening, as those are core files that i feel i shouldn't have to edit to make this work. that said, i am having a hard time understanding what i'm looking at as this is my first try, so maybe i'm just doing something totally wrong.
the output i'm getting is as follows
i don't know why it's giving errors on these and i'm not finding any support or related help on this from some simple googling. i'm trying to use most of the code i was given for this by the company but so far it's needed a lot of editing and fixing to clean up as when i tried just compiling what they gave me, it gave a ton of errors that i've already put a lot of work into solving, these are just some straggler errors that i'm stuck on stamping out.
also tagging @zhaqian12 as you are the author of this stuff, so if you can help that'd be awesome as well
Keyboard Used
doio/kb28
Link to product page (if applicable)
https://doioshop.com/products/doio-28keys-mechanical-keyboard?VariantsId=10115
Operating System
Linux Mint virginia 21.3 x86_64
qmk doctor Output
Is AutoHotKey / Karabiner installed
Other keyboard-related software installed
VIA
Additional Context
here's the config.h code
here's info.json
and kb28g.h
as well as kb28g.c (same as keymap.c)
and my rules.mk in the root for the keyboard, and the keymap folder
i'm kinda hoping this is because i've overlooked something in the documentation, and not some issue with the actual firmware itself. i feel like maybe the code i was given is incompatible or maybe this is a much larger issue. i've been at this a while, so any and all help is appreciated as i've really hit a wall here.