First stab at an implementation of the STK500 parallel programming

feature (v2 firmware only), named "stk500pp".  Still not yet
complete: EEPROM writes not working, documentation missing, only
ATmega16 parameters available in avrdude.conf.in, some parameters
not yet implemented.

* avrdude.conf.in: Add sample parameters for PP mode to ATmega16.
* avrpart.h: Add the parallel programming control parameters.
* avrpart.c: (Ditto.)
* config_gram.y: Add stk500pp configuration grammar.
* lexer.l: Add stk500pp token recognition.
* stk500v2.h: Add declaration for stk500pp_initpgm().
* stk500v2.c: Add stk500pp implementation.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@587 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
joerg_wunsch
2006-07-16 21:30:14 +00:00
parent 0970c1295e
commit 39ecfefa7d
8 changed files with 767 additions and 3 deletions

View File

@@ -1,6 +1,7 @@
/*
* avrdude - A Downloader/Uploader for AVR device programmers
* Copyright (C) 2003-2004 Brian S. Dean <bsd@bsdhome.com>
* Copyright (C) 2006 Joerg Wunsch <j@uriah.heep.sax.de>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -62,6 +63,12 @@ enum { /* these are assigned to reset_disposition of AVRPART */
RESET_IO /* reset pin might be configured as an I/O pin */
};
enum ctl_stack_t {
CTL_STACK_NONE, /* no control stack defined */
CTL_STACK_PP, /* parallel programming control stack */
CTL_STACK_HVSP /* high voltage serial programming control stack */
};
/*
* serial programming instruction bit specifications
*/
@@ -85,6 +92,7 @@ typedef struct opcode {
#define AVR_DESCLEN 64
#define AVR_IDLEN 32
#define CTL_STACK_SIZE 32
typedef struct avrpart {
char desc[AVR_DESCLEN]; /* long part name */
char id[AVR_IDLEN]; /* short part name */
@@ -110,6 +118,19 @@ typedef struct avrpart {
int postdelay; /* stk500 v2 xml file parameter */
int pollmethod; /* stk500 v2 xml file parameter */
enum ctl_stack_t ctl_stack_type; /* what to use the ctl stack for */
unsigned char controlstack[CTL_STACK_SIZE]; /* stk500v2 PP/HVSP ctl stack */
int ppenterstabdelay; /* stk500 v2 pp mode parameter */
int progmodedelay; /* stk500 v2 pp mode parameter */
int latchcycles; /* stk500 v2 pp mode parameter */
int togglevtg; /* stk500 v2 pp mode parameter */
int poweroffdelay; /* stk500 v2 pp mode parameter */
int resetdelayms; /* stk500 v2 pp mode parameter */
int resetdelayus; /* stk500 v2 pp mode parameter */
int ppleavestabdelay; /* stk500 v2 pp mode parameter */
int resetdelay; /* stk500 v2 pp mode parameter */
unsigned char idr; /* JTAG ICE mkII XML file parameter */
unsigned char rampz; /* JTAG ICE mkII XML file parameter */
unsigned char spmcr; /* JTAG ICE mkII XML file parameter */