Skip to content

Commit 33e7fc5

Browse files
BorysNykytiuks07641069
authored andcommitted
telink: add instructions how to use USB logging
- update tl321x index.rst file - update tl721x index.rst file - update tlsr9518adk80d index.rst file - update tlsr9528a index.rst file - change upload-artifact@v3 to upload-artifact@v4 Signed-off-by: Borys Nykytiuk <borys.nykytiuk@telink-semi.com>
1 parent 51fe7df commit 33e7fc5

File tree

9 files changed

+165
-5
lines changed

9 files changed

+165
-5
lines changed

.github/workflows/telink-b91-build.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ jobs:
156156
cp ../build_crypto_mbedtls_b91/zephyr/zephyr.bin telink_build_artifacts/b91_mbedtls.bin
157157
158158
- name: Publish artifacts
159-
uses: actions/upload-artifact@v3
159+
uses: actions/upload-artifact@v4
160160
with:
161161
path: |
162162
telink_build_artifacts/*

.github/workflows/telink-b92-build.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ jobs:
178178
cp ../build_crypto_mbedtls_b92/zephyr/zephyr.bin telink_build_artifacts/b92_mbedtls.bin
179179
180180
- name: Publish artifacts
181-
uses: actions/upload-artifact@v3
181+
uses: actions/upload-artifact@v4
182182
with:
183183
path: |
184184
telink_build_artifacts/*

.github/workflows/telink-tl321x-build.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ jobs:
142142
cp ../build_mcuboot_chip_id_tl3218/zephyr/zephyr.bin telink_build_artifacts/tl3218_mcuboot_chip_id.bin
143143
144144
- name: Publish artifacts
145-
uses: actions/upload-artifact@v3
145+
uses: actions/upload-artifact@v4
146146
with:
147147
path: |
148148
telink_build_artifacts/*

.github/workflows/telink-tl721x-build.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ jobs:
143143
cp ../build_spi_flash_tl7218/zephyr/zephyr.bin telink_build_artifacts/tl7218_spi_flash.bin
144144
145145
- name: Publish artifacts
146-
uses: actions/upload-artifact@v3
146+
uses: actions/upload-artifact@v4
147147
with:
148148
path: |
149149
telink_build_artifacts/*

.github/workflows/telink-w91-build.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ jobs:
155155
cp ../build_blinky_w91/zephyr/n22.bin telink_build_artifacts/n22.bin
156156
157157
- name: Publish artifacts
158-
uses: actions/upload-artifact@v3
158+
uses: actions/upload-artifact@v4
159159
with:
160160
path: |
161161
telink_build_artifacts/*

boards/telink/tl3218/doc/index.rst

+40
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,46 @@ Serial Port
144144
The TL3218 SoC has 1 UART. The Zephyr console output is assigned to UART0.
145145
The default settings are 115200 8N1.
146146

147+
USB COM Port (ACM) as Serial Port Configuration
148+
-----------------------------------------------
149+
150+
To use the USB COM port (ACM) instead of UART, follow these steps:
151+
152+
1. Add the following configuration to your project:
153+
154+
.. code-block:: none
155+
CONFIG_LOG=y
156+
CONFIG_USB_DEVICE_STACK=y
157+
CONFIG_USB_DEVICE_INITIALIZE_AT_BOOT=n
158+
CONFIG_USB_CDC_ACM_LOG_LEVEL_OFF=y
159+
2. Include the following overlay configuration:
160+
161+
.. code-block:: dts
162+
/ {
163+
chosen {
164+
zephyr,console = &cdc_acm_uart0;
165+
zephyr,shell-uart = &cdc_acm_uart0;
166+
};
167+
};
168+
&zephyr_udc0 {
169+
cdc_acm_uart0: cdc_acm_uart0 {
170+
compatible = "zephyr,cdc-acm-uart";
171+
};
172+
};
173+
3. Connect the USB cable to your device. A new ACM serial device should appear in your system (e.g., ``/dev/ttyACM0`` on Linux or a COM port on Windows).
174+
4. Use your preferred terminal application (like ``minicom``, ``screen``, or ``PuTTY``) to connect to the newly detected ACM serial device.
175+
176+
5. In your source code, ensure the following header is included and the USB device stack is initialized:
177+
178+
.. code-block:: c
179+
180+
#ifdef CONFIG_USB_DEVICE_STACK
181+
#include <zephyr/usb/usb_device.h>
182+
#endif
183+
#ifdef CONFIG_USB_DEVICE_STACK
184+
usb_enable(NULL);
185+
#endif
186+
147187
Programming and debugging
148188
*************************
149189

boards/telink/tl7218/doc/index.rst

+40
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,46 @@ Serial Port
145145
The Zephyr console output is assigned to UART0.
146146
The default settings are 115200 8N1.
147147

148+
USB COM Port (ACM) as Serial Port Configuration
149+
-----------------------------------------------
150+
151+
To use the USB COM port (ACM) instead of UART, follow these steps:
152+
153+
1. Add the following configuration to your project:
154+
155+
.. code-block:: none
156+
CONFIG_LOG=y
157+
CONFIG_USB_DEVICE_STACK=y
158+
CONFIG_USB_DEVICE_INITIALIZE_AT_BOOT=n
159+
CONFIG_USB_CDC_ACM_LOG_LEVEL_OFF=y
160+
2. Include the following overlay configuration:
161+
162+
.. code-block:: dts
163+
/ {
164+
chosen {
165+
zephyr,console = &cdc_acm_uart0;
166+
zephyr,shell-uart = &cdc_acm_uart0;
167+
};
168+
};
169+
&zephyr_udc0 {
170+
cdc_acm_uart0: cdc_acm_uart0 {
171+
compatible = "zephyr,cdc-acm-uart";
172+
};
173+
};
174+
3. Connect the USB cable to your device. A new ACM serial device should appear in your system (e.g., ``/dev/ttyACM0`` on Linux or a COM port on Windows).
175+
4. Use your preferred terminal application (like ``minicom``, ``screen``, or ``PuTTY``) to connect to the newly detected ACM serial device.
176+
177+
5. In your source code, ensure the following header is included and the USB device stack is initialized:
178+
179+
.. code-block:: c
180+
181+
#ifdef CONFIG_USB_DEVICE_STACK
182+
#include <zephyr/usb/usb_device.h>
183+
#endif
184+
#ifdef CONFIG_USB_DEVICE_STACK
185+
usb_enable(NULL);
186+
#endif
187+
148188
Programming and debugging
149189
*************************
150190

boards/telink/tlsr9518adk80d/doc/index.rst

+40
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,46 @@ Serial Port
153153
The TLSR9518A SoC has 2 UARTs. The Zephyr console output is assigned to UART0.
154154
The default settings are 115200 8N1.
155155

156+
USB COM Port (ACM) as Serial Port Configuration
157+
-----------------------------------------------
158+
159+
To use the USB COM port (ACM) instead of UART, follow these steps:
160+
161+
1. Add the following configuration to your project:
162+
163+
.. code-block:: none
164+
CONFIG_LOG=y
165+
CONFIG_USB_DEVICE_STACK=y
166+
CONFIG_USB_DEVICE_INITIALIZE_AT_BOOT=n
167+
CONFIG_USB_CDC_ACM_LOG_LEVEL_OFF=y
168+
2. Include the following overlay configuration:
169+
170+
.. code-block:: dts
171+
/ {
172+
chosen {
173+
zephyr,console = &cdc_acm_uart0;
174+
zephyr,shell-uart = &cdc_acm_uart0;
175+
};
176+
};
177+
&zephyr_udc0 {
178+
cdc_acm_uart0: cdc_acm_uart0 {
179+
compatible = "zephyr,cdc-acm-uart";
180+
};
181+
};
182+
3. Connect the USB cable to your device. A new ACM serial device should appear in your system (e.g., ``/dev/ttyACM0`` on Linux or a COM port on Windows).
183+
4. Use your preferred terminal application (like ``minicom``, ``screen``, or ``PuTTY``) to connect to the newly detected ACM serial device.
184+
185+
5. In your source code, ensure the following header is included and the USB device stack is initialized:
186+
187+
.. code-block:: c
188+
189+
#ifdef CONFIG_USB_DEVICE_STACK
190+
#include <zephyr/usb/usb_device.h>
191+
#endif
192+
#ifdef CONFIG_USB_DEVICE_STACK
193+
usb_enable(NULL);
194+
#endif
195+
156196
Programming and debugging
157197
*************************
158198

boards/telink/tlsr9528a/doc/index.rst

+40
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,46 @@ Serial Port
153153
The TLSR9528A SoC has 2 UARTs. The Zephyr console output is assigned to UART0.
154154
The default settings are 115200 8N1.
155155

156+
USB COM Port (ACM) as Serial Port Configuration
157+
-----------------------------------------------
158+
159+
To use the USB COM port (ACM) instead of UART, follow these steps:
160+
161+
1. Add the following configuration to your project:
162+
163+
.. code-block:: none
164+
CONFIG_LOG=y
165+
CONFIG_USB_DEVICE_STACK=y
166+
CONFIG_USB_DEVICE_INITIALIZE_AT_BOOT=n
167+
CONFIG_USB_CDC_ACM_LOG_LEVEL_OFF=y
168+
2. Include the following overlay configuration:
169+
170+
.. code-block:: dts
171+
/ {
172+
chosen {
173+
zephyr,console = &cdc_acm_uart0;
174+
zephyr,shell-uart = &cdc_acm_uart0;
175+
};
176+
};
177+
&zephyr_udc0 {
178+
cdc_acm_uart0: cdc_acm_uart0 {
179+
compatible = "zephyr,cdc-acm-uart";
180+
};
181+
};
182+
3. Connect the USB cable to your device. A new ACM serial device should appear in your system (e.g., ``/dev/ttyACM0`` on Linux or a COM port on Windows).
183+
4. Use your preferred terminal application (like ``minicom``, ``screen``, or ``PuTTY``) to connect to the newly detected ACM serial device.
184+
185+
5. In your source code, ensure the following header is included and the USB device stack is initialized:
186+
187+
.. code-block:: c
188+
189+
#ifdef CONFIG_USB_DEVICE_STACK
190+
#include <zephyr/usb/usb_device.h>
191+
#endif
192+
#ifdef CONFIG_USB_DEVICE_STACK
193+
usb_enable(NULL);
194+
#endif
195+
156196
Programming and debugging
157197
*************************
158198

0 commit comments

Comments
 (0)