Skip to content

Commit c2806a6

Browse files
nordic-piksnordicjm
authored andcommitted
samples: zephyr: subsys: usb: enable mass and cdc_acm for LM20
Testing at LM20 DK. Signed-off-by: Piotr Kosycarz <[email protected]>
1 parent 05b6f08 commit c2806a6

File tree

14 files changed

+186
-0
lines changed

14 files changed

+186
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#
2+
# Copyright (c) 2025 Nordic Semiconductor ASA
3+
#
4+
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
#
6+
7+
cmake_minimum_required(VERSION 3.20.0)
8+
9+
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
10+
project(mass)
11+
12+
include(${ZEPHYR_BASE}/samples/subsys/usb/common/common.cmake)
13+
FILE(GLOB app_sources ${ZEPHYR_BASE}/samples/subsys/usb/cdc_acm/src/*.c)
14+
target_sources(app PRIVATE ${app_sources})
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
source "samples/subsys/usb/cdc_acm/Kconfig"
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
This sample extends the same-named Zephyr sample to verify it
2+
with Nordic development kits.
3+
4+
Source code and basic configuration files can be found in the corresponding folder structure in zephyr/samples/subsys/usb/cdc_acm.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
&zephyr_udc0 {
2+
cdc_acm_uart0 {
3+
compatible = "zephyr,cdc-acm-uart";
4+
};
5+
};
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
CONFIG_STDOUT_CONSOLE=y
2+
CONFIG_USB_DEVICE_STACK=y
3+
CONFIG_USB_DEVICE_PRODUCT="Zephyr CDC ACM sample"
4+
CONFIG_USB_DEVICE_PID=0x0001
5+
CONFIG_LOG=y
6+
CONFIG_USB_DRIVER_LOG_LEVEL_ERR=y
7+
CONFIG_USB_DEVICE_LOG_LEVEL_ERR=y
8+
CONFIG_SERIAL=y
9+
CONFIG_UART_INTERRUPT_DRIVEN=y
10+
CONFIG_UART_LINE_CTRL=y
11+
CONFIG_USB_DEVICE_INITIALIZE_AT_BOOT=n
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
sample:
2+
name: CDC ACM USB
3+
tests:
4+
nrf.extended.sample.usb_device_next.cdc-acm:
5+
tags:
6+
- usb
7+
- ci_samples_zephyr_subsys_usb
8+
extra_args: CONF_FILE="usbd_next_prj.conf"
9+
platform_allow:
10+
- nrf54lm20pdk/nrf54lm20a/cpuapp
11+
- [email protected]/nrf54lm20a/cpuapp
12+
- [email protected]/nrf54lm20a/cpuapp
13+
- nrf54h20dk/nrf54h20/cpuapp
14+
integration_platforms:
15+
- nrf54lm20pdk/nrf54lm20a/cpuapp
16+
- nrf54h20dk/nrf54h20/cpuapp
17+
harness: console
18+
harness_config:
19+
type: one_line
20+
regex:
21+
- "Wait for DTR"
22+
- "cdc_acm_echo: USBD message: CDC ACM control line state"
23+
- "cdc_acm_echo: USBD message: CDC ACM line coding"
24+
- "cdc_acm_echo: Baudrate 115200"
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
CONFIG_USB_DEVICE_STACK_NEXT=y
2+
3+
CONFIG_STDOUT_CONSOLE=y
4+
CONFIG_SERIAL=y
5+
CONFIG_UART_LINE_CTRL=y
6+
CONFIG_USBD_CDC_ACM_CLASS=y
7+
8+
CONFIG_LOG=y
9+
CONFIG_USBD_LOG_LEVEL_WRN=y
10+
CONFIG_UDC_DRIVER_LOG_LEVEL_WRN=y
11+
CONFIG_USBD_CDC_ACM_LOG_LEVEL_ERR=y
12+
13+
CONFIG_SAMPLE_USBD_PID=0x0001
14+
CONFIG_SAMPLE_USBD_PRODUCT="USBD CDC ACM sample"
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#
2+
# Copyright (c) 2025 Nordic Semiconductor ASA
3+
#
4+
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
#
6+
7+
cmake_minimum_required(VERSION 3.20.0)
8+
9+
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
10+
project(mass)
11+
12+
include(${ZEPHYR_BASE}/samples/subsys/usb/common/common.cmake)
13+
FILE(GLOB app_sources ${ZEPHYR_BASE}/samples/subsys/usb/mass/src/*.c)
14+
target_sources(app PRIVATE ${app_sources})
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
source "samples/subsys/usb/mass/Kconfig"
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
This sample extends the same-named Zephyr sample to verify it
2+
with Nordic development kits.
3+
4+
Source code and basic configuration files can be found in the corresponding folder structure in zephyr/samples/subsys/usb/mass.

0 commit comments

Comments
 (0)