This is a very brief guide to putting QMK on your GH60 Satan, in a linux environment. There are many ways to do this, but this way works for me. It’s a very similar process for Mac.
There are two parts to this:
- Compiling your custom QMK hex file for your board
- Using tkg-tookit to flash the hex file
Getting tkg-toolkit up and running
First grab the source from GitHub:
git clone https://github.com/kairyu/tkg-toolkit
Now go to the linux folder and make the setup.sh and reflash.sh files executable:
cd tkg-toolkit/linux && ./setup.sh
The setup script will now prompt you to configure various parameters.
For a Satan GH60, you want:
- 2. GH60 RevCHN
- Y (continue)
- 1. Default
- 1. atmel_dfu
Now tkg-toolkit is setup.
Compiling the QMK firmware
First, go ahead and download QMK:
git clone https://github.com/qmk/qmk_firmware.git
I’m not going to cover editing your keymap.c or other QMK files as that’s beyond the scope of this tutorial, but for now we’ll assume that you’ve edited and saved all the relevant files within your keyboard’s keymap directory.
Now we get to build that sweet, sweet hex file!
Make sure you’re in the same directory as your keymap.c file for this next command:
If your code checks out, you should see lots of green messages :)))
UPDATE: The qmk build process has now changed. For newer version of QMK, instead of being in the same folder as your keymap, you should use the syntax outlined here.
Flashing your board
Now we have to run tkg-toolkit to flash the board with our freshly built hex file. First, go to the directory where the ./reflash.sh script resides:
Time to flash! We need to provide tkg with the path to the hex file that you just built. For some reason, qmk places the hex file in it’s root directory by default, instead of the specific keyboard directory.
tkg-toolkit will give you a brief Y/n prompt, then you can press the button on the bottom of your Satan and let the magic happen. Now enjoy your newly flashed keyboard!
(Optional) Making everything easier
To automate the flashing process, I made a small bash script which I placed in /bin (so it can be called from any directory). To do the same, place the following in /bin/flash, and simply type flash to do just that. Obviously you’ll need to replace “ben” with the name of your keymap.
#! /bin/bash cd ~/qmk_firmware/keyboards/satan/keymaps/ben sudo make cd ~/tkg-toolkit/linux echo "Y" | ./reflash.sh ~/qmk_firmware/satan_ben.hex
Hope this tutorial was helpful in some way. Feel free to drop any questions my way.
Edit – note to self
To flash on Windows using Ubuntu on windows – you’ll want to edit the files at C:\Users\benja\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState\rootfs\home\ben\qmk_firmware\keyboards\satan\keymaps\ben_iso
One thought on “How to flash a Satan GH60 with QMK keyboard firmware (linux)”
If you’re stuck on “waiting bootloader” after reflash.sh, just add a sudo on this last command