Eclipse ThreadX USBX

repository·master·Indexed 42 days ago

https://github.com/eclipse-threadx/usbx

A high-performance, small-footprint USB stack supporting Host, Device, and OTG modes. Designed for deeply embedded applications, USBX is fully integrated with the Eclipse ThreadX RTOS.

Tokens
681
Snippets
1
Records
4
Agent score
3%

What's inside USBX

  1. Understand USBX repository structure

    master

    The USBX repository is organized as follows:

    • cmake/: CMakeLists files for building the project.
    • common/: Core USBX source files.
    • ports/: Architecture and compiler-specific files.
    • samples/: Sample code implementations.
    • support/: Miscellaneous platform configuration files used by USBX.
    • LICENSE.txt: License terms.
    • LICENSE-HARDWARE.txt: Licensed hardware information from semiconductor vendors.
  2. Build USBX as a static library using CMake and Arm GNU Toolchain

    master

    You can build USBX as a standalone static library to verify your build setup. This process requires the Arm GNU Toolchain, CMake, and Ninja.

    Prerequisites

    1. Install CMake (version 3.0 or later).
    2. Install Arm GNU Toolchain for arm-none-eabi.
    3. Install Ninja.
    4. Build the ThreadX library first, as it is a required dependency.

    Build Steps

    1. Clone the repository:
      git clone https://github.com/eclipse-threadx/usbx.git
    2. Configure your features and addons in ux_user.h. You can use common/core/inc/ux_user_sample.h as a reference.
    3. Run the CMake configuration and build (example for Cortex-M4):
      cmake -Bbuild -GNinja -DCMAKE_TOOLCHAIN_FILE=cmake/cortex_m4.cmake .
      cmake --build ./build
    $ cmake -Bbuild -GNinja -DCMAKE_TOOLCHAIN_FILE=cmake/cortex_m4.cmake .
    
    $ cmake --build ./build
  3. Integrate USBX into your device application

    master
    The recommended way to use USBX is to include it directly in your device code source tree. Because USBX uses a composable CMake-based build system, you can integrate it by adding it as a git submodule and then using the CMake add_subdirectory() command in your project's build configuration.
  4. Get started with Eclipse ThreadX USBX

    master

    Eclipse ThreadX USBX is a high-performance USB host, device, and on-the-go (OTG) embedded stack designed for deeply embedded applications. It is fully integrated with the Eclipse ThreadX RTOS.

    To get started, you can use semiconductor-provided SDKs and development environments which have USBX integrated. Supported vendors include:

    You can also explore samples built for hero development boards to test your implementation.