From 8594d832b663c92d5d1ccfe14c65419835f4059e Mon Sep 17 00:00:00 2001 From: Kevin Date: Sat, 29 Aug 2020 19:23:25 -0700 Subject: [PATCH] Added split build directories --- docs/docs/dev-build.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/docs/dev-build.md b/docs/docs/dev-build.md index 393f4834..b962a7d3 100644 --- a/docs/docs/dev-build.md +++ b/docs/docs/dev-build.md @@ -62,26 +62,27 @@ west build -b planck_rev6 ``` ### Pristine Building -When building for a new board and/or shield after having built one previously, you may need to enable the pristine build option. This option removes all existing files in the build directory and regenerates them, and can be enabled by adding either --pristine or -p to the command: +When building for a new board and/or shield after having built one previously, you may need to enable the pristine build option. This option removes all existing files in the build directory before regenerating them, and can be enabled by adding either --pristine or -p to the command: ```sh west build -p -b proton_c -- -DSHIELD=kyria_left ``` -### Split Keyboards +### Building For Split Keyboards :::note For split keyboards, you will have to build and flash each side separately the first time you install ZMK. ::: -By default, the `build` command outputs a single .uf2 file named `zmk.uf2` so building left and then right immediately after will overwrite your left firmware. In addition, you will need to pristine build each side to ensure the correct files are used. To avoid having to pristine build each time and separate the left and right build files, we recommend setting up separate build directories for each half. You can do this by first building left into `build\left`: +By default, the `build` command outputs a single .uf2 file named `zmk.uf2` so building left and then right immediately after will overwrite your left firmware. In addition, you will need to pristine build each side to ensure the correct files are used. To avoid having to pristine build every time and separate the left and right build files, we recommend setting up separate build directories for each half. You can do this by using the `-d` parameter and first building left into `build/left`: ``` west build -d build/left -b nice_nano -- -DSHIELD=kyria_left ``` -and then building right into `build\right`: +and then building right into `build/right`: ``` west build -d build/right -b nice_nano -- -DSHIELD=kyria_right ``` +This produces `left` and `right` subfolders under the `build` directory and two separate .uf2 files. For future work on a specific half, use the `-d` parameter again to ensure you are building into the correct location. ## Flashing @@ -92,5 +93,5 @@ board with it in bootloader mode: west flash ``` -For boards that have drag and drop .uf2 flashing capability, the .uf2 file to flash can be found in `build\zephyr` and is by default named `zmk.uf2`. +For boards that have drag and drop .uf2 flashing capability, the .uf2 file to flash can be found in `build\zephyr` (or `build\left|right\zephyr` if you followed the instructions for splits) and is by default named `zmk.uf2`.