Follow-up Comment #3, patch #7896 (project avrdude):

It stops at that point under Linux since it segfaults.  This
is because there are zero endpoint descriptors present, so

found->config->interface->altsetting->endpoint

equals 0 here:


  memcpy(&dfu->endp_desc, found->config->interface->altsetting->endpoint,
    sizeof(dfu->endp_desc));


If I conditionalize that memcpy() on ...->endpoint being != 0,
the Linux behaviour resembles the one under FreeBSD:


avrdude: Warning: USB bDeviceClass = 255 (expected 0)
avrdude: Warning: USB bDeviceSubClass = 1 (expected 0)
avrdude: Warning: USB bInterfaceClass = 0 (expected 255)
avrdude: Warning: Failed to read USB device string 1: error sending control
message: Broken pipe
avrdude: Warning: Failed to read USB device string 2: error sending control
message: Broken pipe
avrdude: Error: DFU_DNLOAD failed: error sending control message: Broken pipe
avrdude: Error: Failed to get DFU status: error sending control message:
Broken pipe
avrdude: Error: Failed to set memory unit 0x05 (signature)
avrdude: AVR device initialized and ready to accept instructions

Reading |                                                    | 0%
0.00savrdude: error reading signature data for part "ATmega32U2", rc=-1
avrdude: error reading signature data, rc=-1

avrdude done.  Thank you.


    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?7896>

_______________________________________________
  Nachricht gesendet von/durch Savannah
  http://savannah.nongnu.org/


_______________________________________________
avrdude-dev mailing list
avrdude-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/avrdude-dev

Reply via email to