I’m playing with the usb serial port code from FreeRTOS V5.0.2 / lwIP_Demo_Rowley_ARM7 and I think there’s a couple of things in the descriptors.h which might be improved.
The serial port can be made to work with linux if you change the value of the interface protocol (the comment is bInterfaceProtocol) in the config descriptor (pxConfigDescriptor) to something valid. It has a value of 0, which I don’t think the spec allows. By making it 1, linux will work. In ubuntu, my device is now available as a serial port named /dev/ttyACM0 . Windows is unaffected, except that you might have to reinstall the driver if you’ve used the old value.
That is, change the value in descriptors.h line 117 from: 0x00 to 0x01 .
Also, I think the values for the vendor id and product id are confusing. The atmel USB vendor id is 0x03EB. In descriptors.h and the FreeRTOSCDC.inf for windows this value has the wrong byte order. This will work fine for the demo, but its confusing as an example (if you did mean to use the atmel vendor id).
— C:/FreeRTOSV5.0.2-orig/Demo/lwIP_Demo_Rowley_ARM7/USB/descriptors.h Fri May 30 16:27:00 2008
+++ C:/FreeRTOSV5.0.2/Demo/lwIP_Demo_Rowley_ARM7/USB/descriptors.h Wed Jun 25 11:47:19 2008
@@ -114,8 +114,8 @@
0x00, /* bDeviceSubclass: */
0x00, /* bDeviceProtocol: */
0x08, /* bMaxPacketSize0 */
- 0x03, 0xEB, /* idVendorL */
- 0x20, 0x09, /* idProductL */
+ 0xEB, 0x03, /* idVendorL */
+ 0x09, 0x20, /* idProductL */
0x10, 0x01, /* bcdDeviceL */
usbMANUFACTURER_STRING, /* iManufacturer */
usbPRODUCT_STRING, /* iProduct */
@@ -148,7 +148,7 @@
0x01, /* bNumEndpoints */
0x02, /* bInterfaceClass: Comm Interface Class */
0x02, /* bInterfaceSubclass: Abstract Control Model*/
- 0x00, /* bInterfaceProtocol */
+ 0x01, /* bInterfaceProtocol */
usbINTERFACE_STRING,/* iInterface */
/* Header Functional Descriptor */