Browse Source
Snippet that helps to build USB device samples with virtual device and host controllers and USBIP support. Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>pull/84886/merge
4 changed files with 61 additions and 0 deletions
@ -0,0 +1,17 @@ |
|||||||
|
.. _snippet-usbip-native-sim: |
||||||
|
|
||||||
|
USB/IP on Native Simulator Snippet (usbip-native-sim) |
||||||
|
##################################################### |
||||||
|
|
||||||
|
.. code-block:: console |
||||||
|
|
||||||
|
west build -S usbip-native-sim [...] |
||||||
|
|
||||||
|
Overview |
||||||
|
******** |
||||||
|
|
||||||
|
This snippet allows to configure USB device samples with USB/IP support on a |
||||||
|
native simulator. When building samples with this snippet, you need to provide |
||||||
|
samples DTC overlays using the EXTRA_DTC_OVERLAY_FILE argument. |
||||||
|
|
||||||
|
This snippet is experimental, the behavior may change without notice. |
@ -0,0 +1,4 @@ |
|||||||
|
name: usbip-native-sim |
||||||
|
append: |
||||||
|
EXTRA_CONF_FILE: usbip-native-sim.conf |
||||||
|
EXTRA_DTC_OVERLAY_FILE: usbip-native-sim.overlay |
@ -0,0 +1,21 @@ |
|||||||
|
CONFIG_NETWORKING=y |
||||||
|
CONFIG_NET_IPV4=y |
||||||
|
CONFIG_NET_TCP=y |
||||||
|
CONFIG_NET_SOCKETS=y |
||||||
|
|
||||||
|
# Network address config |
||||||
|
CONFIG_NET_CONFIG_SETTINGS=y |
||||||
|
CONFIG_NET_CONFIG_NEED_IPV4=y |
||||||
|
CONFIG_NET_CONFIG_MY_IPV4_ADDR="192.0.2.1" |
||||||
|
CONFIG_NET_CONFIG_PEER_IPV4_ADDR="192.0.2.2" |
||||||
|
|
||||||
|
CONFIG_NET_LOG=y |
||||||
|
|
||||||
|
CONFIG_USB_HOST_STACK=y |
||||||
|
CONFIG_USBH_LOG_LEVEL_WRN=y |
||||||
|
CONFIG_UHC_DRIVER_LOG_LEVEL_WRN=y |
||||||
|
CONFIG_USBIP=y |
||||||
|
CONFIG_USBIP_LOG_LEVEL_WRN=y |
||||||
|
CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000000 |
||||||
|
CONFIG_UHC_BUF_COUNT=32 |
||||||
|
CONFIG_UHC_XFER_COUNT=32 |
@ -0,0 +1,19 @@ |
|||||||
|
/* |
||||||
|
* Copyright (c) 2025 Nordic Semiconductor ASA |
||||||
|
* |
||||||
|
* SPDX-License-Identifier: Apache-2.0 |
||||||
|
*/ |
||||||
|
|
||||||
|
/delete-node/ &zephyr_udc0; |
||||||
|
|
||||||
|
/ { |
||||||
|
zephyr_uhc0: uhc_vrt0 { |
||||||
|
compatible = "zephyr,uhc-virtual"; |
||||||
|
|
||||||
|
zephyr_udc0: udc_vrt0 { |
||||||
|
compatible = "zephyr,udc-virtual"; |
||||||
|
num-bidir-endpoints = <8>; |
||||||
|
maximum-speed = "high-speed"; |
||||||
|
}; |
||||||
|
}; |
||||||
|
}; |
Loading…
Reference in new issue