avrdude-dev
[Top][All Lists]
Advanced

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

[avrdude-dev] [patch #7688] Implement parent programmers feature


From: Rene Liebscher
Subject: [avrdude-dev] [patch #7688] Implement parent programmers feature
Date: Wed, 14 Dec 2011 10:03:24 +0000
User-agent: Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.121 Safari/535.2

URL:
  <http://savannah.nongnu.org/patch/?7688>

                 Summary: Implement parent programmers feature
                 Project: AVR Downloader/UploaDEr
            Submitted by: rliebscher
            Submitted on: Mi 14 Dez 2011 10:03:23 GMT
                Category: None
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

Hi, 

this implements a parent programmer feature simliar to the implementation for
parts described in "bug #34302 Feature request : device configuration with
parent classes".

It does not save so much lines in the config file as the parts patch, but make
some entries simpler.

For example defining the stk200 programmers become:

programmer
  id    = "stk200";
  desc  = "STK200";
  type  = par;
  buff  = 4, 5;
  sck   = 6;
  mosi  = 7;
  reset = 9;
  miso  = 10;
;

# The programming dongle used by the popular Ponyprog
# utility.  It is almost similar to the STK200 one,
# except that there is a LED indicating that the
# programming is currently in progress.

programmer parent "stk200"
  id    = "pony-stk200";
  desc  = "Pony Prog STK200";
  pgmled = 8; 
;

# It is almost same as pony-stk200, except vcc on pin 5 to auto
# disconnect port (download on http://electropol.free.fr)
programmer parent "pony-stk200"
  id    = "frank-stk200";
  desc  = "Frank STK200";
  buff  = ; # delete buff pin assignment
  vcc   = 5;


As you can see the most lines does not need to be repeated. And the patch
allows to undefine previous set pins. (In frank-stk200 it removes pin 4,5 from
buff and add pin 5 to vcc.)

Another example would be "patch #7672 adding support for O-Link (FTDI based
JTAG) as programmer", which is 16 lines without the parent patch and now only
8 lines.

programmer parent "jtagkey"
  id         = "o-link";
  desc       = "O-Link, OpenJTAG from www.100ask.net";
  usbvid     = 0x1457;
  usbpid     = 0x5118;
  usbvendor  = "www.100ask.net";
  usbproduct = "USB<=>JTAG&RS232";
;


The patch changes the config_gram.y file to accept the empty pin definitions
and does combine some programmer rules in sub rules (pin definitions, usb
params)
Then it adds the necessary function pgm_dup in pgm.c. Other changes are mainly
documentation.

There is one change in order of execution: Now we have called initpgm for each
programmer defined in the config file. (However if they did allocate memory,
there was no corresponding call to free it. Only the selected programmer gets
its exithook called.)
This patch only sets the entry initpgm in the programmers structure. It has to
be called before using the programmer. This is done in main.c for the selected
programmer only. all other programmers stay uninitialized. If someone uses
avrdude as library he/she has to add this to the own code. 




    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Mi 14 Dez 2011 10:03:23 GMT  Name: programmer_parent.patch  Size: 22kB  
By: rliebscher

<http://savannah.nongnu.org/patch/download.php?file_id=24591>

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?7688>

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




reply via email to

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