If you're using homebrew, you can use the following commands:
brew tap osx-cross/avr
brew install avr-libc
brew install dfu-programmer
This is the recommended method. If you don't have homebrew, install it! It's very much worth it for anyone who works in the command line.
You can also try these instructions:
Xcode->Preferences->Downloads
.Install AVR GCC, AVR libc, and dfu-progammer with your favorite package manager.
Debian/Ubuntu example:
sudo apt-get update
sudo apt-get install gcc-avr avr-libc dfu-programmer
If you have any problems building the firmware, you can try using a tool called Vagrant. It will set up a virtual computer with a known configuration that's ready-to-go for firmware building. OLKB does NOT host the files for this virtual computer. Details on how to set up Vagrant are in the VAGRANT_GUIDE file.
cd
command. The command prompt will typically open to your home directory. If, for example, you cloned the repository to your Documents folder, then you would type cd Documents/qmk_firmware
. If you extracted the file from a zip, then it may be named qmk_firmware-master
instead.dir
command on Windows, or the ls
command on Linux or Mac. You should see several files, including README.md
and a quantum
folder. From here, you need to navigate to the appropriate folder under keyboard/
. For example, if you're building for a Planck, run cd keyboard/planck
.make
command. This should output a lot of information about the build process.Note: Some keyboard folders have non-standard organizations, and may not even support specifying alternate keymaps. Until these get reorganized, you will need to edit their default keymaps directly.
make
command from your keyboard's folder will generate a .hex file based on the default keymap. All keymaps for a particular keyboard live in the keymaps
folder in that keyboard's folder. To create your own keymap, copy keymaps/default/keymap.c
to the keymaps
folder, and rename it with your name, for example jack.c. Or, if you don't care about the ability to share your keymap with the community via GitHub, you can just modify the default keymap itself. Details on how to program keymap files can be found in other guides.KEYMAP=<name>
after make
. So if I've named my keymap jack.c, the full command would be make KEYMAP=jack
.RESET
keycode. Then, if you're using a PCB, just run make KEYMAP=<name> dfu
to both build and deploy the firmware. If you're using a Teensy, you'll probably need to take the .hex file that make produces in the keyboard's folder, and deploy it using the Teensy Loader.sleep 5; make KEYMAP=<name> dfu
to delay building/deploying the firmware until for 5 seconds, giving you a chance to put the firmware into bootloader mode. You can change the 5 to any number of seconds.Try running make clean
if the make command fails.
WIP