diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..111daef --- /dev/null +++ b/Makefile @@ -0,0 +1,16 @@ +all: clean build flash + +clean: + rm qmk_firmware/ktec_ergodone_dejvino.hex + +build: qmk_firmware/ktec_ergodone_dejvino.hex + +flash: build | hid_bootloader_cli + sudo ./hid_bootloader_cli -mmcu=atmega32u4 qmk_firmware/ktec_ergodone_dejvino.hex + +qmk_firmware/ktec_ergodone_dejvino.hex: + cd qmk_firmware && make ktec/ergodone:dejvino + +hid_bootloader_cli: + wget https://raw.githubusercontent.com/kairyu/tkg-toolkit/master/linux/bin/hid_bootloader_cli -O hid_bootloader_cli + chmod +x hid_bootloader_cli diff --git a/README.md b/README.md index c4e277c..33452e5 100644 --- a/README.md +++ b/README.md @@ -1,30 +1,26 @@ # Dejvino's ErgoDone Keyboard Firmware -## Compile +## Setup 1. Clone this repo in recursive mode (with submodules): `git clone --recurse-submodules ` 2. Setup QMK (see [docs](https://docs.qmk.fm/#/newbs_getting_started)) 1. Install qmk helper: `python3 -m pip install --user qmk` 2. Run the setup: `qmk setup` -3. Compile (inside `qmk_firmware`) - 1. default ErgoDone keyboard (optional): `make ktec/ergodone:default` - 2. link Dejvino's keyboard layout: `ln -s $(pwd)../keymap keyboards/ktec/ergodone/keymaps/dejvino` - 3. Dejvino's ErgoDone keyboard layout: `make ktec/ergodone:dejvino` +3. Install Dejvino's keyboard layout: `ln -s $(pwd)../keymap keyboards/ktec/ergodone/keymaps/dejvino` -## Flash -(see [ErgoDone Readme](./qmk_firmware/keyboards/ktec/ergodone/readme.md)) +## Compile +Run `make build`. -Get the [TKG Toolkit](https://github.com/kairyu/tkg-toolkit) flashing utility: `wget https://raw.githubusercontent.com/kairyu/tkg-toolkit/master/linux/bin/hid_bootloader_cli -O hid_bootloader_cli && chmod +x hid_bootloader_cli` +## Flash +If you're not on Linux, download the [TKG Toolkit](https://github.com/kairyu/tkg-toolkit) flashing utility for your system manually, otherwise let `make` do it. -### Enter flashing mode -1. Disconnect KBD -2. Press and hold two top-right-most keys on the left-half KBD -3. Connect KBD (LEDs will be blinking) +1. Enter flashing mode + 1. Disconnect KBD + 2. Press and hold two top-right-most keys on the left-half KBD + 3. Connect KBD (LEDs will be blinking) +2. Run `make flash`. -### Flashing -1. `sudo ./hid_bootloader_cli -mmcu=atmega32u4 qmk_firmware/ktec_ergodone_dejvino.hex` -2. Disconnect & connect KBD +(see [ErgoDone Readme](https://github.com/qmk/qmk_firmware/blob/master/keyboards/ktec/ergodone/readme.md) for details) ## Resources - [QMK Firmware](https://github.com/qmk/qmk_firmware) - [TKG Toolkit](https://github.com/kairyu/tkg-toolkit) -- [ErgoDone Readme](./qmk_firmware/keyboards/ktec/ergodone/readme.md)