Ji-Be-Gone

How to convert leeku PCBs from JiGon to QMK


Part 1 - Tools and Software

We’re going to need some tools and software to accomplish the switch from JiGon to QMK, so please read the following points attentively to make sure you have everything ready and at hand before starting the actual conversion process.

We’re gonna need these four parts:

  1. An In-System Programmer (ISP)
  2. Cables
  3. A new bootloader
  4. Software to flash everything

In-System Programmer (ISP)

In-System Programming is a technique widly used in embedded systems to allow parts (most often microcontrollers) to be programmed while already integrated into a PCB. This technique is build into the MCU1 on a hardware level, so it is indipendent of any software running (or not running). We’re gonna use it to change the bootloader from a leeku specific one, that is not able to start or flash QMK, to a different one that can do just that.

Now, an ISP is not something most people have laying around their home but luckily there are some easy ways to remedy that. The easiest is to go onto your local eBay page and search for “isp programmer”. You should get multiple cheap hits that would all server this purpose. The disadvantage of this is, that most of these are shipped from Asia and you have to wait for a bit to arrive. If you can’t wait - which means you’re probably in the wrong hobby anyways ;) - there are other possibilites though. If you have a Teensy, ProMicro or any Raspberry Pi around, you can easily turn any of those into a temporary ISP. Dependent on which of those you have at hand, choose one of the following descriptions to use it as an ISP:

Teensy and ProMicro

For Teensy and ProMicro the QMK team already has a very good tutorial ready, which I’ll refer you to. Do note that if you choose this route, you’ll only need to follow it until and including The ISP Firmware (now pre-compiled). The rest of the way will be handled by this tutorial.

Raspberry Pi

For Raspberry Pi (any version!) you can use this detailed tutorial from Adafruit to use it as an ISP programmer. The setup and usage of this is a little bit different than the other routes but the end result is the same. Just be sure you know how to transfer the HEX file you want to flash to the Raspberry (or download it there directly).

Cables

Indipendent of what route you choose, you’re gonna need a few cables to connect your ISP to the keyboard PCB. Luckily these are very easy to get and cheap to boot. Just search for male-female jumper wire on your Amazon, eBay or local electronic parts site. You’ll need five cables but moste packages provide a lot more than that.

If you bought a programmer from eBay, you might already have gotten one with your purchase. If so, check if it ends in pins and not in sockets. If it is the later, you can either just put in some pin headers in there if you have them or get some of the other cables as described in the previous paragraph.

A new bootloader

Bootloaders are the first stage in the bootup process of an MCU. They are used to prepare the chip for running the actual software.2 leeku uses a custom modified version for his JiGon PCBs, which sadly is incompatible with QMK. So we need to bring in a new one. xauser has a description of how to compile a new one in his TMK port, so if you’re interested in these things I recommend you checking it out here.

For anyone who doesn’t want to go through all the trouble, I added a ready made HEX file of the bootloader I did from his description. It’s part of the Git repository we’re gonna check out in the next part of the tutorial.

Software to flash everything

This will be one of the easiest parts of the whole tools section because you can just use the awesome QMK Toolbox for all your flashing needs! This single tool has the capability to flash the bootloader via ISP and after that also flash your QMK image via the usual USB route. Please make sure to read the documentation on ISP flashing and normal flashing available for the tool. Make especially sure that you installed all the necessary drivers linked to in the installation guide.

And with that we have all our tools gathered. Now we only need one more thing before we can start our conversion to QMK. And that’s QMK itself. Or rather, a version of QMK that actually supports the leeku PCBs. How to get that, modify it to your needs and compile it is in the next part.


  1. Microcontroller Unit [return]
  2. The BIOS of your PC/laptop does basically the same thing [return]