This section shows how to include the CDC-EEM support into an eCos configuration, and how to configure it once installed.
The CDC-EEM driver is contained in a single eCos package CYGPKG_DEVS_ETH_USB_CDCEEM. However, it depends on the services of a collection of other packages for complete functionality. Currently the CDC-EEM implementation is tightly bound with the generic Ethernet driver package CYGPKG_DEVS_ETH_GENERIC_DIRECT.
Incorporating the CDC-EEM driver into your application is
straightforward. The essential starting point is to incorporate the
CDC-EEM eCos package (
This may be achieved directly using ecosconfig add on the command line, or the Build->Packages... menu item within the eCos Configuration Tool.
Once added to the eCos configuration, the CDC-EEM package has a number of configuration options.
The device VendorID. The VendorID number space is managed by the USB organisation, www.usb.org, and a unique ID must be formally obtained.
In conjunction with the CYGPKG_DEVS_ETH_USB_CDCEEM_PID value this is used to uniquely identify a specific peripheral product to the host O/S environment.
Note: The VID is normally expressed as a 16-bit hexadecimal number, but the eCos graphical configurarion tool will normally display the value as a decimal.
The device ProductID. The ProductID number space is managed by the vendor. This ID is sometimes used to uniquely identify specific devices as regards the host device driver needed to communicate with the target device. It is the responsibility of the developer to manage this internal (company) number space.
Note: The PID is normally expressed as a 16-bit hexadecimal number, but the eCos graphical configurarion tool will normally display the value as a decimal.
A human-readable device manufacturer identification string, that is returned as part of the device USB description. The string may be used by the host O/S in its description of the product presented to end-users.
A human-readable product identification string, that is returned as part of the device USB description. Like the manufacturer string this may be used on the host when presenting a device to the user.
Depending on the product requirements the serial number returned as part of the USB descriptor can either be supplied at run-time by the application HAL or defined by the CDL and fixed for a binary build.
The former approach relies on the HAL having a method of obtaining a unique identifier from the hardware from which to construct a unique serial number string. This is normally the preferred approach to providing per-device unique identification, and is used when this option is disabled. When this option is enabled the build uses the string defined by this option as the value returned in the device USB description. This latter approach is less flexible if different physical devices need a unique ID since the CDL will need to be modified and a unique binary constructed for each specific device. If the devices do not need to present a unique identity then the same serial number can be configured into the binary build with the same value being used across all target devices.
This option defines how the device declares its power state to the host, and should be configured to match the hardware implementation supporting the CDC-EEM target driver. When configured as Bus powered then a further configuration option is made available:
When bus-powered this option specifies the maximum power consumption of the device.
When enabled verify EEM packet CRC on reception. If disabled then the CRC is ignored and all received packets are passed to the parent Ethernet driver.
If enabled then a CRC is calculated for every EEM packet transmitted. When disabled the special 0xDEADBEEF CRC sentinel is used. NOTE: It is recommended to leave this option disabled currently, since problems have been seen where Linux host drivers will incorrectly calculate the CRC and drop packets."
When enabled this option allows diagnostic output to be generated for different subsystems within the CDC-EEM driver, and a set of further options are made available for configuration. This information is primarily for internal driver development, and is not normally needed when debugging applications using the USB CDC-EEM network driver. The debug output is sent to the diagnostic console channel as configured for the application.