Home

uC/GUI user manual

image

Contents

1. 2002 2004 Micrium Technologies Corporation 45 7 3 Contacting support If you need to contact the support please send the following information to support micrium com A detailed description of the problem The configuration file USB Con h The configuration file USB Descriptor c The error messages of the compiler 7 4 FAQ s Q Which CPUs can I use the software with A It can be used with any CPU or MPU for which a C compiler exists Of course it will work faster on 16 32 bit CPUs than on 8 bit CPUs User s amp reference manual for uC GUI 2002 2004 Micrium Technologies Corporation 46 User s amp reference manual for uC GUI CHAPTER 7 Support 2002 2004 Micrium Technologies Corporation Index Symbols C compiler 8 C programming language 8 A ANSI 8 C Config folder 39 Configuration of uC USB 39 42 D Data types used 9 S Support 43 45 Syntax conventions used 9 U Using the sample application 35 37 User s amp reference manual for uC USB Bulk 47 2004 Micrium Technologies Corporation
2. 37 5 2 Compiling the PC sample application You need for compilation of the sample application a version of a Microsoft compiler The compiler is part of Microsoft Visual C 6 0 or Microsoft Visual Net SampleApp Microsoft Visual C SampleApp cpp iof x lg File Edit View Insert Project Build Tools Window Help jelea y amp e mmeiw lm eem wae e ae unsigned char Read Write Write 0x12 Read 0 if USBBULK_ Open NULL MessageBox NULL Unable to connect to USB BULK device return 1 M3 ali ffs Workspace Sample amp pp 1 project s z g SampleApp files A f USBBULK c E USBBULK h h USBBULK Write amp Write 10 USBBULK Read amp Read 1 USBBULK Write amp Write 1 USBBULK Read amp Read 1 USBBULK Write amp Write 1 if USBBULK Read amp Read 1 l 1 MessageBox NULL Could not read from USB BULK device USBBULK Close return 1 4 iH ClassView amp USBBULK Close Debug Find in Files 1 Find in Files2 XJ Ini Coli1 REC COL OVA READ Z xe s Buia The source of the sample application is placed in the subfolder SAMPLEAPP Open the file SampleApp dsw und compile the source with Build Build Sam pleApp exe Shortcut CTRL F7 and run the executable with Build Execute Sam pleApp exe Shortcut CTRL F5 from the menu User s amp reference manual fo
3. User s amp reference manual for uC USB Bulk 2004 Micrium Technologies Corporation User s amp reference manual for uC USB Bulk 2004 Micrium Technologies Corporation N Chapter 1 Introduction The USB Bulk stack has been designed to work on any embedded system with USB client controller A hardware abstraction layer makes it possible to easily write or modify existing hardware access routines It can be used with USB 1 1 or USB 2 0 devices The stack consists of an embedded side which is shipped in source code form and a driver for the PC which is typically shipped as executable sys but is also available as source code The purpose of the USB stack is to allow developers to quickly and painlessly develop software for an embedded device to communicate with a PC via USB The communi cation is like a single high speed reliable channel very similar to a TCP connection It basically allows the PC to send data to the embedded target the embedded target to receive these bytes and reply with any number of bytes The PC is the USB host the target is the USB client The USB standard defines 4 types of communication Control isochronous interrupt and bulk Experience shows that for most embedded devices bulk mode is the communication mode of choice It allows usage of the full bandwidth of the USB bus Speed The highest possible transfer rate on USB 1 1 12 Mbit sec devices is app 1 1 MByte per second This data rate
4. USB HW StallEPO Description Prototype void USB HW StallEPO void USB HW SetAddress Description Prototype void USB HW SetAddress unsigned char Adr USB HW EnableEP1 Description Prototype void USB HW EnableEP1 void void USB HW EPO0 Send Description Sends a packet on EPO Prototype void USB HW EPO Send const unsigned char pData unsigned char SendLength char SendNULLPacket User s amp reference manual for uC USB Bulk 2004 Micrium Technologies Corporation 22 CHAPTER 3 USB HW ClearOutPacketReady Description TBD Prototype void USB HW ClearOutPacketReady void USB HW CirSetupEnd Description TBD Prototype void USB HW ClrSetupEnd void User s amp reference manual for uC USB Bulk Getting the target up 2004 Micrium Technologies Corporation 238 3 5 OS dependent part The OS dependent part is fairly small It consist of a set of functions and acts as abstraction layer between the USB stack and the RTOS If no RTOS is used the apstraction layer will emulate the small part of the RTOS functionality required Routine Explanation USB X Delay Delays for a given number of ms USB X RestoreI Enable interrupts if Int Disable Count is 0 USE X nent R interrupt disable count and enable interrupts if counter reaches USB X DT Disable interrupts USB X IncDI Increment interrup
5. also be used device specific purposes Used to configure a device at attach time and can be used for other device specific purposes including control of other pipes on the device Isochronous transfers Typically used for applications which need guaranteed speed Isochronous transfer is fast but with possible data loss A typical use is audio which requires a constant data rate Interrupt transfers Typically used by devices that need guaranteed quick responses bounded latency Bulk transfers Typically used by devices that generate or consume data in relatively large and bursty quantities Bulk transfer have wide dynamic latitude in transmission con straints It can use all remaining available bandwidth but with no guarantees on bandwidth or latency Since the USB bus is normally not very busy there is typically 90 or more of the bandwith available for USB transfers User s amp reference manual for uC USB Bulk 2004 Micrium Technologies Corporation 2 2 Setup phase enumeration Before the target can communicate with the host the host needs to get information from the target This information is gathered in the initial setup phase The informa tion is contained in the descriptors which are in the configurable section of the stack The most important part for identification of the target device are the product Id and vendor Id During the setup phase the host also assign an address to the client This part of the setup i
6. most cases its own data types as shown in the table below Data type Definition Explanation USB I8 signed char 8 bit signed value USB U8 unsigned char 16 bit unsigned value USB I16 signed short 16 bit signed value USB U16 unsigned short 16 bit unsigned value USB I32 signed long 32 bit signed value USB U32 unsigned long 32 bit unsigned value For most 16 32 bit controllers the C data types used will work fine However the data types and can be configured in the main configuration file User s amp reference manual for uC USB Bulk 2004 Micrium Technologies Corporation 10 CHAPTER 1 Introduction User s amp reference manual for uC USB Bulk 2004 Micrium Technologies Corporation Chapter 2 USB basics Before attempting to use the USB stack on your target you should know some basics of USB This chapter tries to explain the fundamentals and contains links for more information User s amp reference manual for uC USB Bulk 2004 Micrium Technologies Corporation 12 2 1 CHAPTER 2 USB basics Endpoint types The USB standard defines 4 types of communication Control isochronous interrupt and bulk Control transfers are used in the setup phase The application can basically select one of the other 3 transfer types For most embedded applications bulk is the best choice since it allows the highest possible data rates Control transfers Typically used to configure a device It can
7. 004 Micrium Technologies Corporation 17 3 2 Start application The start application in the application subfolder is a modified echo server which can be used to test the stack The application receives data byte by byte increments every single byte and sends it back to the host Source code of Start c RRR RR kckck kc kck kc kckck kc kc ko kc kc kk kc ck Sk ck ke cec ke ck ke kc kc hc kc KEKE kc kc k ck ckck ck ckck ck kkk kkk Micrium Technologies Corporation Empowering embedded systems ck ck ck ck KKK KEKE KKK KKK ck kk ck ck kk ck ck KKK KK KKK KEK KK KEK KKK KKK ck ko ko ck ck ko ko ko ko ko ko ko File mbar Purpose Modified echo server to test the stack END OF HEADER include USB h void MainTask void if Wait for configuration while USB IsConfigured 0 HW ToggleLEDO0 Toggle LED to indicate configuration USB X Delay 50 HW ClrLEDO Lf Loop Receive data byte by byte send back data 1 Lid while 1 char c USB Read amp c 1 SetLED 20 Flash LED to show receiption of data CTS USB Write amp c 1 The start application will of course later on be replaced by your real application pro gram For the purpose of getting the stack up and running as well as doing an initial test the start application should not be modified but instead compiled and linked with your project User s amp reference ma
8. can indeed be achieved on fast system such as ARM7 1 1 What is included The following table shows the contents of all USB bulk stack subdirectories Directory Contents Doc Contains the USB Bulk stack documentation Contains the kernel mode USB driver for the PC Win32 NT platform the com Driver piled driver sys the inf file required for installation as well as the source code and a project for MSVC 6 0 SampleApp Contains a PC sample project to help bring up and test the system USBBulkStack Contains the USB driver for the target hardware User s amp reference manual for uC USB Bulk 2004 Micrium Technologies Corporation 8 CHAPTER 1 Introduction 1 2 Purpose of this document This guide describes how to install configure and use the uC USB Bulk stack for embedded applications It also explains the internal structure of the software 1 3 Assumptions This guide assumes that you already possess a solid knowledge of the C program ming language If you feel that your knowledge of C is not sufficient we recom mend The C Programming Language by Kernighan and Richie which describes the programming standard and in newer editions also covers the ANSI C standard Knowledge of assembly programming is not required 1 4 Requirements The final purpose is usually to be able to run the software on a target system 1 4 4 Target system hardware Your target system must have a build in USB cl
9. ce manual for uC USB Bulk 2004 Micrium Technologies Corporation Table of Contents PVEFOC UC DOLI ssr edant eet eet mcr int evento intima Rate uv diana wan datis has taU anes 7 1 1 Whiat is includedx deer eta diee e E EE UU E OUR awe 7 1 2 Purpose of this document siirroissa variana vans ii XXX XR OX ERA YER ERE X XR CRY ER Y 8 1 3 ASSUMPUIONS eret tex pits rex ERR EE d ne AA EN E EIEEEI EE ERAN TRADE cere estan eed nace 8 1 4 REQUIPEIMENES foot ERE 8 1 5 Feature Sene aeaaea a aaae Ri cer a ANEN a aE aTa a AN aa A aa aa teed dhakeeveed ates 9 1 6 Typographic conventions for syntax sssssssssssssesee nnne menm nnn nnns 9 1 7 Data types eere eenectaeeed mart red REIR prd Re E RS E RA FEIER PEXRERIRA r 9 USE ASICS oni o oui S aetate bis rv cabe da uis sop tte n Lose neds o Eee RE Ecc caASUE 11 2 1 sIsrslofellajmindol p 12 2 2 Setup phase enumeration ais seian e E enn nennen anna mena nennen nnn nnn 13 2 3 Product vendor Ids os over REX EI PU YI RE RR EI erra efe kagvkv a peras 14 Getting the target UP pen H 15 3 1 File Str Cctur e orco aaa a vine nga a andes 16 3 2 Start applicatio Meese arain aea OEE EE Ara TAE Rega SUE a adaa 17 3 3 Configurations ree rna vr np rede exer dre e Ra e Pb E RE ERU EXE Ane a 18 3 4 Hardware dependent part ccccecccecesseeeeeeseeee sees eee nennen nena sea sena sea sensn nnn 19 3 5 OS dependent part c oct tercer en ve bana cere ck xxx vee xev cw A Eleg Ta 23 3 6 Generic bulk
10. ctory as SampleApp SampleApp exe To run the sample application simply start the executable for example by double clicking it If the USB BULK device isn t connected to your PC or the driver isn t installed you get the following message box USB Bulk sample application X Unable to connect to USB BULK device If the connection to the USB BULK Device works correctly the sample Application will write one byte and afterwards read one byte If an error in the reading or writing process occurs a message box pops up c C Work USBBulkStack SAMPLEAPP O utput D ebug S ample pp exe Writing one byte Reading one byte In the USB BULK device runs an application that increments the received byte and sends it back The sample application reads this byte and checks its value This is repeated 2 times unless an error occurs In either case a message box pops up informing you whether everything worked fine or if an error occurred Error Messages Description Unable to connect to USB BULK device The USB device is not connected to your PC or the connection is faulty Could not write to device The PC sample application was not able to write one byte Could not read from device time out The PC sample application was not able to read one byte Wrong data read The result of the target sample application isn t correct User s amp reference manual for uC USB Bulk 2004 Micrium Technologies Corporation
11. efault number above or pretty much any other number However you may not bring a product on the market without having been assigned your own vendor Id If you change this value do not forget to make the same change to the inf File as described in the Driver chapter Otherwise the Windows host will be unable to locate the driver USB PRODUCT ID Description Defines the Product Id of the target Type Numerical Example define USB Product ID 0x1234 Additional information The product Id builds in combination with the vendor Id a worldwide explicit User s amp reference manual for uC USB Bulk 2004 Micrium Technologies Corporation 41 identifier For tests you can use the default number above or pretty much any other number If you change this value do not forget to make the same change to the inf File as described in the Driver chapter Otherwise the Windows host will be unable to locate the driver User s amp reference manual foruC USB Bulk 2004 Micrium Technologies Corporation 42 CHAPTER 6 Configuration 6 3 USB Descriptors c The USB describtors are locate in the file USB Descriptors c A part of this file should be modified before using the software other parts may be modified 6 3 1 Manufacturer string descriptor The descriptor is in Unicode format The first 2 bytes are header an should not be changed Changes in this string do not affect the functionality at all const unsigned char USB acManfStri
12. ient The memory requirements are app 6kB ROM and app 1kb of RAM used for buffer ing Systems with less RAM can also be used 1 4 2 Development environment compiler The CPU used is of no importance only an ANSI compliant C compiler is required If your compiler has some limitations please let us know and we will inform you if these will be a problem when compiling the software Any compiler for 16 32 64 bit CPUs or DSPs that we know of can be used most 8 bit compilers can be used as well A C compiler is not required but can be used The application program can there fore also be programmed in C if desired User s amp reference manual for uC USB Bulk 2004 Micrium Technologies Corporation 1 5 1 6 Features High speed The stack can be used with or without a RTOS Start test application supplied Typographic conventions for syntax This manual uses the following typographic conventions Style Used for Body Body text Keyword Text that you enter at the command prompt or that appears on the display i e sys tem functions file or pathnames Parameter Parameters in API functions Sample Sample code in program examples New Sample Sample code that has been added to an existing program example Warning Important cautions or reminders 1 7 Datatypes Since C does not provide data types of fixed lengths which are identical on all plat forms the stack uses in
13. isksNames 1 USB BULK Installation Disk SourceDisksFiles USBBulk sys 1 anufacturer sMfgName s DeviceList DeviceList USBNVID 8765 amp PID 1234 DeviceDesc USBBULK Dev USBNVID 8765 amp PID 1234 PreCopySection HKR NoSetupUI 1 DestinationDirs USBBULK Files Ext 10 System32 Drivers USBBULK Dev CopyFiles USBBULK Files Ext AddReg USBBULK AddReg USBBULK Dev NT CopyFiles USBBULK Files Ext AddReg USBBULK AddReg USBBULK Dev NT Services Addservice USBBULK 0x00000002 USBBULK AddService USBBULK AddService DisplayName SUSBBULK SvcDesc ServiceTyp 1 SERVICE KERNEL DRIVER StartType 3 7 SERVICE DEMAND START ErrorControl 1 SERVICE ERROR NORMAL ServiceBinary 10 System32 Drivers USBBULK sys LoadOrderGroup Base USBBULK AddReg HKR DevLoader ntkern HKR NTMPDriver USBBULK sys USBBULK Files Ext User s amp reference manual for uC USB Bulk 2004 Micrium Technologies Corporation 33 USBBulk sys Strings MfgName MyCompany USBNVID 8765 amp PID 1234 DeviceDesc USB Bulk Device USBBULK SvcDesc USB Bulk device driver red required modifications green possible modifications You have to personalise the inf file on the red marked positions Changes on the green marked positions are optional and not necessary for the correct function of the device Replace the red marked positions with your pe
14. lues for EPO and enables the various interrupts needed for USB opera tions Prototype void USB HW Init void USB HW FreeBuffer Description Let the USB controller know that received packet has been read and the buffer can now be re used Prototype void USB HW Init void User s amp reference manual for uC USB Bulk 2004 Micrium Technologies Corporation 20 CHAPTER 3 Getting the target up USB HW memopy Description Memcopy can be an accelerated form Prototype void USB HW memcpy void pDest void pSrc unsigned Len USB HW BufferAvailable Description Returns if a buffer is available Prototype int USB HW BufferAvailable void Return value A 32 bit integer USB HW SendaData Description Sends out data bulk mode on EP1 Prototype void void USB HW SendData const void pData unsigned NumBytes USB HW Read Description Returns a unique ID for the current task Prototype void USB HW Read void pDest int NumBytes unsigned PacketOff USB HW Attach Description Prototype void USB HW Attach void User s amp reference manual for uC USB Bulk 2004 Micrium Technologies Corporation 21 USB HW UnloadEPO Description Called after a setup packet has been successfully evaluated Tells the USB controller that the associated data buffer is no longer needed and can be freed Prototype void USB HW UnloadEPO0 void
15. ng 20 Sizeof USB acManfString USB DESC TYPE STRING M 0 YT 0 Or O 70 M 0 Pro A 0 N 0 Y 0 WE 6 3 2 Product string The descriptor is in Unicode format The first 2 bytes are header an should not be changed Changes in this string do not affect the functionality at all const unsigned char USB acProdString 32 sizeof USB_acProdString USB_DESC_TYPE_STRING gu S v0 B 0 QO BY 0 Us L 0 K 3 05 User s amp reference manual for uC USB Bulk 2004 Micrium Technologies Corporation 43 Chapter 7 Support This chapter should help if any problem occurs This could be a problem with the tool chain with the hardware the use of the USB functions or with the performance and it describes how to contact the support User s amp reference manual for uC GUI 2002 2004 Micrium Technologies Corporation 44 CHAPTER 7 Support 7 1 Problems with tool chain compiler linker The following shows some of the problems that can occur with the use of your tool chain The chapter tries to show what to do in case of a problem and how to contact the support if needed 7 1 1 Compiler crash You ran into a tool chain compiler problem not a problem with the software If one of the tools of your tool chain crashes you should contact your compiler support Tool internal error please contact support 7 1 2 Compiler warnings The code of the software has been
16. nual for uC USB Bulk 2004 Micrium Technologies Corporation 18 CHAPTER 3 Getting the target up 3 3 Configuration The configuration section will later on be modified to match your real application For the purpose of getting the stack up and running as well as doing an initial test the configuration as shipped should not be modified User s amp reference manual for uC USB Bulk 2004 Micrium Technologies Corporation 19 3 4 Hardware dependent part Routine Explanation USB HW Init Sets default values for EPO and enables the various interrupts needed for USB operations Let the USB controller know that received packet has been read USB EN FreeBurbertl and the buffer can now be re used USB HW memcpy Memcopy can be an accelerated form USB HW BufferAvailable Returns if a buffer is available USB HW SendData Sends out data bulk mode on EP1 USB HW Read Read the received data from the USB controller USB HW Attach USB HW UnloadEPO Called after a setup packet has been successfully evaluated Tells the USB controller that the associated data buffer is no longer needed and can be freed USB HW StallEPO USB HW SetAddress USB HW EnableEP1 USB HW EPO Send Sends a packet on EPO USB HW ClearOutPacketRea TBD dy USB HW ClrSetupEnd TBD USB HW Init Description Sets default va
17. ommunication with real hardware is implemented with kernel mode drivers Normal applications run in user mode In user mode hardware access is not permitted All access to hardware is done through the operating system The operating system uses a kernel mode driver to access the actual hardware In other words Every piece of hardware requires one or more kernel mode drivers to function Windows supplies drivers for most common types of hardware but it does not come with a generic bulk communication driver It comes with drivers for certain classes of devices such as keyboard mouse and mass stor age device USB stick This makes it possible to connect a USB mouse and not hav ing to install a driver for it Windows alreadys has a driver for it Unfortunately there is no generic kernel mode driver which allows communication to any type of device in bulk mode This is why a kernel mode driver needs to be sup plied in order to work with the USB stack 4 1 2 Supported platforms The kernel mode driver works on all NT type platforms This includes Windows 2000 and Windows XP home and professional Windows NT itself does not support USB Win98 is not supported by the driver User s amp reference manual for uC USB Bulk 2004 Micrium Technologies Corporation 27 4 2 Installing the driver When your target device is plugged on your computer s USB port or when the com puter is first powered up after connecting the USBBulk device Windo
18. or registered trademarks of their respec tive holders Registration Please register the software via email This way we can make sure you will receive updates or notifications of updates as soon as they become available For registration please provide the following information Your full name and the name of your supervisor Your company name Your job title Your email address and telephone number Company name and address Your company s main phone number Your company s web site address Name and version of the product Please send this information to licensing micrium com Contact address Micrium Technologies Corporation 949 Crestview Circle Weston FL 33327 1848 U S A Phone 1 954 217 2036 FAX 1 954 217 2037 WEB www micrium com Email support micrium com Manual versions This manual describes the software version 1 00 If any error occurs please inform us and we will try to help you as soon as possible For further information on topics or routines not yet specified please contact us User s amp reference manual for uC USB Bulk 2004 Micrium Technologies Corporation Print date 9 3 04 Manual version Date By Explanation 1 0 040831 KG Initial Version Software versions Software i version Date By Explanation 1 0 040831 RS Initial Version User s amp reference manual for uC USB Bulk 2004 Micrium Technologies Corporation User s amp referen
19. r uC USB Bulk 2004 Micrium Technologies Corporation 38 User s amp reference manual for uC USB Bulk CHAPTER 5 Using the sample application 2004 Micrium Technologies Corporation 39 Chapter 6 Configuration Before you can use the stack in a product you need to configure the software for your application Configuring means modifying the files which reside in the sub directory Config User s amp reference manual for uC USB Bulk 2004 Micrium Technologies Corporation 40 6 1 6 2 CHAPTER 6 Configuration Configuration files The configuration files reside in the Config subdirectory of the firmware It contains 2 files File Contents Contains most configuration switches and some very basic USB setup options VSB Conf h such as Product Id and Vendor Id USB Descriptors c The USB descriptors as specified in the USB standard USB Conftf h The following table shows the available macros used for configuration Type Macro Default Explanation General required configuration N USB VENDOR ID 0x8765 USB IF assigned vendor Id 16 bits N USB PRODUCT ID 0x1234 arbitrary product Id 16 bits USB VENDOR ID Description Defines the Vendor Id of the target Type Numerical Example define USB VENDOR ID 0x8765 Additional information The vendor Id is assigned by the USB Implementers forum www usb org For tests you can use the d
20. rsonal vendor Id VID and product Id PID These changes have to be identical with the modifications in the configuration files USB Config h and USB Descriptors c to work correct The required modifications of the files USB Conf h and USB Descriptors c are described in the configuration chapter User s amp reference manual for uC USB Bulk 2004 Micrium Technologies Corporation 34 User s amp reference manual for uC USB Bulk CHAPTER 4 The Kernel mode driver PC 2004 Micrium Technologies Corporation 35 Chapter 5 Using the sample application Sample applications for both the target client and the PC host are supplied The sample application for the PC is supplied as source code incl MSVC6 workspace and as executable the sample application for the target is supplied as source code only The sample application can be used to test the correct installation and proper func tion of the USB BULK device The PC sample application first tries to establish a connection to the target by open ing the device If this fails an error message is shown If a connection can be established it exchanges data with the target testing the USB connection User s amp reference manual for uC USB Bulk 2004 Micrium Technologies Corporation 36 5 1 CHAPTER 5 Using the sample application Running the sample application The sample application is supplied in both source code and executable form in the SampleApp dire
21. s called enumeration User s amp reference manual for uC USB Bulk 2004 Micrium Technologies Corporation 14 CHAPTER 2 USB basics 2 3 Product vendor Ids A vendor Id can be obtained from the USB Implementers Forum Inc www usb org This is necessary only when you finish development of the product during the development phase you can use the vendor and product Ids supplied as sample User s amp reference manual for uC USB Bulk 2004 Micrium Technologies Corporation Chapter 3 Getting the target up The first step in getting the USB stack up and running is typically to compile it for your target system and to run it in the target system This chapter explains how to do this User s amp reference manual for uC USB Bulk 2004 Micrium Technologies Corporation 16 CHAPTER 3 Getting the target up 3 1 File structure The following table shows the contents of the Firmware subdirectories Directory Contents Application Contains the application program This is per default a modified echo server pP which can be used to test the stack Config Configuration file System CPU Hardware interface routines for CPUs which have been tested so far Operating systems dependent files which allow you to run the stack with differ Sete ent RTOSes or standalone USBBulk Contains the actual USB stack data Do not change the source code in this direc tory User s amp reference manual for uC USB Bulk 2
22. stack cic ieu exa td ouvre inh ceeds mete en na ae ER i ra vm Ve eda 24 The Kernel mode driver PC ccs e ide e CORE Ner Ne seb duse eau eR PO o Role Rn deed ead 25 4 1 General info about the Criver cccccecce cece ee nemen emnes 26 4 2 Installing the driver re Ro rete xxn ete ea te P e Pn e atta 27 4 3 Recompiling thie driver eraan dete Rp AEN RR REX REREXRER ERR R3 EX RE ER NREARK 31 4 4 Tite cinfefile ey Sete ote rU D XR a te et a ced Ge IPC n A D LU TUE etna 32 Using the sample application se uadit iae saidix es au sigs Ex ax s ne Fe iue uda od net uh oc ha d RR UC RE 35 5 1 Running the sample application csse nnn 36 5 2 Compiling the PC sample application ssseeseeeeen mmm 37 AON AVON s cens entes e co ap ME A DER AD Ap la d M EEUU MU DET IUE 39 6 1 Configuration files cce e ote ER Erb rubr debo rE de ret ao amet 40 6 2 USB Cont a3 9e otv AA A cating ELM eek M Er aA M Rad EAS ec E 40 6 3 USB DescriptOES C soc re exe Recent n eee ee te Cu du Rr ex ein Qe EX Ni 42 SUDDOIt 3a tinh batendeis chio ti tdt ccu T hs ad tuba Exi cout cub bec Rune At lu dao Se aes Ec uS DUuE 43 7 1 Problems with tool chain compiler linker eem 44 7 2 Problems with hardware driver cccccccccceccecceeeeuccseeeeecugeeeveuguueueveuueeresgganenys 44 7 3 Contacting SuppoOFt 2 2 pese cna sere ER ER RE CR EX dr EX FREE LEX EY YER C EXER Ge LY Edad 45 7 4 mio c 45
23. starts to copy when you click on the Next button Found New Hardware Wizard Completing the Found New Hardware Wizard SS M USB Bulk Device Windows has finished installing the software for this device To close this wizard click Finish Back At this point the installation is complete Click on the Finish button to dismiss the wizard User s amp reference manual for uC USB Bulk 2004 Micrium Technologies Corporation 31 4 3 Recompiling the driver You need Device Developer Kit NTDDK as well as an installation of Microsoft Visual C6 0 or net to recompile the driver The workspace is placed in the subdirectory Driver In order to open it double click the workspace file USBDriver dsw After double clicking it you should see the workspace similar to the screenshot below USBDriver Microsoft Visual C 2d xi dry Workspace USBDriver 1 project s cn Driver files PES dev c Driver rc Select Build Build USBBulk sys from the menu to compile and link the driver User s amp reference manual for uC USB Bulk 2004 Micrium Technologies Corporation 32 CHAPTER 4 The Kernel mode driver PC 4 4 The inf file The inf file is required for installation It looks as follows E USB BULK Device driver inf Version Signature S CHICAGOS Class USB ClassGUID 36FC9E60 C465 11CF 8056 444553540000 provider MfgName DriverVer 08 07 2003 SourceD
24. t disable count and disable interrupts USB X SignalRx Wake the task waiting for receiption USB X WaitRx Block the task until USB X SignalRx is called USB X SignalTx i Wake the task waiting for transmission USB X WaitTx Block the task until USB X SignalTx is called User s amp reference manual for uC USB Bulk 2004 Micrium Technologies Corporation 24 CHAPTER 3 Getting the target up 3 6 Generic bulk stack The generic bulk stack is contained in the directory USBBulk All C files in the direc tory should be included in the project compiled and linked as part of your project The files in this directory are maintained by MICRIUM and should not require modifi cation All files requiring modifications have been placed in other directories User s amp reference manual for uC USB Bulk 2004 Micrium Technologies Corporation 25 Chapter 4 The Kernel mode driver PC In order to communicate with a target client running the stack you have to install the USB Bulk kernel mode driver on your Windows PC Typically this is done as soon as the stack runs un your target hardware Installation of the driver as well as how to recompile it is explained in this chapter User s amp reference manual for uC USB Bulk 2004 Micrium Technologies Corporation 26 CHAPTER 4 The Kernel mode driver PC 4 1 General info about the driver 4 1 1 Why is a driver necessary In Microsoft s Windows operating systems all c
25. tested with different compilers We spend a lot of time on improving the quality of the code and we do our best to avoid compiler warn ings But the sensitivity of each compiler regarding warnings is different So we can not avoid compiler warnings for unknown tools Warnings you should not see This kind of warnings should not occur Function has no prototype Incompatible pointer types Variable used without having been initialized Illegal redefinition of macro Warnings you may see Warnings such as the ones below should be ignored Integer conversion may loose significant bits Statement not reached Meaningless statements were deleted during optimization Most compilers offers a way to supress selected warnings 7 1 3 Compiler errors We assume that the used compiler is ANSI C compatible If it is compatible there should be no problem to translate the code 7 1 4 Linker problems Undefined externals If your linker shows the error message Undefined external symbols please check if all required files have been included to the project 7 2 Problems with hardware driver If your tools are working fine but your display does not work may one of the following helps to find the problem Stack size to low Please make sure there have been configured enough stack We can not estimate exactly how much stack will be used by your configuration and with your compiler User s amp reference manual for uC GUI
26. uC USB Bulk USB Bulk Driver for Embedded Aplications Version 1 0 Manual Rev 0 Micripm Technologies Corporation www micrium com Empowering Embedded Systems Disclaimer Specifications written in this manual are believed to be accurate but are not guaran teed to be entirely free of error Specifications in this manual may be changed for functional or performance improvements without notice Please make sure your man ual is the latest edition While the information herein is assumed to be accurate Micrium Technologies Corporation the distributor assumes no responsibility for any errors or omissions and makes no warranties The distributor specifically disclaims any implied warranty of fitness for a particular purpose Copyright notice The latest version of this manual is available as PDF file in the download area of our website at www micrium com You are welcome to copy and distribute the file as well as the printed version You may not extract portions of this manual or modify the PDF file in any way without the prior written permission of Micrium Technologie Corpora tion The software described in this document is furnished under a license and may only be used or copied in accordance with the terms of such a license 2004 Micrium Technologies Corporation Weston Florida 33327 1848 U S A Trademarks Names mentioned in this manual may be trademarks of their respective companies Brand and product names are trademarks
27. vice e USB Device The wizard searches for suitable drivers in its driver database on your computer and in any of the following optional search locations that you specify To start the search click Next If you are searching on a floppy disk or CD ROM drive insert the floppy disk or CD before clicking Next Optional search locations CD ROM drives v Specify a location Microsoft Windows Update lt Back Cancel User s amp reference manual for uC USB Bulk 2004 Micrium Technologies Corporation 29 Found New Hardware Wizard xn e BE C NUSBBulksDriver 7 The wizard will ask you to help it find the correct driver files for the new device Use the directory navigator to select C USBBulk DRIVER or your chosen location and confirm with a click on the Next gt button Locate File History amp Desktop DN My Documents a My f omputer User s amp reference manual for uC USB Bulk 2004 Micrium Technologies Corporation 30 CHAPTER 4 The Kernel mode driver PC Found New Hardware Wizard Driver Files Search Results Na The wizard has finished searching for driver files for your hardware device ey The wizard found a driver for the following device oy USB Device Windows found a driver for this device To install the driver Windows found click Next SS c NusbbulkNdriverNusbbulk inf Cancel The wizard confirms your choice and
28. ws will detect the new hardware Found New Hardware Wizard Welcome to the Found New ey Hardware Wizard SS This wizard helps you install a device driver for a hardware device To continue click Next The wizard will ask you to help it find the correct driver files for the new device First select the Search for a suitable driver for my device recommended option then click on the Next gt button User s amp reference manual for uC USB Bulk 2004 Micrium Technologies Corporation 28 CHAPTER 4 The Kernel mode driver PC Found New Hardware Wizard Install Hardware Device Drivers Poa tase 4 device driver is a software program that enables a hardware device to work with ey an operating system This wizard will complete the installation for this device 2 USB Device 4 device driver is a software program that makes a hardware device work Windows needs driver files for your new device To locate driver files and complete the installation click Next What do you want the wizard to do Display a list of the known drivers for this device so that can choose a specific driver lt Back Cancel In the next step you need to select the Specify a location option and click on the Next button Found New Hardware Wizard fi Locate Driver Files ha Where do you want Windows to search for driver files SY Search for driver files for the following hardware de

Download Pdf Manuals

image

Related Search

Related Contents

RCA BRC10 User's Manual  User Manual For M1-A04 MDVR  TM-101S  Bachmann 317.006 mounting kit  Introduction - East Carolina University      BENUTZERHANDBUCH - Support  Perlick Commercial Back Bar BBRN User's Manual  Technisches Handbuch  

Copyright © All rights reserved.
Failed to retrieve file