Support for Alternative Layouts
This is a summary of how alternative layouts have been supported by kits such as Colevrak and Homing. It is not a discussion of alt layout performance and development, but if that interests you I highly recommend starting with Pascal Getreuer’s A guide to alt keyboard layouts (why, how, which one?). It’s a concise and comprehensive overview with links to some great sites that go deeper. He also has a separate Links about keyboards page. The Keyboard layouts doc he recommends explains layout goals and metrics in detail, summarizing the alt layouts discussed here as well as more than one hundred others. Sculpted-profile The majority of custom keycap sets are sculpted-profile (Cherry, SA, MT3, KAT, etc. - more on profiles generally here) so let’s start there. Because each row has a unique keycap shape, alt layouts require a unique keycap for each legend that moves off its QWERTY row. At first there were two The Dvorak layout was patented in 1936 by August Dvorak & William L....
Apr 23, 2024
I did everything here:
https://github.com/kiibohd/controller/wiki/Windows-Setup
And the path to my ARM EABI is (no spaces in the path): /usr/local/gcc-arm-none-eabi-5_2-2015q4-20151219-win32/arm-none-eabi/include/c++/5.2.1/debug
I still get the
[ 5%] Building C object CMakeFiles/kiibohd.elf.dir/main.c.o ../main.c:28:19: fatal error: macro.h: No such file or directory
So I've scanned all my harddrive to see if there was a "macro.h" file:
# find /cygdrive/c/ | grep "/macro.h$" /cygdrive/c/cygwin/home/Olivier/tmp/kiibohd-controller/Macro/basic/macro.h /cygdrive/c/cygwin/home/Olivier/tmp/kiibohd-controller/Macro/buffer/macro.h /cygdrive/c/cygwin/home/Olivier/tmp/kiibohd-controller/Macro/PartialMap/macro.h #
My wild guess is that I've not installed a good version of the required tools but I dont see which one.
Then I tried to compile the tmk: infinity-tmk/infinity_ergodox.
after many all files compiled ok it tried to link them:
Compiling suspend.c Compiling printf.c Compiling timer.c Compiling bootloader.c Linking build/ch.elf lto1.exe: internal compiler error: in add_symbol_to_partition_1, at lto/lto-partition.c:158 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. lto-wrapper.exe: fatal error: C:\cygwin\usr\local\gcc-arm-none-eabi-5_2-2015q4-20151219-win32\bin\arm-none-eabi-gcc.exe returned 1 exit status compilation terminated. c:/cygwin/usr/local/gcc-arm-none-eabi-5_2-2015q4-20151219-win32/bin/../lib/gcc/arm-none-eabi/5.2.1/../../../../arm-none-eabi/bin/ld.exe: error: lto-wrapper failed collect2.exe: error: ld returned 1 exit status tmk_core/tool/chibios/chibios/os/common/ports/ARMCMx/compilers/GCC/rules.mk:238 : la recette pour la cible « build/ch.elf » a échouée make: *** [build/ch.elf] Erreur 1
INTERNAL COMPILER ERROR.......
What should I do now?
The wiki instructions seem a bit wrong too, https://github.com/kiibohd/controller/wiki/Building says to use wincmake instead of make which 100% won't work since those are different steps in the build process.
I haven't tested the bin file to ensure it functions appropriately, but I have got it building a bin successfully. I had to install a few more things, notably pkg-config, and build dfu-util from source to sign the bin file. So do the usual, setup-x86_64.exe to install pkg-config. git clone git://git.code.sf.net/p/dfu-util/dfu-util to get dfu-util, then make, make install to get that where the controller cmake script can find it.
Then what I did was edit the CMakeLists.txt from the cloned controller directory, and set the right chip, ScanModule, BaseMap, DefaultMap, and PartialMaps. You don't need to do this as you can set them from the command line, but this is probably the easier way.
What you then need to do is make a build dir, just mkdir build from controller/ and get into it. Then if you edited CMakeLists you just need to wincmake .., otherwise you will want to run (for the default layout) wincmake -DCHIP=mk20dx256vlh7 -DScanModule=MDErgo1 -DBaseMap="defaultMap leftHand slave1 rightHand" -DDefaultMap="mdergo1Overlay lcdFuncMap" -DPartialMaps="iced_func iced_numpad" .. make At that point you should have a nicely built .bin file; for reference, as of when I built this the SRAM and Flash were at 13% and 16% used and kiibohd.dfu.bin was 42480 bytes. Note that this will only be built for the left side. If you want the right side you'd probably want a different build directory and just change DefaultMap to flip the order to rightHand then leftHand. (oddly when I built a righthand bin the size is smaller? not sure what is going on there and I still haven't tested either of the bin files to ensure they work edit: this seems to be correct actually, configurator bin files are not the same size for both right and left)
EDIT: Oh one last thing, if you have the wincmake alias set correctly, what you can do is in controller/Keyboards/cmake.bash change the cmake invocation to wincmake, and then run the script like so: bash -i ergodox.bash That will create ICED-L and ICED-R build dirs in controller/Keyboards and build both bin files with the default layout. Any keymap changes or extra layers at this point are up to you. bash -i is necessary because otherwise the alias won't expand and bash won't know wtf wincmake is.
Whew. I haven't even had a chance to try putting TMK on there instead.