bugAVR Downloader/UploaDEr - Bugs: bug #55462, wrong programmer id check in...

 
 

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

bug #55462: wrong programmer id check in jtag3_getsync() and jtag3_close()

Submitter:  None
Submitted:  Sun 13 Jan 2019 07:27:46 AM UTC
   
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Fixed Privacy:  Public
Assigned to:  None Originator Name:  Albert ARIBAUD
Originator Email:  -email is unavailable- Open/Closed:  Closed
Release:  SVN snapshot Programmer hardware:  xplainedmini_updi
Device type:  attiny416

Sat 27 Nov 2021 11:14:26 PM UTC, comment #1: 

Fixed, see patch #9757

Joerg Wunsch <joerg_wunsch>
Group administrator
Sun 13 Jan 2019 07:27:46 AM UTC, original submission:  

As described in

    http://lists.nongnu.org/archive/html/avrdude-dev/2018-01/msg00007.html

xplainedmini_updi should skip calling jtag3_edbg_prepare() and jtag3_edbg_signoff().

There is code to this effect in jtag3_getsync() and jtag3_close().

However both jtag3_getsync() and jtag3_close() directly compare pgm->id to "xplainedmini_updi", which fails on Ubuntu (and, I suspect, on (m)any x86_64 Linux systems as well) because pgm->id does not actually point to the programmer's name, and must be accessed through ldata() and lfirst() as it is in other parts of avrdude.

This lack of ldata() and lfirst() causes jtag3_edbg_prepare() to actually be called, making avrdude unable to use the attiny xplained nano, which uses the xplainedmini_updi programmer.

Fix:

In both jtag3_getsync() and jtag3_close(), the line

    if (strcmp(pgm->id, "xplainedmini_updi") != 0) {

should be rewritten as

    if (strcmp(ldata(lfirst(pgm->id)), "xplainedmini_updi") != 0) {

This fix was tested on Xubuntu 18.04 with trunk.

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 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-11-27 joerg_wunsch StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code