const__pageData=JSON.parse('{"title":"Flashing Instructions and Bootloader Information","description":"","frontmatter":{},"headers":[],"relativePath":"flashing.md","filePath":"flashing.md"}');
const_sfc_main={name:"flashing.md"};
const_hoisted_1=/* @__PURE__ */createStaticVNode('<h1id="flashing-instructions-and-bootloader-information"tabindex="-1">FlashingInstructionsandBootloaderInformation<aclass="header-anchor"href="#flashing-instructions-and-bootloader-information"aria-label="Permalink to "Flashing Instructions and Bootloader Information""></a></h1><p>Therearequiteafewdifferenttypesofbootloadersthatkeyboardsuse,andalmostallofthemusetheirownflashingmethodandtools.Luckily,projectslikethe<ahref="https://github.com/qmk/qmk_toolbox/releases"target="_blank"rel="noreferrer">QMKToolbox</a>aimtosupportasmanyofthemaspossible,butthisarticlewilldescribethedifferenttypesofbootloaders,andavailablemethodsforflashingthem.</p><p>ForAVR-basedkeyboards,QMKwillautomaticallycalculateifyour<code>.hex</code>fileistherightsizetobeflashedtothedevicebasedonthe<code>BOOTLOADER</code>valuesetin<code>rules.mk</code>,andoutputthetotalsizeinbytes(alongwiththemax).</p><p>YouwillalsobeabletousetheCLItoflashyourkeyboard,byrunning:</p><divclass="language-vp-adaptive-theme"><buttontitle="CopyCode"class="copy"></button><spanclass="lang"></span><preclass="shikishiki-themesgithub-lightgithub-darkvp-code"><code><spanclass="line"><span>$qmkflash-kb<keyboard>-km<keymap></span></span></code></pre></div><p>Seethe<ahref="./cli_commands#qmk-flash"><code>qmkflash</code></a>documentationformoreinformation.</p><h2id="atmel-dfu"tabindex="-1">AtmelDFU<aclass="header-anchor"href="#atmel-dfu"aria-label="Permalinkto"AtmelDFU""></a></h2><p>Atmel'sDFUbootloadercomesonallUSBAVRsbydefault(exceptfor16/32U4RC),andisusedbymanykeyboardsthathavetheirownICsontheirPCBs(olderOLKBboards,Clueboards).SomekeyboardsmayalsouseLUFA'sDFUbootloader,orQMK'sforkofit(newerOLKBboards),thataddsinadditionalfeaturesspecifictothathardware.</p><p>ToensurecompatibilitywiththeDFUbootloader,makesurethisblockispresentinyour<code>rules.mk</code>(optionallywith<code>lufa-dfu</code>or<code>qmk-dfu</code>instead):</p><divclass="language-makevp-adaptive-theme"><buttontitle="CopyCode"class="copy"></button><spanclass="lang">make</span><preclass="shikishiki-themesgithub-lightgithub-darkvp-code"><code><spanclass="line"><spanstyle="--shiki-light:#6A737D;--shiki-dark:#6A737D;">#Bootloaderselection</span></span>\n<spanclass="line"><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">BOOTLOADER=atmel-dfu</span></span></code></pre></div><p>Compatibleflashers:</p><ul><li><ahref="https://github.com/qmk/qmk_toolbox/releases"target="_blank"rel="noreferrer">QMKToolbox</a>(recommendedGUI)</li><li><ahref="https://github.com/dfu-programmer/dfu-programmer"target="_blank"rel="noreferrer">dfu-programmer</a>/<code>:dfu</code>targetinQMK(recommendedcommandline)<divclass="language-vp-adaptive-theme"><buttontitle="CopyCode"class="copy"></button><spanclass="lang"></span><preclass="shikishiki-themesgithub-lightgithub-darkvp-code"><code><spanclass="line"><span>dfu-programmer<mcu>erase--force</span></span>\n<spanclass="line"><span>dfu-programmer<mcu>flash--force<filename></span></span>\n<spanclass="line"><span>dfu-programmer<mcu>reset</span></span></code></pre></div></li></ul><p>Flashingsequence:</p><ol><li>Enterthebootloaderusinganyofthefollowingmethods:<ul><li>Pressthe<code>QK_BOOT</code>keycode</li><li>Pressthe<code>RESET</code>buttononthePCBifavailable</li><li>ShortRSTtoGNDquickly</li></ul></li><li>WaitfortheOStodetectthedevice</li><li>Erasetheflashmemory(willbedoneautomaticallyifusingtheToolboxorCLI/<code>make</code>command)</li><li>Flasha.hexfile</li><li>Resetthedeviceintoapplicationmode(willbedoneautomaticallyasabove)</li></ol><h3id="qmk-dfu"tabindex="-1">QMKDFU<aclass="header-anchor"href="#qmk-dfu"aria-label="Permalink