avrdude-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avrdude-dev] [bug #35261] avrftdi uses wrong interface in avrftdi_paged


From: Rene Liebscher
Subject: [avrdude-dev] [bug #35261] avrftdi uses wrong interface in avrftdi_paged_(write|load)
Date: Sat, 07 Jan 2012 10:21:55 +0000
User-agent: Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.63 Safari/535.7

URL:
  <http://savannah.nongnu.org/bugs/?35261>

                 Summary: avrftdi uses wrong interface in
avrftdi_paged_(write|load)
                 Project: AVR Downloader/UploaDEr
            Submitted by: rliebscher
            Submitted on: Sa 07 Jan 2012 10:21:55 GMT
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
         Originator Name: René Liebscher
        Originator Email: address@hidden
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

The avrftdi uses the old interface without the base address.

This results at reading in not reading the last page and extreme read times.
(1000s for 32KByte flash)

It used the old interface.

 static int avrftdi_paged_write(PROGRAMMER * pgm, AVRPART * p, AVRMEM * m, int
page_size, int n_bytes)

But it should use:
 
 static int avrftdi_paged_write(PROGRAMMER * pgm, AVRPART * p, AVRMEM * m,
unsigned int page_size, unsigned int addr, unsigned int n_bytes)

So it interprets the addr as length. As the pages are read sequentially, the
address is incremented with page_size and the current implementation always
read all already read pages again (as it see incrementing n_bytes values)

For m pages it reads here the first page (m-1) times, the second (m-2) times,
and so on. The last page is not read at all.

The attached patch tries to fix this. It reads now all memory and with the
original speed (3s for 32 KByte).

But on my Windows XP I get now a segmentation fault at exit (in avrftdi_close
at ftdi_deinit). I'm not sure if this comes from the patch. So better someone
else have a look at it.



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Sa 07 Jan 2012 10:21:55 GMT  Name: avrftdi.diff  Size: 5kB   By:
rliebscher

<http://savannah.nongnu.org/bugs/download.php?file_id=24757>

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?35261>

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]