aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorskullY <skullydazed@gmail.com>2018-03-06 15:22:47 -0800
committerskullY <skullydazed@gmail.com>2018-03-06 15:22:47 -0800
commit6a4e08938ec8128e4aa765738562bbc24f2e2c06 (patch)
tree07b91b5e169a407244aab122359c41ff1aa13087
parent08e48eb6f534c7eeb692e8e63b81f41110dcb5e3 (diff)
downloadqmk_firmware-6a4e08938ec8128e4aa765738562bbc24f2e2c06.tar.gz
qmk_firmware-6a4e08938ec8128e4aa765738562bbc24f2e2c06.zip
Flesh out the newbs guide
-rw-r--r--docs/newbs_building_firmware.md32
-rw-r--r--docs/newbs_getting_started.md30
2 files changed, 50 insertions, 12 deletions
diff --git a/docs/newbs_building_firmware.md b/docs/newbs_building_firmware.md
index ef1297556..181761c71 100644
--- a/docs/newbs_building_firmware.md
+++ b/docs/newbs_building_firmware.md
@@ -9,7 +9,7 @@ If you have closed and reopened your terminal window since following the first p
9Start by navigating to the `keymaps` folder for your keyboard. 9Start by navigating to the `keymaps` folder for your keyboard.
10 10
11{% hint style='info' %} 11{% hint style='info' %}
12If you are on macOS or Windows there are commands you can use to easily open the `keymaps` folder. 12If you are on macOS or Windows there are commands you can use to easily open the keymaps folder.
13 13
14macOS: 14macOS:
15 15
@@ -22,17 +22,17 @@ Windows:
22 22
23## Create a Copy Of The `default` Keymap 23## Create a Copy Of The `default` Keymap
24 24
25Once 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. 25Once 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.
26 26
27## Open `keymap.c` In Your Favorite Text Editor 27## Open `keymap.c` In Your Favorite Text Editor
28 28
29Inside the `keymap.c` file you'll find the structure that controls how your keyboard behaves. At the top 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: 29Open 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:
30 30
31 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 31 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
32 32
33This 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 that particular layer. 33This 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 that particular layer.
34 34
35{% hint style='warning' %} 35{% hint style='warn' %}
36When 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. 36When 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.
37{% endhint %} 37{% endhint %}
38 38
@@ -47,3 +47,27 @@ How to complete this step is entirely up to you. Make the one change that's been
47{% hint style='info' %} 47{% hint style='info' %}
48While you get a feel for how keymaps work, keep each change small. Bigger changes make it harder to debug any problems that arise. 48While you get a feel for how keymaps work, keep each change small. Bigger changes make it harder to debug any problems that arise.
49{% endhint %} 49{% endhint %}
50
51## Build Your Firmware
52
53When 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:
54
55 make <my_keyboard>:<my_keymap>
56
57For example, if your keymap is named "xyverz" and you're building a keymap for a rev5 planck, you'll use this command:
58
59 make planck/rev5:xyverz
60
61While 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:
62
63```
64Linking: .build/planck_rev5_xyverz.elf [OK]
65Creating load file for flashing: .build/planck_rev5_xyverz.hex [OK]
66Copying planck_rev5_xyverz.hex to qmk_firmware folder [OK]
67Checking file size of planck_rev5_xyverz.hex [OK]
68 * File size is fine - 18392/28672
69```
70
71## Flash Your Firmware
72
73Move on to [Flashing Firmware](newbs_flashing.md) to learn how to write your new firmware to your keyboard.
diff --git a/docs/newbs_getting_started.md b/docs/newbs_getting_started.md
index 3c08a0ee9..3a5e8269c 100644
--- a/docs/newbs_getting_started.md
+++ b/docs/newbs_getting_started.md
@@ -6,9 +6,19 @@ QMK tries to put a lot of power into your hands by making easy things easy, and
6 6
7# Getting Started 7# Getting Started
8 8
9Before you can build keymaps you need to setup your build environment. This only has to be done one time no matter how many keyboards you want to compile firmware for. 9Before you can build keymaps you need to install some software and setup your build environment. This only has to be done one time no matter how many keyboards you want to compile firmware for.
10 10
11## Download QMK Toolbox 11## Download Software
12
13### Text Editor
14
15You'll need a program that can edit and save **plain text** files. If you are on Windows you can make due with Notepad, and on Linux you can use Gedit, both of which are simple but functional text editors. On macOS you can not use TextEdit.app, it will not save plain text files. You will need to install another program such as Sublime Text.
16
17{% hint style='info' %}
18Not sure which text editor to use? Laurence Bradford wrote [a great introduction](https://learntocodewith.me/programming/basics/text-editors/) to the subject.
19{% endhint %}
20
21### QMK Toolbox
12 22
13QMK Toolbox is a Windows and macOS program that allows you to both program and debug your custom keyboard. You will want to install it so that you can easily flash your keyboard and receive the debugging messages that your keyboard will print. 23QMK Toolbox is a Windows and macOS program that allows you to both program and debug your custom keyboard. You will want to install it so that you can easily flash your keyboard and receive the debugging messages that your keyboard will print.
14 24
@@ -43,8 +53,8 @@ You will need to install git. It's extremely likely you already have it, but if
43 53
44Once you have setup your Linux/Unix environment you are ready to download QMK. We will do this by using git to "clone" the QMK repository. Open a Terminal or MSYS2 Console window and leave it open for the remainder of this guide. Inside that window run these two commands: 54Once you have setup your Linux/Unix environment you are ready to download QMK. We will do this by using git to "clone" the QMK repository. Open a Terminal or MSYS2 Console window and leave it open for the remainder of this guide. Inside that window run these two commands:
45 55
46* `git clone https://github.com/qmk/qmk_firmware.git` 56 git clone https://github.com/qmk/qmk_firmware.git
47* `cd qmk_firmware` 57 cd qmk_firmware
48 58
49{% hint style='info' %} 59{% hint style='info' %}
50If you already know [how to use GitHub](getting_started_github.md) we recommend you create and clone your own fork instead. If you don't know what that means you can safely ignore this message. 60If you already know [how to use GitHub](getting_started_github.md) we recommend you create and clone your own fork instead. If you don't know what that means you can safely ignore this message.
@@ -52,19 +62,19 @@ If you already know [how to use GitHub](getting_started_github.md) we recommend
52 62
53## Setup QMK 63## Setup QMK
54 64
55QMK comes with a script to help you setup the rest of what you'll need. You should run it now: 65QMK comes with a script to help you setup the rest of what you'll need. You should run it now by typing in this command:
56 66
57* `./util/qmk_install.sh` 67 ./util/qmk_install.sh
58 68
59## Test Your Build Environment 69## Test Your Build Environment
60 70
61Now that your QMK build environment is setup you can build a firmware for your keyboard. Start by trying to build the default layout for your keyboard. You should be able to do that with a command in this format: 71Now that your QMK build environment is setup you can build a firmware for your keyboard. Start by trying to build the default layout for your keyboard. You should be able to do that with a command in this format:
62 72
63* `make <keyboard>:default` 73 make <keyboard>:default
64 74
65For example, to build a firmware for a Clueboard 66% use: 75For example, to build a firmware for a Clueboard 66% use:
66 76
67* `make clueboard/66:default` 77 make clueboard/66/rev3:default
68 78
69When it is done you should have a lot of output that ends similar to this: 79When it is done you should have a lot of output that ends similar to this:
70 80
@@ -75,3 +85,7 @@ Copying clueboard_66_rev2_default.hex to qmk_firmware folder
75Checking file size of clueboard_66_rev2_default.hex [OK] 85Checking file size of clueboard_66_rev2_default.hex [OK]
76 * File size is fine - 25174/28672 86 * File size is fine - 25174/28672
77``` 87```
88
89## Creating Your Layout
90
91Now you are ready to create your own personal layout. Move on to [Building Your First Firmware](newbs_building_firmware.md) for that.