diff --git a/docs/docs/development/usb-logging.mdx b/docs/docs/development/usb-logging.mdx index ddcb8194f985..b7c3d2338209 100644 --- a/docs/docs/development/usb-logging.mdx +++ b/docs/docs/development/usb-logging.mdx @@ -20,12 +20,12 @@ It is recommended to only enable logging when needed, and not leaving it on by d ## USB Logging Snippet -Using the `zmk-usb-logging` snippet is used to enable logging. +The `zmk-usb-logging` snippet is used to enable logging. If using GitHub Actions to build your firmware, enabling logging -requires adding a `snippet: zmk-usb-logging` for any build you want logging enabled, e.g. +requires adding a `snippet: zmk-usb-logging` to your `build.yaml` file for any build you want logging enabled, e.g. -``` +```yaml --- include: - board: nice_nano_v2 @@ -35,8 +35,8 @@ include: When building locally, the `-S`/`--snippet` flag can be passed to `west build` to enable the snippet, e.g. -``` -$ west build -b nice_nano_v2 -S zmk-usb-logging -- -DSHIELD="corne_left" +```sh +west build -b nice_nano_v2 -S zmk-usb-logging -- -DSHIELD="corne_left" ``` ### Additional Config @@ -96,22 +96,20 @@ From there, you should see the various log messages from ZMK and Zephyr, dependi Standard boards such as the nice!nano and Seeeduino XIAO family have the necessary configuration for logging already added, however if you are developing your own standalone board you may wish to add the ability to use USB logging in the future. -To do so, you need to follow the upstream Zephyr [`cdc-acm-console` snippet requirements](https://docs.zephyrproject.org/3.6.0/snippets/cdc-acm-console/README.html#requirements) steps. +To do so, you need to follow the upstream Zephyr [`cdc-acm-console` snippet requirements](https://docs.zephyrproject.org/3.5.0/snippets/cdc-acm-console/README.html#requirements) steps. Usually, this just requires ensuring that the USB node has been tagged with the `zephyr_udc0` label, e.g. -``` +```dts zephyr_udc0: &usbd { status = "okay"; }; ``` -## Enabling Logging On Older Boards - -Previously, enabling logging required editing Kconfig files to enable logging. If for whatever reason a build fails when using -a custom board definiton that does not support the new `zmk-usb-logging` snippet, you can use the following steps: +## Enabling Logging on Older Boards -The `CONFIG_ZMK_USB_LOGGING` Kconfig enables USB logging. This can be set at the keyboard level, typically in the `config/.conf` +Previously, enabling logging required setting the `CONFIG_ZMK_USB_LOGGING` Kconfig symbol. If for whatever reason +a custom board definition does not support the new `zmk-usb-logging` snippet, you can try setting this symbol at the keyboard level, typically in the `config/.conf` file if you are using a [user config repository](user-setup.mdx). It can also be enabled at the ZMK level using the `app/prj.conf` file, or other search locations described in the [configuration overview](config/index.md#config-file-locations).