avrdude-dev
[Top][All Lists]
Advanced

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

[avrdude-dev] RFC: fuse bit handling from a file


From: Joerg Wunsch
Subject: [avrdude-dev] RFC: fuse bit handling from a file
Date: Thu, 13 Feb 2003 10:08:06 +0100
User-agent: Mutt/1.2.5i

In a recent discussion on AVRfreaks, it became apparent that people
are interested in a way to specify fuse bits from somewhere within
their project.  For other MCU families, the vendor has already
suggested a method to accomplish this (e. g. the PIC has something
that is called "config word" and is simply bound to a predefined flash
address outside the normal flash range).  Atmel unfortunately didn't,
so it's somewhat our turn to develop a method.  We might even attempt
to coordinate this via Atmel with other compiler manufacturers in case
there is some interest...

Given how many people still stumple across the default M103 compat
fuse on the M128, i think it would be a Good Thing[tm].

I thought of an implementation that uses a different section in the
object file, say ".fuses", along with a set of macros that can handle
them symbolically.  (The actual symbols need to go into the respective
<avr/ioXXX.h> file since they are very device-dependant.)  This
section would be 1 through 3 bytes long, depending on the device (fuse
bits, high fuse bits, extended fuse bits e. g. on the M128).

I admit i've never been concerned whether the fuse bit position for
serial programming is identical with the one for parallel programming
and/or for STK protocol though...  I. e., could the same hex value
really be used for all three methods?

Anyway, in order to make this happen, we also need programmer support
for it.  It seems not very many of the programmers around in the
windows world could handle this already, but avrdude can.  However, by
now, all three possible fuse bytes need to be specified in a file by
its own since they are covered by a separate memory space in avrdude.
I'd like to see an additional "meta-fuse" memory space that allows it
to use a single source (or destination) file for all (up to) three
fuses.  Does this seem to be feasible?

If we agree, we unfortunately first need to coordinate this with Marek
since the linker scripts need to be updated to cover the new section
(thus a Cc to Marek).  Once this is in place, we could add the
definitions to avr-libc, and propagate the feature.
-- 
J"org Wunsch                                           Unix support engineer
address@hidden        http://www.interface-systems.de/~j/




reply via email to

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