Hi to all.
I'm in process of learning USB for ARM devices. I'm currently using NXP, STM32 and TI devices but I've never had to implement USB functionality until now. Anyway after some research I've found that there are so many USB libraries out there and it gets a little complicate to decide what to use in order to learn and re-use in the future. Also I think that portability with also other compilers would be a benefit.
For example there is the old USB-Kernel (V1.20), the RL-USB library (RV31), the new MDKv5 RL-USB and then the vendor specific libraries like FS-USB (for STM32) e.t.c. While playing around with these libraries I've found that the new RTX RL-USB gets too obscure and complicated for my taste and also gets more complicated when using IAD and composite devices. Then the RL-USB (RV31) needs the Keil usb_lib which is a little restrictive and not portable for other compilers. Finally vendor specific libraries are always like a new beast to fight every time you want to do a new project and you've forget how you used it the last time. Also regarding complicated libraries, if something goes wrong then it's very difficult to debug and find the problem.
I like things to be simple, therefore the old USB-Kernel seems a better choice, it's simple, close to the lower level and it seems that it can be used with an RTOS (like RTX of FreeRTOS) without a problem, as it is interrupt driven. Also it seems easier to port to other ARM devices. Is there something I'm missing? Why should I prefer a more obscure and complicated library than that? What the other solutions has to offer that is better than this?
I would like to know other opinions. What is your experience? What makes a lib better than other?
I know it seems more like a philosophical question but I think it's deeply technical for dinosaurs like myself who hate complicated things.
Thank you in advance, Dimitris.
Well after some tests I prefer the -old- USB-Kernel V1.20 from Keil. All the new libraries are too much obscure and feels like bloatware.
Also I've come across on a very weird issue with Keil. I've used the same code (with some minor modifications depended on the compiler) for a USB composite device (ADC+CDC, IAD) with an STM32F103C8. The compiled binary from Keil it just didn't work as the USB couldn't enumerate at all (no endpoints interrupts triggered). On the other hand with GNU everything worked like a charm. Very weird problem. Also when using a single usb device ADC or CDC with Keil it worked.
I'm afraid that Keil by default uses optimizations to minimize the binary size. That's not good. I prefer always to have the control.