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

Submitted by:  None
Submitted on:  Wed 03 Sep 2014 08:57:49 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalItem Group: None
Status: FixedPrivacy: Public
Assigned to: Joerg Wunsch <joerg_wunsch>Originator Name: Joris Putcuyps
Originator Email: -unavailable-Open/Closed: Closed
Release: NoneProgrammer 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>
Project AdministratorIn charge of this item.
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

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 23 Nov 2014 08:57:46 PM UTCjoerg_wunschStatusNone=>Fixed
      Assigned toNone=>joerg_wunsch
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1