Oki JOB60851 user manual Sample USB Host Software, Compiling and Executing Sample USB Firmware

Page 46

Chapter 4 Software Development

4-2-3. Sample USB Host Software

The CD-ROM directory \package\host contains the following USB host software for testing such things as bulk data flow. A brief overview of operation appears in Section 2.

Readme.txt

Software description, usage notes, etc.

Rwbulk.exe

Test application

Bulkusb.sys

WDM-USB driver

Bulkusb.inf

WDM-USB driver installer information file

This USB host software adopts the following layered approach. For a detailed description, refer to the accompanying text file Readme.txt.

 

RWbulk.exe

 

 

Windows user mode console application

 

 

 

 

 

 

 

Win32API

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

BulkUsb.sys

 

 

Windows kernel mode driver

 

 

 

 

 

 

 

USB Driver Interface(USBDI)

 

USB Host Stack

 

Windows WDM USB Host Protocol Stack (Microsoft)

 

 

 

 

 

 

 

 

HostController

 

 

 

 

 

 

USB

 

 

 

 

 

 

 

n Note n

This sample host software runs only under Windows 98. It is only for provisional use by firmware developers pending the completion of proper host drivers and applications. It is not robust enough for heavy use. In fact, continued use risks operating system instability and even hang-ups. Note that we are unable to respond personally to technical queries with regard to this software.

4-2-4. Compiling and Executing Sample USB Firmware

Compiling the sample USB firmware requires the cc665s compiler installed in Section 2.1.2. Double-check the environment variables from that Section.

The work directory containing the sample USB firmware--c:\work in our example--contains make files for two popular make utilities (not included in the JOB60851 Starter Kit): Makefile.nmk for use with nmake from Microsoft and Makefile.bor for use with maker from Inprise (formerly Borland). Rename or copy the appropriate one to makefile. Also available is the batch file cl665s.bat for users without either of these make implementations. Successful compilation produces the file USB.HEX in the work directory. Check the link map file USB.M66 in the same directory for error messages from the linker.

To test USB.HEX, download it to the JOB60851 board and execute it there with the procedure in Section 2-3. "Running User Programs." Use Rwbulk.exe and the procedure in Section 2-2-2. "Running Flash Memory Program" to test bulk data flow.

4-2-5. Confirming USB Compliance with Usbcheck.exe

The USB Implementers Forum web site provides Usbcomp.exe, a self-extracting archive containing Usbcheck.exe, host software for checking support for USB standard device requests.

page 4-11

Image 46
Contents JOB60851 Starter Kit Page OKI Contents Software Development Port 7 LED2 Control Introduction Introduction Checking Packing List1. Packing List Host Environment Labels Precaution for Safe and Proper UseIcons Use only the specified voltage Do not pile objects on top of the productUse only the cables and other accessories provided Notation Putting Board through Its Paces Configuring JOB60851 Board SetupPutting Board through its Paces Installing Development Software Installing USB Driver Running Default ProgramConnecting Board Running Flash Memory ProgramUse the -u command line option to view the USB pipe numbers Running User Programs Connecting Serial Cable Loading Terminal EmulatorSynchronizing Link Downloading and ExecutingOverwriting Flash Memory Contents System Specifications System Objective System SpecificationsSystem Components System ComponentsConnectors and Switches Hardware SpecificationUse only the AC adapter included with the product System Specifications Circuit Diagram 2. Circuit Diagram 1/2System Specifications Parts List 1. Parts List 1/24. Memory Map for Download Mode Memory Maps5. Memory Map for Flash Execution Mode 6. Memory Map for Application Mode 7. Memory Map for Flash Rewrite Mode Resources Uses System Limitations1. MSM66Q573 Pin Assignments 1/2 System Specifications 1. MSM66Q573 Pin Assignments 2/2 P11-3/XTOUTSoftware Development Bus Topology, Addresses, and Hot Plugging USB BasicsSoftware Development Specification Documents Core SpecificationsBus Transactions Data Flow Types2. USB Data Flow Types Endpoints Packets3. lists the USB packet types Data Rates Device Class Specifications5. USB Device Class Specifications 4. Maximum Payload Sizes6. Device Request Types Device RequestsStandard Device Requests 7. Control Transfer Data Packet Device Descriptors Device Descriptor for Bidirectional PrinterString descriptor Sample USB Firmware SetupSample Firmware Specifications 1. Sample USB FirmwareCompiling and Executing Sample USB Firmware Sample USB Host SoftwareConfirming USB Compliance with Usbcheck.exe Software Development Creating USB Mouse Demo Modifying Application Layer Receive Only Skeleton Simple Debugging Evaluating USB EquipmentUSB Bits and Pieces Device Controller Specifications1. ML60851C Specifications Overview of ML60851C OperationConnecting Microcontroller to USB Controller 1. ML60851C Block DiagramSpecial USB Considerations 2. Microcontroller with 16- or 32-Bit BusVendor and Product IDs Building a ProductOther Tools Necessary Products Limitations Port 7 LED2 Control Port 7 RegistersChanging LED2 Color Sample Port 7 Control Program Standard I/O over Serial Link JOB60851 Board Standard I/OSerial Port 2. Serial Port StructureSerial port SIO0 Chapter Internal timer 9 and following Read and write Functions 3. read Operation4. write Operation Sample Program Using Standard Output Standard I/O ExamplesSample Program Using Standard Input Debugging with Standard I/O