- create virtualenv
python -m venv venv
- install qmk cli
pip install qmk
- clone qmk/qmk_firmware
git clone git@github.com:qmk/qmk_firmware.git
keep
master
branch up to date, see docs - install dependencies
the following packages are required:
- arm-none-eabi-newlib (required even though not listed when running qmk setup, compile will fail without it)
- arm-none-eabi-gcc
- avr-gcc
- avrdude
- dfu-programmer
- dfu-util
- activate venv
source venv/bin/activate
- run qmk setup specifying the qmk repo location
# inside venv qmk setup -H $KBD/qmk_firmware
this step will create config file
$HOME/.config/qmk/qmk.ini
containing the specified qmk repo location - config keyboard and keymap
Note: this step is optional. If not done, config will not be updated and we need to explicitly specify keyboard and keymap with:
qmk compile --keyboard input_club/whitefox --keymap lzhoucs
- set keyboard
find keyboard with
qmk list-keyboards | fzf
, then update configqmk config user.keyboard=input_club/whitefox
- set keymap
symbolic link my keymap
cd qmk_firmware/keyboards/input_club/whitefox/keymaps ln -s $KBD/qmk-keymaps lzhoucs
then update config:
qmk config user.keymap=lzhoucs
- set keyboard
If keyboard and keymap are configured above
qmk compile
If keyboard and keymap are configured above
qmk flash
Note we don’t have to worry about where did qmk generate the bin file, it’s generating to a location it can find during flashing
- .dfu-util: Cannot open DFU device 1c11:b007 found on devnum 49 (LIBUSB_ERROR_ACCESS)
See docs. Basically, do the following:
echo 'SUBSYSTEMS=="usb", ATTRS{idVendor}=="1c11", ATTRS{idProduct}=="b007", TAG+="uaccess"' > /etc/udev/rules.d/98-inputclub-qmk.rules