qmk_firmware/assets/newbs_building_firmware.md.DnVUK9it.js

16 lines
12 KiB
JavaScript
Raw Normal View History

import { _ as _export_sfc, c as createElementBlock, o as openBlock, a8 as createStaticVNode } from "./chunks/framework.DyMmIvSC.js";
const __pageData = JSON.parse('{"title":"Building Your First Firmware","description":"","frontmatter":{},"headers":[],"relativePath":"newbs_building_firmware.md","filePath":"newbs_building_firmware.md"}');
const _sfc_main = { name: "newbs_building_firmware.md" };
const _hoisted_1 = /* @__PURE__ */ createStaticVNode('<h1 id="building-your-first-firmware" tabindex="-1">Building Your First Firmware <a class="header-anchor" href="#building-your-first-firmware" aria-label="Permalink to &quot;Building Your First Firmware&quot;"></a></h1><p>Now that you have set up your build environment you are ready to start building custom firmware. For this section of the guide we will bounce between 3 programs- your file manager, your text editor, and your terminal window. Keep all 3 open until you are done and happy with your keyboard firmware.</p><h2 id="configure-your-build-environment-defaults-optional" tabindex="-1">Configure Your Build Environment Defaults (Optional) <a class="header-anchor" href="#configure-your-build-environment-defaults-optional" aria-label="Permalink to &quot;Configure Your Build Environment Defaults (Optional)&quot;"></a></h2><p>You can configure your build environment to set the defaults and make working with QMK less tedious. Let&#39;s do that now!</p><p>Most people new to QMK only have 1 keyboard. You can set this keyboard as your default with the <code>qmk config</code> command. For example, to set your default keyboard to <code>clueboard/66/rev4</code>:</p><div class="language-sh vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">sh</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">qmk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> config</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> user.keyboard=clueboard/66/rev4</span></span></code></pre></div><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>The keyboard option is the path relative to the keyboard directory, the above example would be found in <code>qmk_firmware/keyboards/clueboard/66/rev4</code>. If you&#39;re unsure you can view a full list of supported keyboards with <code>qmk list-keyboards</code>.</p></div><p>You can also set your default keymap name. Most people use their GitHub username like the keymap name from the previous steps:</p><div class="language-sh vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">sh</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">qmk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> config</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> user.keymap=</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">github_usernam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">e</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&gt;</span></span></code></pre></div><h2 id="create-a-new-keymap" tabindex="-1">Create a New Keymap <a class="header-anchor" href="#create-a-new-keymap" aria-label="Permalink to &quot;Create a New Keymap&quot;"></a></h2><p>To create your own keymap you&#39;ll want to create a copy of the <code>default</code> keymap. If you configured your build environment in the last step you can do that easily with the QMK CLI:</p><div class="language-sh vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">sh</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">qmk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> new-keymap</span></span></code></pre></div><p>If you did not configure your environment, or you have multiple keyboards, you can specify a keyboard name:</p><div class="language-sh vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">sh</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">qmk</span><span style="--s
const _hoisted_36 = [
_hoisted_1
];
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return openBlock(), createElementBlock("div", null, _hoisted_36);
}
const newbs_building_firmware = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
export {
__pageData,
newbs_building_firmware as default
};