qmk_firmware/static/Complete_Newbs_Guide/Flashing_Firmware.html
2018-05-07 21:02:24 -07:00

325 lines
25 KiB
HTML

<!DOCTYPE html>
<html class="no-js" lang="en">
<head>
<title>Flashing Firmware - QMK Firmware</title>
<meta name="description" content="Keyboard controller firmware for Atmel AVR and ARM USB families">
<meta name="author" content="QMK Community">
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="icon" href="../themes/daux/img/favicon-navy.png" type="image/x-icon">
<!-- Mobile -->
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Font -->
<!-- CSS -->
<link href='../themes/daux/css/theme-navy.min.css' rel='stylesheet' type='text/css'>
<!-- Tipue Search -->
<link href="../tipuesearch/tipuesearch.css" rel="stylesheet">
<!--[if lt IE 9]>
<script src="../themes/daux/js/html5shiv-3.7.3.min.js"></script>
<![endif]-->
</head>
<body class=" ">
<div class="Columns content">
<aside class="Columns__left Collapsible">
<button type="button" class="Button Collapsible__trigger">
<span class="Collapsible__trigger__bar"></span>
<span class="Collapsible__trigger__bar"></span>
<span class="Collapsible__trigger__bar"></span>
</button>
<a class="Brand" href="../index.html">QMK Firmware</a>
<div class="Search">
<svg class="Search__icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 451 451">
<path d="M447.05 428l-109.6-109.6c29.4-33.8 47.2-77.9 47.2-126.1C384.65 86.2 298.35 0 192.35 0 86.25 0 .05 86.3.05 192.3s86.3 192.3 192.3 192.3c48.2 0 92.3-17.8 126.1-47.2L428.05 447c2.6 2.6 6.1 4 9.5 4s6.9-1.3 9.5-4c5.2-5.2 5.2-13.8 0-19zM26.95 192.3c0-91.2 74.2-165.3 165.3-165.3 91.2 0 165.3 74.2 165.3 165.3s-74.1 165.4-165.3 165.4c-91.1 0-165.3-74.2-165.3-165.4z"/>
</svg>
<input type="search" id="tipue_search_input" class="Search__field" placeholder="Search..." autocomplete="on"
results=25 autosave=text_search>
</div>
<div class="Collapsible__content">
<!-- Navigation -->
<ul class='Nav'><li class='Nav__item has-children'><a href="../Getting_Started/index.html" class="folder"><i class="Nav__arrow">&nbsp;</i>Getting Started</a><ul class='Nav'><li class='Nav__item has-children'><a href="../Getting_Started/Install_Build_Tools/index.html" class="folder"><i class="Nav__arrow">&nbsp;</i>Install Build Tools</a><ul class='Nav'><li class='Nav__item '><a href="../Getting_Started/Install_Build_Tools/Vagrant.html">Vagrant</a></li></ul></li><li class='Nav__item '><a href="../Getting_Started/Build_Compile_Instructions.html">Build Compile Instructions</a></li><li class='Nav__item '><a href="../Getting_Started/Flashing_Firmware.html">Flashing Firmware</a></li><li class='Nav__item '><a href="../Getting_Started/Contributing.html">Contributing</a></li><li class='Nav__item '><a href="../Getting_Started/How_to_Use_GitHub.html">How to Use GitHub</a></li><li class='Nav__item '><a href="../Getting_Started/Getting_Help.html">Getting Help</a></li></ul></li><li class='Nav__item Nav__item--open has-children'><a href="../Complete_Newbs_Guide/index.html" class="folder"><i class="Nav__arrow">&nbsp;</i>Complete Newbs Guide</a><ul class='Nav'><li class='Nav__item '><a href="../Complete_Newbs_Guide/Complete_Newbie's_Guide.html">Complete Newbie's Guide</a></li><li class='Nav__item '><a href="../Complete_Newbs_Guide/Building_Your_First_Firmware.html">Building Your First Firmware</a></li><li class='Nav__item Nav__item--active'><a href="../Complete_Newbs_Guide/Flashing_Firmware.html">Flashing Firmware</a></li><li class='Nav__item '><a href="../Complete_Newbs_Guide/Testing_and_Debugging.html">Testing and Debugging</a></li></ul></li><li class='Nav__item has-children'><a href="../FAQ/index.html" class="folder"><i class="Nav__arrow">&nbsp;</i>FAQ</a><ul class='Nav'><li class='Nav__item '><a href="../FAQ/General_FAQ.html">General FAQ</a></li><li class='Nav__item '><a href="../FAQ/Build_Compile_QMK.html">Build Compile QMK</a></li><li class='Nav__item '><a href="../FAQ/Debugging_and_Troubleshooting.html">Debugging and Troubleshooting</a></li><li class='Nav__item '><a href="../FAQ/Keymaps.html">Keymaps</a></li></ul></li><li class='Nav__item has-children'><a href="../Hardware/index.html" class="folder"><i class="Nav__arrow">&nbsp;</i>Hardware</a><ul class='Nav'><li class='Nav__item '><a href="../Hardware/AVR_Processors.html">AVR Processors</a></li><li class='Nav__item '><a href="../Hardware/Drivers.html">Drivers</a></li></ul></li><li class='Nav__item has-children'><a href="../Features/index.html" class="folder"><i class="Nav__arrow">&nbsp;</i>Features</a><ul class='Nav'><li class='Nav__item '><a href="../Features/Advanced_Keycodes.html">Advanced Keycodes</a></li><li class='Nav__item '><a href="../Features/Audio.html">Audio</a></li><li class='Nav__item '><a href="../Features/Auto_Shift.html">Auto Shift</a></li><li class='Nav__item '><a href="../Features/Backlight.html">Backlight</a></li><li class='Nav__item '><a href="../Features/Bluetooth.html">Bluetooth</a></li><li class='Nav__item '><a href="../Features/Bootmagic.html">Bootmagic</a></li><li class='Nav__item '><a href="../Features/Command.html">Command</a></li><li class='Nav__item '><a href="../Features/Dynamic_Macros.html">Dynamic Macros</a></li><li class='Nav__item '><a href="../Features/Grave_Escape.html">Grave Escape</a></li><li class='Nav__item '><a href="../Features/Key_Lock.html">Key Lock</a></li><li class='Nav__item '><a href="../Features/Layouts.html">Layouts</a></li><li class='Nav__item '><a href="../Features/Leader_Key.html">Leader Key</a></li><li class='Nav__item '><a href="../Features/Macros.html">Macros</a></li><li class='Nav__item '><a href="../Features/Mouse_Keys.html">Mouse Keys</a></li><li class='Nav__item '><a href="../Features/Pointing_Device.html">Pointing Device</a></li><li class='Nav__item '><a href="../Features/PS_2_Mouse.html">PS 2 Mouse</a></li><li class='Nav__item '><a href="../Features/RGB_Lighting.html">RGB Lighting</a></li><li class='Nav__item '><a href="../Features/Space_Cadet_Shift.html">Space Cadet Shift</a></li><li class='Nav__item '><a href="../Features/Space_Cadet_Shift_Enter.html">Space Cadet Shift Enter</a></li><li class='Nav__item '><a href="../Features/Stenography.html">Stenography</a></li><li class='Nav__item '><a href="../Features/Swap_Hands.html">Swap Hands</a></li><li class='Nav__item '><a href="../Features/Tap_Dance.html">Tap Dance</a></li><li class='Nav__item '><a href="../Features/Terminal.html">Terminal</a></li><li class='Nav__item '><a href="../Features/Thermal_Printer.html">Thermal Printer</a></li><li class='Nav__item '><a href="../Features/Unicode.html">Unicode</a></li><li class='Nav__item '><a href="../Features/Userspace.html">Userspace</a></li></ul></li><li class='Nav__item has-children'><a href="../Keycodes/index.html" class="folder"><i class="Nav__arrow">&nbsp;</i>Keycodes</a><ul class='Nav'><li class='Nav__item '><a href="../Keycodes/Advanced_Keycodes.html">Advanced Keycodes</a></li><li class='Nav__item '><a href="../Keycodes/Backlight.html">Backlight</a></li><li class='Nav__item '><a href="../Keycodes/Basic.html">Basic</a></li><li class='Nav__item '><a href="../Keycodes/Bluetooth.html">Bluetooth</a></li><li class='Nav__item '><a href="../Keycodes/Bootmagic.html">Bootmagic</a></li><li class='Nav__item '><a href="../Keycodes/Quantum_Keycodes.html">Quantum Keycodes</a></li><li class='Nav__item '><a href="../Keycodes/RGB_Lighting.html">RGB Lighting</a></li><li class='Nav__item '><a href="../Keycodes/Stenography.html">Stenography</a></li><li class='Nav__item '><a href="../Keycodes/Thermal_Printer.html">Thermal Printer</a></li><li class='Nav__item '><a href="../Keycodes/US_ANSI_Shifted_keys.html">US ANSI Shifted keys</a></li></ul></li><li class='Nav__item has-children'><a href="../Reference/index.html" class="folder"><i class="Nav__arrow">&nbsp;</i>Reference</a><ul class='Nav'><li class='Nav__item '><a href="../Reference/Keyboard_Guidelines.html">Keyboard Guidelines</a></li><li class='Nav__item '><a href="../Reference/Compatable_Microcontrollers.html">Compatable Microcontrollers</a></li><li class='Nav__item '><a href="../Reference/Config_Options.html">Config Options</a></li><li class='Nav__item '><a href="../Reference/Custom_Code.html">Custom Code</a></li><li class='Nav__item '><a href="../Reference/Documentation_Best_Practices.html">Documentation Best Practices</a></li><li class='Nav__item '><a href="../Reference/Documentation_Templates.html">Documentation Templates</a></li><li class='Nav__item '><a href="../Reference/Glossary.html">Glossary</a></li><li class='Nav__item '><a href="../Reference/Keymap_Overview.html">Keymap Overview</a></li><li class='Nav__item '><a href="../Reference/Unit_Testing.html">Unit Testing</a></li></ul></li><li class='Nav__item has-children'><a href="../For_Makers_And_Modders/index.html" class="folder"><i class="Nav__arrow">&nbsp;</i>For Makers And Modders</a><ul class='Nav'><li class='Nav__item '><a href="../For_Makers_And_Modders/Hand_Wiring_Guide.html">Hand Wiring Guide</a></li><li class='Nav__item '><a href="../For_Makers_And_Modders/ISP_Flashing_Guide.html">ISP Flashing Guide</a></li></ul></li><li class='Nav__item has-children'><a href="../IDEs/index.html" class="folder"><i class="Nav__arrow">&nbsp;</i>IDEs</a><ul class='Nav'><li class='Nav__item '><a href="../IDEs/Eclipse.html">Eclipse</a></li></ul></li><li class='Nav__item has-children'><a href="../For_a_Deeper_Understanding/index.html" class="folder"><i class="Nav__arrow">&nbsp;</i>For a Deeper Understanding</a><ul class='Nav'><li class='Nav__item '><a href="../For_a_Deeper_Understanding/How_Keyboards_Work.html">How Keyboards Work</a></li><li class='Nav__item '><a href="../For_a_Deeper_Understanding/Understanding_QMK.html">Understanding QMK</a></li></ul></li></ul>
<div class="Links">
</div>
</div>
</aside>
<div class="Columns__right Columns__right--full">
<div class="Columns__right__content">
<div class="doc_content">
<article class="Page">
<div class="Page__header">
<h1><a href="../Complete_Newbs_Guide/index.html">Complete Newbs Guide</a> <svg class="Page__header--separator" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 477.175 477.175"><path d="M360.73 229.075l-225.1-225.1c-5.3-5.3-13.8-5.3-19.1 0s-5.3 13.8 0 19.1l215.5 215.5-215.5 215.5c-5.3 5.3-5.3 13.8 0 19.1 2.6 2.6 6.1 4 9.5 4 3.4 0 6.9-1.3 9.5-4l225.1-225.1c5.3-5.2 5.3-13.8.1-19z"/></svg> <a href="../Complete_Newbs_Guide/Flashing_Firmware.html">Flashing Firmware</a></h1>
<span class="EditOn">
<a href="https://github.com/qmk/qmk_firmware/blob/master/docs/02_Complete_Newbs_Guide/03_Flashing_Firmware.md" target="_blank">
Edit on GitHub </a>
</span>
</div>
<div class="s-content">
<ul class="TableOfContents">
<li>
<p><a href="#page_Flashing-Your-Keyboard">Flashing Your Keyboard</a></p>
<ul class="TableOfContents">
<li>
<p><a href="#page_Flashing-Your-Keyboard-with-QMK-Toolbox">Flashing Your Keyboard with QMK Toolbox</a></p>
<ul class="TableOfContents">
<li>
<p><a href="#page_Load-The-File-Into-QMK-Toolbox">Load The File Into QMK Toolbox</a></p>
</li>
<li>
<p><a href="#page_Put-Your-Keyboard-Into-DFU-Bootloader-Mode">Put Your Keyboard Into DFU (Bootloader) Mode</a></p>
</li>
<li>
<p><a href="#page_Flash-Your-Keyboard">Flash Your Keyboard</a></p>
</li>
</ul>
</li>
<li>
<p><a href="#page_Flash-your-Keyboard-from-the-Command-Line">Flash your Keyboard from the Command Line</a></p>
<ul class="TableOfContents">
<li>
<p><a href="#page_DFU">DFU</a></p>
</li>
<li>
<p><a href="#page_Caterina">Caterina</a></p>
</li>
</ul>
</li>
<li>
<p><a href="#page_HalfKay">HalfKay</a></p>
</li>
<li>
<p><a href="#page_Test-It-Out">Test It Out!</a></p>
</li>
</ul>
</li>
</ul>
<h1 id="page_Flashing-Your-Keyboard">Flashing Your Keyboard</h1>
<p>Now that you've built a custom firmware file you'll want to flash your keyboard.</p>
<h2 id="page_Flashing-Your-Keyboard-with-QMK-Toolbox">Flashing Your Keyboard with QMK Toolbox</h2>
<p>The simplest way to flash your keyboard will be with the <a href="https://github.com/qmk/qmk_toolbox/releases" class="Link--external">QMK Toolbox</a>.</p>
<p>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), you'll have to use the <a href="#flash-your-keyboard-from-the-command-line">method outlined below</a>.</p>
<h3 id="page_Load-The-File-Into-QMK-Toolbox">Load The File Into QMK Toolbox</h3>
<p>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- <code>.hex</code> or <code>.bin</code>. QMK tries to copy the appropriate one for your keyboard into the root <code>qmk_firmware</code> directory.</p>
<p>{% hint style='info' %}
If you are on Windows or macOS there are commands you can use to easily open the current firmware folder in Explorer or Finder.</p>
<p>Windows:</p>
<pre><code>start .
</code></pre>
<p>macOS:</p>
<pre><code>open .
</code></pre>
<p>{% endhint %}</p>
<p>The firmware file always follows this naming format:</p>
<pre><code>&lt;keyboard_name&gt;_&lt;keymap_name&gt;.{bin,hex}
</code></pre>
<p>For example, the <code>plank/rev5</code> with a <code>default</code> keymap will have this filename:</p>
<pre><code>planck_rev5_default.hex
</code></pre>
<p>Once you have located your firmware file drag it into the &quot;Local file&quot; box in QMK Toolbox, or click &quot;Open&quot; and navigate to where your firmware file is stored.</p>
<h3 id="page_Put-Your-Keyboard-Into-DFU-Bootloader-Mode">Put Your Keyboard Into DFU (Bootloader) Mode</h3>
<p>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.</p>
<p>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:</p>
<ul>
<li>Hold down both shift keys and press <code>Pause</code>
</li>
<li>Hold down both shift keys and press <code>B</code>
</li>
<li>Unplug your keyboard, hold down the Spacebar and <code>B</code> at the same time, plug in your keyboard and wait a second before releasing the keys</li>
<li>Press the physical <code>RESET</code> button on the bottom of the PCB</li>
<li>Locate header pins on the PCB labeled <code>BOOT0</code> or <code>RESET</code>, short those together while plugging your PCB in</li>
</ul>
<p>When you are successful you will see a message similar to this in QMK Toolbox:</p>
<pre><code>*** Clueboard - Clueboard 66% HotSwap disconnected -- 0xC1ED:0x2390
*** DFU device connected
</code></pre>
<h3 id="page_Flash-Your-Keyboard">Flash Your Keyboard</h3>
<p>Click the <code>Flash</code> button in QMK Toolbox. You will see output similar to the following:</p>
<pre><code>*** Clueboard - Clueboard 66% HotSwap disconnected -- 0xC1ED:0x2390
*** DFU device connected
*** Attempting to flash, please don't remove device
&gt;&gt;&gt; dfu-programmer atmega32u4 erase --force
Erasing flash... Success
Checking memory from 0x0 to 0x6FFF... Empty.
&gt;&gt;&gt; dfu-programmer atmega32u4 flash /Users/skully/qmk_firmware/clueboard_66_hotswap_gen1_skully.hex
Checking memory from 0x0 to 0x55FF... Empty.
0% 100% Programming 0x5600 bytes...
[&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;] Success
0% 100% Reading 0x7000 bytes...
[&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;] Success
Validating... Success
0x5600 bytes written into 0x7000 bytes memory (76.79%).
&gt;&gt;&gt; dfu-programmer atmega32u4 reset
*** DFU device disconnected
*** Clueboard - Clueboard 66% HotSwap connected -- 0xC1ED:0x2390
</code></pre>
<h2 id="page_Flash-your-Keyboard-from-the-Command-Line">Flash your Keyboard from the Command Line</h2>
<p>First thing you'll need to know is which bootloader that your keyboard uses. There are four main bootloaders that are used, usually. Pro-Micro and clones use CATERINA, and Teensy's use Halfkay, OLKB boards use QMK-DFU, and other atmega32u4 chips use DFU.</p>
<p>You can find more information about the bootloaders in the <a href="../Getting_Started/Flashing_Firmware.html">Flashing Instructions and Bootloader Information</a> page.</p>
<p>If you know what bootloader that you're using, then when compiling the firmware, you can actually add some extra text to the <code>make</code> command to automate the flashing process.</p>
<h3 id="page_DFU">DFU</h3>
<p>For the DFU bootloader, when you're ready to compile and flash your firmware, open up your terminal window and run the built command:</p>
<pre><code>make &lt;my_keyboard&gt;:&lt;my_keymap&gt;:dfu
</code></pre>
<p>For example, if your keymap is named &quot;xyverz&quot; and you're building a keymap for a rev5 planck, you'll use this command:</p>
<pre><code>make planck/rev5:xyverz:dfu
</code></pre>
<p>Once it finishes compiling, it should output the following:</p>
<pre><code>Linking: .build/planck_rev5_xyverz.elf [OK]
Creating load file for flashing: .build/planck_rev5_xyverz.hex [OK]
Copying planck_rev5_xyverz.hex to qmk_firmware folder [OK]
Checking file size of planck_rev5_xyverz.hex
* File size is fine - 18574/28672
</code></pre>
<p>After it gets to this point, the build script will look for the DFU bootloader every 5 seconds. It will repeat the following until the device is found or you cancel it.</p>
<pre><code>dfu-programmer: no device present.
Error: Bootloader not found. Trying again in 5s.
</code></pre>
<p>Once it does this, you'll want to reset the controller. It should then show output similiar to this:</p>
<pre><code>*** Attempting to flash, please don't remove device
&gt;&gt;&gt; dfu-programmer atmega32u4 erase --force
Erasing flash... Success
Checking memory from 0x0 to 0x6FFF... Empty.
&gt;&gt;&gt; dfu-programmer atmega32u4 flash /Users/skully/qmk_firmware/clueboard_66_hotswap_gen1_skully.hex
Checking memory from 0x0 to 0x55FF... Empty.
0% 100% Programming 0x5600 bytes...
[&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;] Success
0% 100% Reading 0x7000 bytes...
[&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;] Success
Validating... Success
0x5600 bytes written into 0x7000 bytes memory (76.79%).
&gt;&gt;&gt; dfu-programmer atmega32u4 reset
</code></pre>
<p>If you have any issues with this, you may need to this:</p>
<pre><code>sudo make &lt;my_keyboard&gt;:&lt;my_keymap&gt;:dfu
</code></pre>
<h3 id="page_Caterina">Caterina</h3>
<p>For Arduino boards and their close (such as the SparkFun ProMicro), when you're ready to compile and flash your firmware, open up your terminal window and run the built command:</p>
<pre><code>make &lt;my_keyboard&gt;:&lt;my_keymap&gt;:avrdude
</code></pre>
<p>For example, if your keymap is named &quot;xyverz&quot; and you're building a keymap for a rev2 Lets Split, you'll use this command:</p>
<pre><code>make lets_split/rev2:xyverz:avrdude
</code></pre>
<p>Once the firmware finishes compiling, it will output something like this:</p>
<pre><code>Linking: .build/lets_split_rev2_xyverz.elf [OK]
Creating load file for flashing: .build/lets_split_rev2_xyverz.hex [OK]
Checking file size of lets_split_rev2_xyverz.hex [OK]
* File size is fine - 27938/28672
Detecting USB port, reset your controller now..............
</code></pre>
<p>At this point, reset the board and then the script will detect the bootloader and then flash the board. The output should look something like this:</p>
<pre><code>Detected controller on USB port at /dev/ttyS15
Connecting to programmer: .
Found programmer: Id = &quot;CATERIN&quot;; type = S
Software Version = 1.0; No Hardware Version given.
Programmer supports auto addr increment.
Programmer supports buffered memory access with buffersize=128 bytes.
Programmer supports the following devices:
Device code: 0x44
avrdude.exe: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude.exe: Device signature = 0x1e9587 (probably m32u4)
avrdude.exe: NOTE: &quot;flash&quot; memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude.exe: erasing chip
avrdude.exe: reading input file &quot;./.build/lets_split_rev2_xyverz.hex&quot;
avrdude.exe: input file ./.build/lets_split_rev2_xyverz.hex auto detected as Intel Hex
avrdude.exe: writing flash (27938 bytes):
Writing | ################################################## | 100% 2.40s
avrdude.exe: 27938 bytes of flash written
avrdude.exe: verifying flash memory against ./.build/lets_split_rev2_xyverz.hex:
avrdude.exe: load data flash data from input file ./.build/lets_split_rev2_xyverz.hex:
avrdude.exe: input file ./.build/lets_split_rev2_xyverz.hex auto detected as Intel Hex
avrdude.exe: input file ./.build/lets_split_rev2_xyverz.hex contains 27938 bytes
avrdude.exe: reading on-chip flash data:
Reading | ################################################## | 100% 0.43s
avrdude.exe: verifying ...
avrdude.exe: 27938 bytes of flash verified
avrdude.exe: safemode: Fuses OK (E:CB, H:D8, L:FF)
avrdude.exe done. Thank you.
</code></pre>
<p>If you have any issues with this, you may need to this:</p>
<pre><code>sudo make &lt;my_keyboard&gt;:&lt;my_keymap&gt;:avrdude
</code></pre>
<h2 id="page_HalfKay">HalfKay</h2>
<p>For the PJRC devices (Teensy's), when you're ready to compile and flash your firmware, open up your terminal window and run the built command:</p>
<pre><code>make &lt;my_keyboard&gt;:&lt;my_keymap&gt;:teensy
</code></pre>
<p>For example, if your keymap is named &quot;xyverz&quot; and you're building a keymap for an Ergodox or Ergodox EZ, you'll use this command:</p>
<pre><code>make erdogox_ez:xyverz:teensy
</code></pre>
<p>Once the firmware finishes compiling, it will output something like this:</p>
<pre><code>Linking: .build/ergodox_ez_xyverz.elf [OK]
Creating load file for flashing: .build/ergodox_ez_xyverz.hex [OK]
Checking file size of ergodox_ez_xyverz.hex [OK]
* File size is fine - 25584/32256
Teensy Loader, Command Line, Version 2.1
Read &quot;./.build/ergodox_ez_xyverz.hex&quot;: 25584 bytes, 79.3% usage
Waiting for Teensy device...
(hint: press the reset button)
</code></pre>
<p>At this point, reset your board. Once you've done that, you'll see output like this:</p>
<pre><code>Found HalfKay Bootloader
Read &quot;./.build/ergodox_ez_drashna.hex&quot;: 28532 bytes, 88.5% usage
Programming............................................................................................................................................................................
...................................................
Booting
</code></pre>
<h2 id="page_Test-It-Out">Test It Out!</h2>
<p>Congrats! Your custom firmware has been programmed to your keyboard!</p>
<p>Give it a try and make sure everything works the way you want it to. We've written <a href="Testing_and_Debugging.html">Testing and Debugging</a> to round out this Newbie Guide, so head over there to learn about how to troubleshoot your custom functionality.</p>
</div>
<nav>
<ul class="Pager">
<li class=Pager--prev><a href="../Complete_Newbs_Guide/Building_Your_First_Firmware.html">Previous</a></li> <li class=Pager--next><a href="../Complete_Newbs_Guide/Testing_and_Debugging.html">Next</a></li> </ul>
</nav>
</article>
</div>
</div>
</div>
</div>
<!-- JS -->
<script src="../themes/daux/js/jquery-1.11.3.min.js"></script><script src="../themes/daux/js/highlight.pack.js"></script><script src="../themes/daux/js/daux.js"></script>
<!-- Tipue Search -->
<script type="text/javascript" src="../tipuesearch/tipuesearch.js"></script>
<script>
window.onunload = function(){}; // force $(document).ready to be called on back/forward navigation in firefox
$(function() {
tipuesearch({
'base_url': '../'
});
});
</script>
</body>
</html>