Installing the USB Device Stack
Prerequisites
Before running your first application, you must ensure that you have the minimal set of required tools and components:
- Toolchain for your specific microcontroller.
- Development board.
- µC/USB-Device stack with the source code of at least one of the Micrium USB classes.
- USB device controller driver compatible with your hardware for the µC/USB-Device stack.
- Board support package (BSP) for your development board.
- Example project for your selected RTOS (that is µC/OS-II or µC/OS-III).
If Micrium does not support your USB device controller or BSP, you will have to write your own device driver. Refer to Device Driver Guide for more information on writing your own USB device driver.
Downloading the Source Code
The source code is available as open-source on Github: https://github.com/weston-embedded
µC/USB-Device depends on other modules, and you need to install all the required modules before building your application. Depending on the availability of support for your hardware platform, ports and drivers may or may not be available . Table - µC/USB-Device Module Dependency shows the module dependency for µC/USB-Device.
Module Name | Required | Note(s) |
---|---|---|
µC/USB-Device Core | YES | Hardware independent USB stack. |
µC/USB-Device Driver | YES | USB device controller driver. Available only if Micrium supports your controller, otherwise you have to develop it yourself. |
µC/USB-Device Audio Class | Optional | Available only if you purchased the Audio class. |
µC/USB-Device CDC ACM | Optional | Available only if you purchased the Communication Device Class (CDC) with the Abstract Control Model (ACM) subclass. |
µC/USB-Device CDC EEM | Optional | Available only if you purchased the Communication Device Class (CDC) Ethernet Emulation Model (EEM) subclass. |
µC/USB-Device HID Class | Optional | Available only if you purchased the Human Interface Device (HID) class. |
µC/USB-Device MSC | Optional | Available only if you purchased the Mass Storage Class (MSC). |
µC/USB-Device PHDC | Optional | Available only if you purchased the Personal Healthcare Device Class (PHDC). |
µC/USB-Device Vendor Class | Optional | Available only if you purchased the Vendor class. |
µC/CPU Core | YES | |
µC/CPU Port | YES | Available only if Micrium has support for your processor architecture. |
µC/LIB Core | YES | Micrium run-time library. |
µC/LIB Port | Optional | Available only if Micrium has support for your processor architecture. |
µC/OS-II Core | Optional | Available only if your application is using µC/OS-II. |
µC/OS-II Port | Optional | Available only if Micrium has support for your processor architecture. |
µC/OS-III Core | Optional | Available only if your application is using µC/OS-III. |
µC/OS-III Port | Optional | Available only if Micrium has support for your processor architecture. |
Table - µC/USB-Device Module Dependency indicates that all the µC/USB-Device classes are optional because there is no mandatory class to purchase with the µC/USB-Device Core and Driver. The class to purchase will depend on your needs. But don’t forget that you need a class to build a complete USB project. Table - µC/USB-Device Module Dependency also indicates that µC/OS-II and -III Core and Port are optional. Indeed, µC/USB-Device stack does not assume a specific real-time operating system to work with, but it still requires one.
Installing the Files
Once all the distribution packages have been downloaded to your host machine, extract all the files at the root of your C:\ drive for instance. The package may be extracted to any location. After extracting all the files, the directory structure should look as illustrated in Figure - Directory Tree for µC/USB-Device. In the example, all Micrium products sub-folders shown in Figure - Directory Tree for µC/USB-Device will be located in C:\Micrium\Software\
.