I think the chThdSleepMilliseconds(1000) after the usbConnectBus helped Linux recognize the device. Nice to see this version works on all major platforms now. If nobody has any problems using the device, thats enough for me. I realized, the ST-Link on the device aswer to the 0xEE String descriptor with a malformed packet too. So either its not specified what should happen on an out of index String or its not spec compliant either...
The sighandler wasn't really that helpfull anyways. What exactly fails on your mac? Didn't it compile or did it crash on runtime? Finding a proper solution shutting down the program is still on my todo list.
And I'd say the same thing about this project. Its not hard to understand what I'm doing there, but since this is my first coding on any uC and the first time I do anything with USB, it was quite a learning curve for me. But I can say, I learned a lot about it.
Another thing I wanted to share, since I'm usually quite lazy, I wrote a small python script to generate those String descriptors for me:
http://pastebin.com/thji78WaI'm pretty sure someone has done that before, but I searched quite a while for an Descriptor Generator and didn't find any... I don't think I will finish the whole descriptor generator though.
If someones google foo is better then mine: Drop a note.
Also if anyone has tips to improve the speed...