Skip to content

Instantly share code, notes, and snippets.

@mantono
Last active September 19, 2024 22:45
Show Gist options
  • Save mantono/4a8dfe05ac5dc876eeda5d1a4296f548 to your computer and use it in GitHub Desktop.
Save mantono/4a8dfe05ac5dc876eeda5d1a4296f548 to your computer and use it in GitHub Desktop.
QMK on Ferris Sweep (using nix)

Note: These instructions are for the Liatris micro controller. Skip/alter the -e CONVERT_TO=liatris if you are using a ProMicro or Elite-C micro controller.

  1. Installl qmk, or run it in a nix shell: nix-shell -p qmk
  2. Go to the qmk_firmware directory, and compile the firmware: qmk compile -kb ferris/sweep -km default -e CONVERT_TO=liatris. This will generate the firmware in form of a .u2f file inside the qmk_firmware directory.
  3. Hold the "Boot button" on the micro contoller, while attaching the keyboard/controller. If done correctly, it will show up as a USB storage device.
  4. Mount the storage device.
  5. Copy the U2F file to the storage device.
  6. Unmount the storage device.
  7. Done

I tried to do this in Gentoo, but were unable to get qmk to work properly. After a few days I "gave up" and installed nix package manager (on Gentoo), and it worked perfectely at the first attempt!

#include QMK_KEYBOARD_H
#if __has_include("keymap.h")
# include "keymap.h"
#endif
/* THIS FILE WAS GENERATED!
*
* This file was generated by qmk json2c. You may or may not want to
* edit it directly.
*/
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_split_3x5_2(KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_A, KC_S, KC_D, KC_F, LT(2,KC_G), LT(2,KC_H), KC_J, KC_K, KC_L, KC_ESC, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, LALT_T(KC_TAB), LCTL_T(KC_SPC), LT(1,KC_ENT), LSFT_T(KC_BSPC)),
[1] = LAYOUT_split_3x5_2(KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LEFT, KC_RGHT, KC_HOME, KC_END, KC_DOWN, KC_UP, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PGDN, KC_PGUP, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO),
[2] = LAYOUT_split_3x5_2(KC_EXLM, KC_AT, KC_HASH, KC_UNDS, KC_PMNS, KC_PPLS, KC_PSLS, KC_PAST, KC_PEQL, KC_QUES, KC_LT, KC_NO, KC_LCBR, KC_LPRN, KC_AT, KC_BSLS, KC_RPRN, KC_RCBR, KC_NO, KC_GT, KC_PLUS, KC_NO, KC_PERC, KC_CIRC, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO),
[3] = LAYOUT_split_3x5_2(KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_P1, KC_P2, KC_P3, KC_P4, KC_P5, KC_P6, KC_P7, KC_P8, KC_P9, KC_P0, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO)
};
#if defined(ENCODER_ENABLE) && defined(ENCODER_MAP_ENABLE)
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
};
#endif // defined(ENCODER_ENABLE) && defined(ENCODER_MAP_ENABLE)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment