diff --git a/docs/docs/assets/troubleshooting/keymaps/errorscreen.png b/docs/docs/assets/troubleshooting/keymaps/errorscreen.png deleted file mode 100644 index 73b5b584..00000000 Binary files a/docs/docs/assets/troubleshooting/keymaps/errorscreen.png and /dev/null differ diff --git a/docs/docs/assets/troubleshooting/keymaps/healthyEDIT.png b/docs/docs/assets/troubleshooting/keymaps/healthyEDIT.png deleted file mode 100644 index 50d2c736..00000000 Binary files a/docs/docs/assets/troubleshooting/keymaps/healthyEDIT.png and /dev/null differ diff --git a/docs/docs/assets/troubleshooting/keymaps/unhealthyEDIT.png b/docs/docs/assets/troubleshooting/keymaps/unhealthyEDIT.png deleted file mode 100644 index 3fd8dc70..00000000 Binary files a/docs/docs/assets/troubleshooting/keymaps/unhealthyEDIT.png and /dev/null differ diff --git a/docs/docs/behaviors/key-press.md b/docs/docs/behaviors/key-press.md index f048b686..12d4094f 100644 --- a/docs/docs/behaviors/key-press.md +++ b/docs/docs/behaviors/key-press.md @@ -33,11 +33,6 @@ provided by ZMK near the top: Doing so makes a set of defines such as `A`, `N1`, etc. available for use with these behaviors -### Improperly defined keymap - `dtlib.DTError: .dts.pre.tmp:` - -When compiling firmware from a keymap, it may be common to encounter an error in the form of a`dtlib.DTError: .dts.pre.tmp:`. -For instructions to resolve such an error, click [here](../troubleshooting.md###Improperly-defined-keymap) - ## Key Press The "key press" behavior sends standard keycodes on press/release. diff --git a/docs/docs/troubleshooting.md b/docs/docs/troubleshooting.md index 0f2ea4c9..b163e7ba 100644 --- a/docs/docs/troubleshooting.md +++ b/docs/docs/troubleshooting.md @@ -26,28 +26,35 @@ Variations of the warnings shown below occur when flashing the `.uf2` An error along the lines of `CMake Error at (zmk directory)/zephyr/cmake/generic_toolchain.cmake:64 (include): include could not find load file:` during firmware compilation indicates that the Zephyr Environment Variables are not properly defined. For more information, click [here](../docs/development/setup.md#environment-variables). -### dtlib.DTError +### West Build Errors -An error along the lines of `dtlib.DTError: .dts.pre.tmp:` during firmware compilation indicates an issue within the `.keymap` file. -This can be verified by checking the file in question, found in `mkdir/app/build`. - -| ![Example Error Screen](../docs/assets/troubleshooting/keymaps/errorscreen.png) | -| :----------------------------------------------------------------------------------------------------------------: | -| An example of the dtlib.DTError when compiling an iris with the nice!nano while the keymap is not properly defined | - -After opening the `.dts.pre.tmp:` and scrolling down to the referenced line, one can locate errors within their shield's keymap by checking if the referenced keycodes were properly converted into the correct [USB HID Usage ID](https://www.usb.org/document-library/hid-usage-tables-12). +West build errors usually indicate syntax problems in the `.keymap` file during the compilation process. The following are some examples and root causes. :::note -If you are reviewing these errors in the GitHub Actions tab, the contents of `.dts.pre.tmp` is output (with line numbers) in the next step of the build process. +If you are reviewing these errors in the GitHub Actions tab, they can be found in the `West Build` step of the build process. ::: -| ![Unhealthy Keymap Temp](../docs/assets/troubleshooting/keymaps/unhealthyEDIT.png) | -| :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | -| An incorrectly defined keymap unable to compile. As shown in red, `&kp SPAC` is not a valid reference to the [USB HID Usage ID](https://www.usb.org/document-library/hid-usage-tables-12) used for "Keyboard Spacebar" | +#### devicetree error -| ![Healthy Keymap Temp](../docs/assets/troubleshooting/keymaps/healthyEDIT.png) | -| :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | -| A properly defined keymap with successful compilation. As shown in red, the corrected keycode (`&kp SPACE`) references the proper Usage ID defined in the [USB HID Usage Tables](https://www.usb.org/document-library/hid-usage-tables-12) | +A `devicetree error` followed by a reference to the line number on `.keymap` refers to an issue at the exact line position in that file. For example, below error message indicates a missing `;` at line 109 of the `cradio.keymap` file: + +``` +devicetree error: /__w/zmk-config/zmk-config/config/cradio.keymap:109 (column 4): parse error: expected ';' or ',' +``` + +#### devicetree_unfixed.h error + +A `devicetree_unfixed.h` error that follows with an "undeclared here" string indicates a problem with key bindings, like behavior nodes (e.g. `&kp` or `&mt`) with incorrect number of parameters: + +``` +/__w/zmk-config/zmk-config/build/zephyr/include/generated/devicetree_unfixed.h:3756:145: error: 'DT_N_S_keymap_S_symbol_layer_P_bindings_IDX_12_PH_P_label' undeclared here (not in a function); did you mean 'DT_N_S_keymap_S_symbol_layer_P_bindings_IDX_16_PH'? +``` + +In this example, the error string `DT_N_S_keymap_S_symbol_layer_P_bindings_IDX_12_PH_P_label` indicates a problem with the key binding in position `12` in the `symbol_layer` of the keymap. + +:::note +Key positions are numbered starting from `0` at the top left key on the keymap, incrementing horizontally, row by row. +::: ### Split Keyboard Halves Unable to Pair