aboutsummaryrefslogtreecommitdiff
path: root/docs/getting_started_make_guide.md
diff options
context:
space:
mode:
authorTakeshi ISHII <2170248+mtei@users.noreply.github.com>2021-01-24 15:15:11 +0900
committerGitHub <noreply@github.com>2021-01-24 15:15:11 +0900
commit944cf6476e1a8ddfab7c08dbe4cc1fee3ea4beb7 (patch)
tree775682e5b5583236e385d9963618e8c658234556 /docs/getting_started_make_guide.md
parent29c9c6bf56bc0d7f194b2b69f209d55f27eff72d (diff)
downloadqmk_firmware-944cf6476e1a8ddfab7c08dbe4cc1fee3ea4beb7.tar.gz
qmk_firmware-944cf6476e1a8ddfab7c08dbe4cc1fee3ea4beb7.zip
Update docs/getting_started_make_guide.md (#11373)
* update docs/getting_started_make_guide.md Added description of some targets, including those added with #11338. * Added description of options added by #11324. * update docs/getting_started_make_guide.md * Added description of target. * Update docs/getting_started_make_guide.md Co-authored-by: Drashna Jaelre <drashna@live.com> * Update docs/getting_started_make_guide.md Co-authored-by: Ryan <fauxpark@gmail.com> * Update docs/getting_started_make_guide.md Co-authored-by: Drashna Jaelre <drashna@live.com> * add ':id=linux-udev-rules' to docs/faq_build.md Co-authored-by: Drashna Jaelre <drashna@live.com> Co-authored-by: Ryan <fauxpark@gmail.com>
Diffstat (limited to 'docs/getting_started_make_guide.md')
-rw-r--r--docs/getting_started_make_guide.md22
1 files changed, 19 insertions, 3 deletions
diff --git a/docs/getting_started_make_guide.md b/docs/getting_started_make_guide.md
index a89dc73d0..ad63a1c2e 100644
--- a/docs/getting_started_make_guide.md
+++ b/docs/getting_started_make_guide.md
@@ -14,16 +14,32 @@ The full syntax of the `make` command is `<keyboard_folder>:<keymap>:<target>`,
14The `<target>` means the following 14The `<target>` means the following
15* If no target is given, then it's the same as `all` below 15* If no target is given, then it's the same as `all` below
16* `all` compiles as many keyboard/revision/keymap combinations as specified. For example, `make planck/rev4:default` will generate a single .hex, while `make planck/rev4:all` will generate a hex for every keymap available to the planck. 16* `all` compiles as many keyboard/revision/keymap combinations as specified. For example, `make planck/rev4:default` will generate a single .hex, while `make planck/rev4:all` will generate a hex for every keymap available to the planck.
17* `flash`, `dfu`, `teensy`, `avrdude`, `dfu-util`, or `bootloadHID` compile and upload the firmware to the keyboard. If the compilation fails, then nothing will be uploaded. The programmer to use depends on the keyboard. For most keyboards it's `dfu`, but for ChibiOS keyboards you should use `dfu-util`, and `teensy` for standard Teensys. To find out which command you should use for your keyboard, check the keyboard specific readme. 17* `flash`, `dfu`, `teensy`, `avrdude`, `dfu-util`, or `bootloadHID` compile and upload the firmware to the keyboard. If the compilation fails, then nothing will be uploaded. The programmer to use depends on the keyboard. For most keyboards it's `dfu`, but for ChibiOS keyboards you should use `dfu-util`, and `teensy` for standard Teensys. To find out which command you should use for your keyboard, check the keyboard specific readme.
18 * **Note**: some operating systems need root access for these commands to work, so in that case you need to run for example `sudo make planck/rev4:default:flash`. 18 Visit the [Flashing Firmware](flashing.md) guide for more details of the available bootloaders.
19 * **Note**: some operating systems need privileged access for these commands to work. This means that you may need to setup [`udev rules`](faq_build.md#linux-udev-rules) to access these without root access, or to run the command with root access (`sudo make planck/rev4:default:flash`).
19* `clean`, cleans the build output folders to make sure that everything is built from scratch. Run this before normal compilation if you have some unexplainable problems. 20* `clean`, cleans the build output folders to make sure that everything is built from scratch. Run this before normal compilation if you have some unexplainable problems.
21* `distclean` removes .hex files and .bin files.
22
23The following targets are for developers:
24
25* `show-path` shows the path of the source and object files.
26* `dump-vars` dumps the makefile variable.
27* `objs-size` displays the size of individual object files.
28* `show_build_options` shows the options set in 'rules.mk'.
29* `check-md5` displays the md5 checksum of the generated binary file.
20 30
21You can also add extra options at the end of the make command line, after the target 31You can also add extra options at the end of the make command line, after the target
22 32
23* `make COLOR=false` - turns off color output 33* `make COLOR=false` - turns off color output
24* `make SILENT=true` - turns off output besides errors/warnings 34* `make SILENT=true` - turns off output besides errors/warnings
25* `make VERBOSE=true` - outputs all of the gcc stuff (not interesting, unless you need to debug) 35* `make VERBOSE=true` - outputs all of the gcc stuff (not interesting, unless you need to debug)
26* `make EXTRAFLAGS=-E` - Preprocess the code without doing any compiling (useful if you are trying to debug #define commands) 36* `make VERBOSE_LD_CMD=yes` - execute the ld command with the -v option.
37* `make VERBOSE_AS_CMD=yes` - execute the as command with the -v option.
38* `make VERBOSE_C_CMD=<c_source_file>` - add the -v option when compiling the specified C source file.
39* `make DUMP_C_MACROS=<c_source_file>` - dump preprocessor macros when compiling the specified C source file.
40* `make DUMP_C_MACROS=<c_source_file> > <logfile>` - dump preprocessor macros to `<logfile>` when compiling the specified C source file.
41* `make VERBOSE_C_INCLUDE=<c_source_file>` - dumps the file names to be included when compiling the specified C source file.
42* `make VERBOSE_C_INCLUDE=<c_source_file> 2> <logfile>` - dumps the file names to be included to `<logfile>` when compiling the specified C source file.
27 43
28The make command itself also has some additional options, type `make --help` for more information. The most useful is probably `-jx`, which specifies that you want to compile using more than one CPU, the `x` represents the number of CPUs that you want to use. Setting that can greatly reduce the compile times, especially if you are compiling many keyboards/keymaps. I usually set it to one less than the number of CPUs that I have, so that I have some left for doing other things while it's compiling. Note that not all operating systems and make versions supports that option. 44The make command itself also has some additional options, type `make --help` for more information. The most useful is probably `-jx`, which specifies that you want to compile using more than one CPU, the `x` represents the number of CPUs that you want to use. Setting that can greatly reduce the compile times, especially if you are compiling many keyboards/keymaps. I usually set it to one less than the number of CPUs that I have, so that I have some left for doing other things while it's compiling. Note that not all operating systems and make versions supports that option.
29 45