Now that you've built a custom firmware file you'll want to flash your keyboard.
The simplest way to flash your keyboard will be with the QMK Toolbox.
However, the QMK Toolbox is only available for Windows and macOS currently. If you're using Linux (or just wish to flash the firmware from the command line), proceed down to Flash Your Keyboard From The Command Line.
Begin by opening the QMK Toolbox application. You'll want to locate the firmware file in Finder or Explorer. Your keyboard firmware may be in one of two formats-
.bin. QMK tries to copy the appropriate one for your keyboard into the root
If you are on Windows or macOS there are commands you can use to easily open the current firmware folder in Explorer or Finder.
The firmware file always follows this naming format:
For example, the
planck/rev5 with a
default keymap will have this filename:
Once you have located your firmware file drag it into the "Local file" box in QMK Toolbox, or click "Open" and navigate to where your firmware file is stored.
In order to flash your custom firmware you have to put your keyboard into a special flashing mode. While it is in this mode you will not be able to type or otherwise use your keyboard. It is very important that you do not unplug your keyboard or otherwise interrupt the flashing process while the firmware is being written.
Different keyboards have different ways to enter this special mode. If your PCB currently runs QMK or TMK and you have not been given specific instructions try the following, in order:
Hold down both shift keys and press
Hold down both shift keys and press
Unplug your keyboard, hold down the Spacebar and
B at the same time, plug in your keyboard and wait a second before releasing the keys
Press the physical
RESET button on the bottom of the PCB
Locate header pins on the PCB labeled
RESET, short those together while plugging your PCB in
When you are successful you will see a message similar to this in QMK Toolbox:
*** Clueboard - Clueboard 66% HotSwap disconnected -- 0xC1ED:0x2390*** DFU device connected
Flash button in QMK Toolbox. You will see output similar to the following:
*** Clueboard - Clueboard 66% HotSwap disconnected -- 0xC1ED:0x2390*** DFU device connected*** Attempting to flash, please don't remove device>>> dfu-programmer atmega32u4 erase --forceErasing flash... SuccessChecking memory from 0x0 to 0x6FFF... Empty.>>> dfu-programmer atmega32u4 flash /Users/skully/qmk_firmware/clueboard_66_hotswap_gen1_skully.hexChecking memory from 0x0 to 0x55FF... Empty.0% 100% Programming 0x5600 bytes...[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success0% 100% Reading 0x7000 bytes...[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] SuccessValidating... Success0x5600 bytes written into 0x7000 bytes memory (76.79%).>>> dfu-programmer atmega32u4 reset*** DFU device disconnected*** Clueboard - Clueboard 66% HotSwap connected -- 0xC1ED:0x2390
This has been made pretty simple compared to what it used to be. When you are ready to compile and flash your firmware, open up your terminal window and run the flash command:
If you have not configured your keyboard/keymap name, or you have multiple keyboards, you can specify the keyboard and keymap:
qmk flash -kb <my_keyboard> -km <my_keymap>
This will check the keyboard's configuration, and then attempt to flash it based on the specified bootloader. This means that you don't need to know which bootloader that your keyboard uses. Just run the command, and let the command do the heavy lifting.
However, this does rely on the bootloader being set by the keyboard. If this information is not configured, or you're using a board that doesn't have a supported target to flash it, you will see this error:
WARNING: This board's bootloader is not specified or is not supported by the ":flash" target at this time.
In this case, you'll have to fall back on specifying the bootloader. See the Flashing Firmware Guide for more details.
Congrats! Your custom firmware has been programmed to your keyboard!
Give it a try and make sure everything works the way you want it to. We've written Testing and Debugging to round out this guide, so head over there to learn about validating your firmware and how to troubleshoot your custom functionality.