> > > Hmm. I spent the evening (after your post) compiling and inspecting the > > USB/PICHID/* stuff and updated the source to compile without warnings > > "the right way" (except for EVELYN, which is harmless: it removed empty > > if-blocks). Find attached a more generally applicable Makefile, a patch > > to move sdcc keywords into the __-namespace (just recommended, > > cosmetic.patch) and another patch to remove all warnings (take address > > of proper object instead of casting blindly). However, they yield no > > difference in the output. > > > > I did some more debugging. I applied your patches and when I plug the device, > it > gets into DEFAULT state only. > > I would like to debug it - I enabled debugprintetc. I got following: > USB Test Startup > Enable the module > Device powered > Stall > Stall > Stall > I added debug messages into ProcessStandardRequest() printf("ProcessStandardRequest: %x %x %x %x %x %x %x %x %x %x %x\r\n", SetupPacket.bmRequestType, SetupPacket.bRequest, SetupPacket.wValue0, SetupPacket.wValue1, SetupPacket.wIndex0, SetupPacket.wIndex1, SetupPacket.wLength, SetupPacket.extra[0], SetupPacket.extra[1], SetupPacket.extra[2], SetupPacket.extra[3] );
and result is following (on Windows OS): Device powered WaitForSetupStage Bus reset WaitForSetupStage Bus reset ProcessStandardRequest: 39 26 5c 6b 39 2d 3fdd 45 3d 8 82 Stall WaitForSetupStage WaitForSetupStage Bus reset ProcessStandardRequest: 39 26 5c 6b 39 2d 3fdd 45 3d 8 82 Stall On Linux I got totally different ProcessStandardRequest: Device powered WaitForSetupStage Bus reset WaitForSetupStage Bus reset ProcessStandardRequest: 88 21 ff 1 b7 29 ffffb7ff 60 0 0 20 Default Std Request Stall WaitForSetupStage WaitForSetupStage WaitForSetupStage Bus reset ProcessStandardRequest: 88 21 ff 1 b7 29 ffffb7ff 60 0 0 20 Default Std Request Stall WaitForSetupStage The strange thing is that on Linux the addres went from 2 to 6 but "ProcessStandardRequest" message was always the same. I got different messages in /var/log/messages: Device descriptor read/64,error -71 Device not accepting address NUM, error -32 I feel like Ghost Buster - something strange... It looks like there is some problem with setupPacket structure. Does anybody have a clue what is going on ? Vaclav ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Sdcc-user mailing list Sdcc-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sdcc-user