patchAVR Downloader/UploaDEr - Patches: patch #7688, Implement parent programmers...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #7688: Implement parent programmers feature

Submitter:  Rene Liebscher <rliebscher>
Submitted:  Wed 14 Dec 2011 10:03:23 AM UTC
   
 
Category:  None Priority:  5 - Normal
Status:  Ready For Test Privacy:  Public
Assigned to:  rliebscher Open/Closed:  Closed

Sun 22 Jan 2012 12:32:29 PM UTC, comment #1: 

Added in svn revision 1045

Rene Liebscher <rliebscher>
Group Member
Wed 14 Dec 2011 10:03:23 AM UTC, original submission:  

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.
+verbatim+
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.

Rene Liebscher <rliebscher>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #24618:  programmer_parent.patch added by rliebscher (12KiB - text/x-patch - updated patch based on svn revision 1023)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rliebscher (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-09-03 rliebscher Open/ClosedOpen Closed
    2012-01-22 rliebscher StatusNone Ready For Test
    2011-12-17 rliebscher Attached File- Added programmer_parent.patch, #24618
        Assigned toNone rliebscher
    2011-12-17 rliebscher Attached File#24591 Removed
    2011-12-14 rliebscher Attached File- Added programmer_parent.patch, #24591

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code