That is great information, Paul. In my opinion, it should be added to the documentation (the minimum SP for windows, the minimum os version for mac). A classic arduino probably works on almost every windows version, for the leonardo, this appears not to be the case.
So the right thing to do for me would be to get SP3. But I should have done that a couple of years ago, now it may not be worth the effort and the risk that this old pc does not survive the upgrade. On the other hand that pc still works well and hapilly deals with my duemilanove, pic18F4550 (also cdc/acm) and the leo's bootloader.
So I thought my Leonardo sketches should work as well if I ran them as "serial only" usb devices (non composite, so no iad needed).
The code allows to do this with only a few ifdefs:
#if defined HID_ENABLED && defined CDC_ENABLED
IADDescriptor iad; // Only needed on compound device
const CDCDescriptor _cdcInterface =
I compiled the sketch again and made a .inf file by copying the UNO's in file and adjusting the PID. This made the sketch run on the old xp sp2 box. I also managed to burn hex files via ArduinoISP into an attiny on the same pc.
I hope this does not sound like cursing to the developers who have put lots of effort to make composite devices work. But I believe this idea makes sense:
- it is simpler.
- because of this, it does work on all these old os'es without ugly hacks or spec violations.
- in many occasions you only need either one of the interfaces, not both.
- you win about 1K code size (dropping hid support).
Thanks a lot for sharing this. I started to investigate the problem but could not make sense of it. Windows installed the driver without error but the resulting behavior was really weird.