avrdude-dev
[Top][All Lists]
Advanced

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

[avrdude-dev] [bug #38580] Current svn head, xmega and fuses, all fuses


From: Claus-Justus Heine
Subject: [avrdude-dev] [bug #38580] Current svn head, xmega and fuses, all fuses tied to fuse0
Date: Sun, 24 Mar 2013 13:22:58 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:19.0) Gecko/20100101 Firefox/19.0

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

                 Summary: Current svn head, xmega and fuses, all fuses tied to
fuse0
                 Project: AVR Downloader/UploaDEr
            Submitted by: rotdrop
            Submitted on: So 24 Mär 2013 13:22:56 GMT
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
         Originator Name: Claus-Justus Heine
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

The current head version of the svn trunk of avrdude contains a bug which ties
all access to fuses on the XMega parts to fuse0, at least when using the jtag3
in PDI mode. However, I suspect that at least with the jtag2 ICE the same
problem exists.

The point is that jtag3_read_byte() uses


strncmp("fuse", ..., strlen("fuse")


However, any offset definition from /etc/avrdude.conf is ignored, so strncmp()
very happily return 0 for fuse0 ... fuse5, but the address record stays at
zero, though the base-address used with the programmer is that for fuse0.

The attached patch addresses this issue with two different approaches:

1 Insert a "fuses" memory section into the part definition in avrdude.conf.
Fuses can then be programmed and read back as a usual memory region. This may
not be too clever, as normally there is no fuse3 for the xmega. But of course,
one could insert a fusesA and a fusesB region which leave out any holes in the
fuses address range.

2 Change the individual programmer-driver to really check for the name fuse0
... fuse5. To do so XXX_read_byte() and XXX_write_byte() have to be changed
appropriately. The attached patch proposes one possible hack-around for the
jtag3 programmer. If that patch is accepted, the source code for all other
affected programmers could be changed accordingly.

Best,

Claus




    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: So 24 Mär 2013 13:22:56 GMT  Name: avrdude-9999-r1139-fuses.patch 
Size: 2kB   By: rotdrop
Patch against svn r1139
<http://savannah.nongnu.org/bugs/download.php?file_id=27670>

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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