avrdude-dev
[Top][All Lists]
Advanced

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

[avrdude-dev] universal part autodetection


From: Michael Mayer
Subject: [avrdude-dev] universal part autodetection
Date: Sat, 13 Dec 2003 20:09:02 +0100
User-agent: Mutt/1.5.4i

I reworked the way to autodetect the used part.

Yesterday Brian said:
> I kind've like the idea of auto detection, where applicable.  The
> STK500 is kind've special since you need to know certain part
> parameters to send to the STK500 before you can actually even enter
> programming mode in order to read the signature bytes.  However, it
> may be possible to tell the STK500 the part is any old chip, simply
> for the purposes of reading the signature bytes, then re-initialize
> the STK500 session using the actual part that we queried.

Now I'm doing it this way. After startup, the first part in the partlist is
chosen as a dummy part just to be able to initialize the programmer and read
the signature. The signature is evaluated, the right part is chosen and the
program continues as usual.

Now the overall structure of main.c is left intact and only minor changes
in avrpart.c and pgm.c are necessary. It is still needed to split
pgm->initialize into to parts, the real programmer initialization and the
selection of the used part.

Now it should be possible to get part autodetection working for all types of
programmers in a very easy way. FYI I send a patch against the latest cvs
version from 2ed Dec. Dispite it works for me, this patch is not a clean one,
it is not intended to be applied to your "real" sources. I just want to show
you the way I'm doing autodetection now and ask for comments about it.

  Michael



-- 
-----BEGIN GEEK CODE BLOCK------
Version: 3.12
GCS/E d-(+) s:- a32 C++ UL+++ P++ L+++>$ E- W++ N++ !o K? w-- !O M-
!V !PS PE Y+ PGP+ t+ 5 X+ R- tv-- b++ !DI D- G e+++ h--- r++> y+++ 
------END GEEK CODE BLOCK------

Attachment: patch-autodetection1.gz
Description: Binary data


reply via email to

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