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()

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

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

 

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 None (Submitted the item)
  •  

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

    Only logged-in users can vote.

     

     

     

    No changes have been made to this item

    Back to the top


    Powered by Savane 3.5