bugAVR Downloader/UploaDEr - Bugs: bug #43137, Writing and reading incorrect...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #43137: Writing and reading incorrect pages when using jtagicemkI

Submitter:  None
Submitted:  Wed 03 Sep 2014 08:57:49 PM UTC
   
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Fixed Privacy:  Public
Assigned to:  joerg_wunsch Originator Name:  Joris Putcuyps
Originator Email:  -email is unavailable- Open/Closed:  Closed
Release:  None Programmer hardware: 
Device type: 

Sun 23 Nov 2014 08:57:46 PM UTC, comment #1: 

Thanks for the analysis.  Fixed in SVN r1345.

Joerg Wunsch <joerg_wunsch>
Group administrator
Wed 03 Sep 2014 08:57:49 PM UTC, original submission:  

When using Olimex jtagicemkI clone writing and reading fails.

Reading |                                                    | 0% 0.00savrdude: jtagmkI_paged_load(): timeout/error communicating with programmer (resp �)
avrdude: jtagmkI_paged_load(): timeout/error communicating with programmer (resp �)
avrdude: jtagmkI_paged_load(): timeout/error communicating with programmer (resp �)
avrdude: jtagmkI_paged_load(): timeout/error communicating with programmer (resp �)
avrdude: jtagmkI_read_byte(): timeout/error communicating with programmer (resp a)

Using r1333 from svn and gdb I managed to find the problem:
Both reading and writing is done using wrong calculation of pages and bytes in jtagmkI_paged_load() and jtagmkI_paged_write().

Patch:

===================================================================
--- jtagmkI.c (revision 1333)
+++ jtagmkI.c (working copy)
@@ -766,7 +766,7 @@
       return -1;
     }
 
-    if ((n_bytes-addr) < page_size)
+    if (n_bytes < page_size)
       block_size = n_bytes - addr;
     else
       block_size = page_size;
@@ -886,8 +886,8 @@
       return -1;
     }
 
-    if ((n_bytes-addr) < page_size)
-      block_size = n_bytes - addr;
+    if (n_bytes < page_size)
+      block_size = n_bytes;
     else
       block_size = page_size;
     avrdude_message(MSG_DEBUG, "%s: jtagmkI_paged_load(): "



Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by joerg_wunsch (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-11-23 joerg_wunsch StatusNone Fixed
        Assigned toNone joerg_wunsch
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.14-8eb0.
    Corresponding source code