Add the "stk500generic" programmer that auto-probes for STK500

either firmware version 1 or 2.
* Makefile.am (avrdude_SOURCES): add the new files
stk500generic.c and stk500generic.h.
* avrdude.conf.in: Add the stk500generic programmer type, and
change the "stk500" entry to point to this programmer.
* config_gram.y: Add the stk500generic keyword.
* lexer.l: (Ditto.)
* stk500.c: Change the stk500v1 code to not call exit()
prematurely when failing to open the programmer, but instead
return an error status.
* stk500generic.c: (New file.) Stub programmer implementation.
Probe for either stk500v1 or stk500v2, and adjust the current pgm
appropriately.
* stk500generic.h: (New file.) Declare the public interface(s)
of stk500generic.c.
* doc/avrdude.texi: Document the changed behaviour of stk500.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@663 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
Joerg Wunsch
2006-09-19 22:27:30 +00:00
parent 9747c576a3
commit bf388ff428
9 changed files with 215 additions and 44 deletions

View File

@@ -36,6 +36,7 @@
#include "pgm.h"
#include "stk500.h"
#include "stk500v2.h"
#include "stk500generic.h"
#include "avr910.h"
#include "butterfly.h"
#include "usbasp.h"
@@ -126,6 +127,7 @@ static int parse_cmdbits(OPCODE * op);
%token K_STK500HVSP
%token K_STK500PP
%token K_STK500V2
%token K_STK500GENERIC
%token K_AVR910
%token K_USBASP
%token K_BUTTERFLY
@@ -393,6 +395,12 @@ prog_parm :
}
} |
K_TYPE TKN_EQUAL K_STK500GENERIC {
{
stk500generic_initpgm(current_prog);
}
} |
K_TYPE TKN_EQUAL K_AVR910 {
{
avr910_initpgm(current_prog);