1. The sys/types is part of the newlib include files. it is used to in the function _sbrk_r (malloc). It is not required for ADS as this has its own heap allocation function. 2. ADS has its own retarget function, just use those to replace the newlib retarget fucntions. 3. See above, not required - only for newlib 4. usbser.sys is the only driver required for 2000/XP, the others are for systems that do not have a virtual com driver, eg. win98. Regards sjo
I've replaced the function _write_r() with fputc() to retarget, and the function _read_r() with fgetc().But still I couldn't make my USBcdc work.When the USB device enumeration was completed, I installed the driver usbser.sys, so I could see a new serial port 'COM3' on my PC, but if I tried to open it, I was always told that there was something wrong with COM3 or it was being used by another application. So I used USB Analyser to see what really happened in detail: 1.the PC sent 'GET_LINE_CODING' and my USB device replied well; 2.the PC sent 'SET_LINE_CODING' and device replied with zero packet; 3.the PC sent 'SET_CONTROL_LINE_STATE' and device replied with zero packet. The first three steps all happened on EndPoint0. Then the PC started to send IN packets on EndPoint1(the interrupt type) and the USB device always replied 'NAK' because EP1_Callback did nothing. I don't know whether this demo is completed one.Could you help me? Thank a lot! Regards Dan