From 0ae1b3957e5c4f6206764ec5bb7295092d8af481 Mon Sep 17 00:00:00 2001 From: joerg_wunsch Date: Thu, 11 Feb 2010 16:15:56 +0000 Subject: [PATCH] Add forgotten ChangeLog-{2007,2008,2009} to EXTRA_DIST, so they end up in the distribution tarball. git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@937 81a1dc3b-b13d-400b-aceb-764788c761c2 --- Makefile.am | 7 ++++++- avrdude.conf.in | 10 ++++++++++ config_gram.y | 39 +++++++++++++++++++++++++++++++++++++++ configure.ac | 10 ++++++++++ lexer.l | 5 +++++ pgm.h | 3 +++ 6 files changed, 73 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 9a68852d..bb531e82 100644 --- a/Makefile.am +++ b/Makefile.am @@ -27,6 +27,9 @@ EXTRA_DIST = \ ChangeLog-2002 \ ChangeLog-2003 \ ChangeLog-2004-2006 \ + ChangeLog-2007 \ + ChangeLog-2008 \ + ChangeLog-2009 \ avrdude.1 \ avrdude.spec \ bootstrap @@ -53,7 +56,7 @@ avrdude_CFLAGS = @ENABLE_WARNINGS@ libavrdude_a_CFLAGS = @ENABLE_WARNINGS@ -avrdude_LDADD = $(top_builddir)/$(noinst_LIBRARIES) @LIBUSB@ @LIBHID@ -lm +avrdude_LDADD = $(top_builddir)/$(noinst_LIBRARIES) @LIBUSB@ @LIBFTDI@ @LIBHID@ -lm bin_PROGRAMS = avrdude @@ -84,6 +87,8 @@ libavrdude_a_SOURCES = \ avr910.c \ avr910.h \ avrdude.h \ + avrftdi.c \ + avrftdi.h \ avrpart.c \ avrpart.h \ bitbang.c \ diff --git a/avrdude.conf.in b/avrdude.conf.in index 24f30320..12e07ed5 100644 --- a/avrdude.conf.in +++ b/avrdude.conf.in @@ -320,6 +320,16 @@ programmer type = arduino; ; +programmer + id = "avrftdi"; + desc = "FT2232D based generic programmer"; + type = avrftdi; + usbvid = 0x0403; + usbpid = 0x6010; + usbvendor = ""; + usbproduct = ""; +; + programmer id = "avrisp"; desc = "Atmel AVR ISP"; diff --git a/config_gram.y b/config_gram.y index 2ff8452a..9ee954b3 100644 --- a/config_gram.y +++ b/config_gram.y @@ -82,6 +82,7 @@ static int parse_cmdbits(OPCODE * op); %token K_PAGED %token K_ARDUINO +%token K_AVRFTDI %token K_BAUDRATE %token K_BS2 %token K_BUFF @@ -150,6 +151,10 @@ static int parse_cmdbits(OPCODE * op); %token K_AVR910 %token K_USBASP %token K_USBTINY +%token K_USBPID +%token K_USBPRODUCT +%token K_USBVENDOR +%token K_USBVID %token K_BUTTERFLY %token K_TYPE %token K_VCC @@ -432,6 +437,12 @@ prog_parm : } } | + K_TYPE TKN_EQUAL K_AVRFTDI { + { + avrftdi_initpgm(current_prog); + } + } | + K_TYPE TKN_EQUAL K_BUSPIRATE { { buspirate_initpgm(current_prog); @@ -591,6 +602,34 @@ prog_parm : } } | + K_USBVID TKN_EQUAL TKN_NUMBER { + { + current_prog->usbvid = $3->value.number; + } + } | + + K_USBPID TKN_EQUAL TKN_NUMBER { + { + current_prog->usbpid = $3->value.number; + } + } | + + K_USBVENDOR TKN_EQUAL TKN_STRING { + { + strncpy(current_prog->usbvendor, $3->value.string, PGM_USBSTRINGLEN); + current_prog->usbvendor[PGM_USBSTRINGLEN-1] = 0; + free_token($3); + } + } | + + K_USBPRODUCT TKN_EQUAL TKN_STRING { + { + strncpy(current_prog->usbproduct, $3->value.string, PGM_USBSTRINGLEN); + current_prog->usbproduct[PGM_USBSTRINGLEN-1] = 0; + free_token($3); + } + } | + K_BAUDRATE TKN_EQUAL TKN_NUMBER { { current_prog->baudrate = $3->value.number; diff --git a/configure.ac b/configure.ac index 595e6fa1..9f51b29c 100644 --- a/configure.ac +++ b/configure.ac @@ -66,6 +66,16 @@ if test x$have_libusb = xyes; then fi AC_SUBST(LIBUSB, $LIBUSB) +AH_TEMPLATE([HAVE_LIBFTDI], + [Define if FTDI support is enabled via libftdi]) +AC_CHECK_LIB([ftdi], [ftdi_init], [have_libftdi=yes]) +if test x$have_libftdi = xyes; then + LIBFTDI="-lftdi" + AC_DEFINE([HAVE_LIBFTDI]) +fi +AC_SUBST(LIBFTDI, $LIBFTDI) + + # Checks for header files. AC_CHECK_HEADERS([limits.h stdlib.h string.h]) AC_CHECK_HEADERS([fcntl.h sys/ioctl.h sys/time.h termios.h unistd.h]) diff --git a/lexer.l b/lexer.l index 926aca1c..6355b51c 100644 --- a/lexer.l +++ b/lexer.l @@ -120,6 +120,7 @@ allowfullpagebitstream { yylval=NULL; return K_ALLOWFULLPAGEBITSTREAM; } arduino { yylval=NULL; return K_ARDUINO; } avr910 { yylval=NULL; return K_AVR910; } avr910_devcode { yylval=NULL; return K_AVR910_DEVCODE; } +avrftdi { yylval=NULL; return K_AVRFTDI; } usbasp { yylval=NULL; return K_USBASP; } usbtiny { yylval=NULL; return K_USBTINY; } bank_size { yylval=NULL; return K_PAGE_SIZE; } @@ -197,6 +198,10 @@ stk600 { yylval=NULL; return K_STK600; } stk600hvsp { yylval=NULL; return K_STK600HVSP; } stk600pp { yylval=NULL; return K_STK600PP; } type { yylval=NULL; return K_TYPE; } +usbpid { yylval=NULL; return K_USBPID; } +usbproduct { yylval=NULL; return K_USBPRODUCT; } +usbvendor { yylval=NULL; return K_USBVENDOR; } +usbvid { yylval=NULL; return K_USBVID; } vcc { yylval=NULL; return K_VCC; } vfyled { yylval=NULL; return K_VFYLED; } diff --git a/pgm.h b/pgm.h index 2bd125be..2d1671f1 100644 --- a/pgm.h +++ b/pgm.h @@ -36,6 +36,7 @@ #define PGM_DESCLEN 80 #define PGM_PORTLEN PATH_MAX #define PGM_TYPELEN 32 +#define PGM_USBSTRINGLEN 256 typedef enum { EXIT_VCC_UNSPEC, @@ -60,6 +61,8 @@ typedef struct programmer_t { int ppidata; int ppictrl; int baudrate; + int usbvid, usbpid; + char usbvendor[PGM_USBSTRINGLEN], usbproduct[PGM_USBSTRINGLEN]; double bitclock; /* JTAG ICE clock period in microseconds */ int ispdelay; /* ISP clock delay */ union filedescriptor fd;