How to flash a Satan GH60 with QMK keyboard firmware (linux)

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:

sudo make

If your code checks out, you should see lots of green messages :)))

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:

cd ~/tkg-toolkit/linux

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.

./reflash.sh ~/qmk_firmware/YOUR_HEX_FILENAME.hex

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.

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s