File tree 4 files changed +65
-0
lines changed
4 files changed +65
-0
lines changed Original file line number Diff line number Diff line change
1
+ .. _snippet-cdc-acm-console :
2
+
3
+ CDC-ACM Console Snippet (cdc-acm-console)
4
+ #########################################
5
+
6
+ .. code-block :: console
7
+
8
+ west build -S cdc-acm-console [...]
9
+
10
+ Overview
11
+ ********
12
+
13
+ This snippet redirects serial console output to a CDC ACM UART. The USB device
14
+ which should be used is configured using :ref: `devicetree `.
15
+
16
+ Requirements
17
+ ************
18
+
19
+ Hardware support for:
20
+
21
+ - :kconfig:option: `CONFIG_USB_DEVICE_STACK `
22
+ - :kconfig:option: `CONFIG_SERIAL `
23
+ - :kconfig:option: `CONFIG_CONSOLE `
24
+ - :kconfig:option: `CONFIG_UART_CONSOLE `
25
+ - :kconfig:option: `CONFIG_UART_LINE_CTRL `
26
+
27
+ A devicetree node with node label ``zephyr_udc0 `` that points to an enabled USB
28
+ device node with driver support. This should look roughly like this in
29
+ :ref: `your devicetree <get-devicetree-outputs >`:
30
+
31
+ .. code-block :: DTS
32
+
33
+ zephyr_udc0: usbd@deadbeef {
34
+ compatible = "vnd,usb-device";
35
+ /* ... */
36
+ };
Original file line number Diff line number Diff line change
1
+ CONFIG_USB_DEVICE_STACK=y
2
+ CONFIG_USB_DEVICE_PRODUCT="Zephyr USB console sample"
3
+ CONFIG_USB_DEVICE_PID=0x0004
4
+
5
+ CONFIG_SERIAL=y
6
+ CONFIG_CONSOLE=y
7
+ CONFIG_UART_CONSOLE=y
8
+ CONFIG_UART_LINE_CTRL=y
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright (c) 2021, 2023 Nordic Semiconductor ASA
3
+ *
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+
7
+ / {
8
+ chosen {
9
+ zephyr,console = &snippet_cdc_acm_console_uart;
10
+ };
11
+ };
12
+
13
+ &zephyr_udc0 {
14
+ snippet_cdc_acm_console_uart: snippet_cdc_acm_console_uart {
15
+ compatible = "zephyr,cdc-acm-uart";
16
+ };
17
+ };
Original file line number Diff line number Diff line change
1
+ name : cdc-acm-console
2
+ append :
3
+ OVERLAY_CONFIG : cdc-acm-console.conf
4
+ DTC_OVERLAY_FILE : cdc-acm-console.overlay
You can’t perform that action at this time.
0 commit comments