aboutsummaryrefslogtreecommitdiffstats
path: root/docs/newbs_building_firmware.md
diff options
context:
space:
mode:
authorskullY <skullydazed@gmail.com>2020-02-20 15:50:50 -0800
committerskullydazed <skullydazed@users.noreply.github.com>2020-03-05 16:00:10 -0800
commita701c15d872ad171592335e61e91d7234dbec54a (patch)
treeef06fabdf0c0cd5d7457b63c48264700ac7fc67c /docs/newbs_building_firmware.md
parent1b7fa46f8e0616450bed8bff71bc1cffbca2eac8 (diff)
downloadfirmware-a701c15d872ad171592335e61e91d7234dbec54a.tar.gz
firmware-a701c15d872ad171592335e61e91d7234dbec54a.tar.bz2
firmware-a701c15d872ad171592335e61e91d7234dbec54a.zip
Rework the newbs guide around the qmk cli
Diffstat (limited to 'docs/newbs_building_firmware.md')
-rw-r--r--docs/newbs_building_firmware.md46
1 files changed, 14 insertions, 32 deletions
diff --git a/docs/newbs_building_firmware.md b/docs/newbs_building_firmware.md
index d7d31c07f..f1391c587 100644
--- a/docs/newbs_building_firmware.md
+++ b/docs/newbs_building_firmware.md
@@ -2,47 +2,29 @@
Now that you have setup 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.
-If you have closed and reopened your terminal window since following the first part of the guide, don't forget to `cd qmk_firmware` so that your terminal is in the correct directory.
+## Create a New Keymap
-## Navigate To Your Keymaps Folder
+To create your own keymap you'll want to create a copy of the `default` keymap. If you configured your build environment in the last step you can do that easily with the QMK CLI:
-Start by navigating to the `keymaps` folder for your keyboard.
+ qmk new-keymap
-If you are on macOS or Windows there are commands you can use to easily open the keymaps folder.
+If you did not configure your environment, or you have multiple keyboards, you can specify a keyboard name:
-### macOS:
+ qmk new-keymap -kb <keyboard_name>
-``` open keyboards/<keyboard_folder>/keymaps ```
+Look at the output from that command, you should see something like this:
-### Windows:
+ Ψ <github_username> keymap directory created in: /home/me/qmk_firmware/keyboards/clueboard/66/rev3/keymaps/<github_username>
-``` start .\\keyboards\\<keyboard_folder>\\keymaps ```
-
-## Create a Copy Of The `default` Keymap
-
-Once you have the `keymaps` folder open you will want to create a copy of the `default` folder. We highly recommend you name your folder the same as your GitHub username, but you can use any name you want as long as it contains only lower case letters, numbers, and the underscore character.
-
-To automate the process, you also have the option to run the `new_keymap.sh` script.
-
-Navigate to the `qmk_firmware/util` directory and type the following:
-
-```
-./new_keymap.sh <keyboard path> <username>
-```
-
-For example, for a user named John, trying to make a new keymap for the 1up60hse, they would type in
-
-```
-./new_keymap.sh 1upkeyboards/1up60hse john
-```
+This is the location of your new `keymap.c` file.
## Open `keymap.c` In Your Favorite Text Editor
-Open up your `keymap.c`. Inside this file you'll find the structure that controls how your keyboard behaves. At the top of `keymap.c` there may be some defines and enums that make the keymap easier to read. Farther down you'll find a line that looks like this:
+Open your `keymap.c` file in your text editor. Inside this file you'll find the structure that controls how your keyboard behaves. At the top of `keymap.c` there may be some defines and enums that make the keymap easier to read. Farther down you'll find a line that looks like this:
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-This line indicates the start of the list of Layers. Below that you'll find lines containing either `LAYOUT` or `KEYMAP`, and these lines indicate the start of a layer. Below that line is the list of keys that comprise a particular layer.
+This line indicates where the list of Layers begins. Below that you'll find lines containing `LAYOUT`, and these lines indicate the start of a layer. Below that line is the list of keys that comprise a particular layer.
!> When editing your keymap file be careful not to add or remove any commas. If you do you will prevent your firmware from compiling and it may not be easy to figure out where the extra, or missing, comma is.
@@ -58,13 +40,13 @@ How to complete this step is entirely up to you. Make the one change that's been
## Build Your Firmware
-When your changes to the keymap are complete you will need to build the firmware. To do so go back to your terminal window and run the build command:
+When your changes to the keymap are complete you will need to build the firmware. To do so go back to your terminal window and run the compile command:
- make <my_keyboard>:<my_keymap>
+ qmk compile
-For example, if your keymap is named "xyverz" and you're building a keymap for a rev5 planck, you'll use this command:
+If you did not configure your environment, or you have multiple keyboards, you can specify a keyboard and/or keymap:
- make planck/rev5:xyverz
+ qmk compile -kb <keyboard> -km <keymap>
While this compiles you will have a lot of output going to the screen informing you of what files are being compiled. It should end with output that looks similar to this: