2001-10-15 02:46:59 +00:00
|
|
|
/*
|
2003-02-08 04:17:25 +00:00
|
|
|
* avrdude - A Downloader/Uploader for AVR device programmers
|
2004-12-22 01:52:45 +00:00
|
|
|
* Copyright (C) 2000-2004 Brian S. Dean <bsd@bsdhome.com>
|
2006-07-16 21:30:14 +00:00
|
|
|
* Copyright (C) 2006 Joerg Wunsch <j@uriah.heep.sax.de>
|
2001-10-15 02:46:59 +00:00
|
|
|
*
|
2003-02-06 20:02:33 +00:00
|
|
|
* 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
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
2001-10-15 02:46:59 +00:00
|
|
|
*
|
2003-02-06 20:02:33 +00:00
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
2001-10-15 02:46:59 +00:00
|
|
|
*
|
2003-02-06 20:02:33 +00:00
|
|
|
* You should have received a copy of the GNU General Public License
|
2012-11-20 14:03:50 +00:00
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2001-10-15 02:46:59 +00:00
|
|
|
*/
|
|
|
|
|
2001-10-14 23:17:26 +00:00
|
|
|
/* $Id$ */
|
|
|
|
|
|
|
|
%{
|
|
|
|
/* need this for the call to atof() below */
|
|
|
|
#include <math.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <errno.h>
|
|
|
|
#include <limits.h>
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/stat.h>
|
|
|
|
|
2022-01-10 13:51:48 +00:00
|
|
|
#include "ac_cfg.h"
|
2007-01-24 21:07:54 +00:00
|
|
|
#include "avrdude.h"
|
2014-05-19 10:01:59 +00:00
|
|
|
#include "libavrdude.h"
|
2014-06-17 20:08:28 +00:00
|
|
|
#include "config.h"
|
2007-01-24 21:07:54 +00:00
|
|
|
|
2003-02-14 20:34:03 +00:00
|
|
|
#include "config_gram.h"
|
2001-10-14 23:17:26 +00:00
|
|
|
|
2012-01-31 17:03:43 +00:00
|
|
|
#ifndef YYERRCODE
|
|
|
|
#define YYERRCODE 256
|
|
|
|
#endif
|
|
|
|
|
2001-10-14 23:17:26 +00:00
|
|
|
%}
|
|
|
|
|
|
|
|
DIGIT [0-9]
|
|
|
|
HEXDIGIT [0-9a-fA-F]
|
|
|
|
SIGN [+-]
|
|
|
|
|
2005-11-01 23:02:06 +00:00
|
|
|
%x strng
|
2001-10-14 23:17:26 +00:00
|
|
|
%x incl
|
|
|
|
%x comment
|
2012-01-30 20:31:29 +00:00
|
|
|
%option nounput
|
2001-10-14 23:17:26 +00:00
|
|
|
|
2005-11-02 21:49:52 +00:00
|
|
|
/* Bump resources for classic lex. */
|
|
|
|
%e2000
|
2009-02-22 21:36:24 +00:00
|
|
|
%p10000
|
2005-11-02 21:49:52 +00:00
|
|
|
%n1000
|
|
|
|
|
2001-10-14 23:17:26 +00:00
|
|
|
%%
|
|
|
|
|
2012-11-04 17:18:59 +00:00
|
|
|
#{SIGN}*{DIGIT}+ { yylval = number(yytext); return TKN_NUMBER; }
|
|
|
|
#{SIGN}*{DIGIT}+"."{DIGIT}* { yylval = number_real(yytext); return TKN_NUMBER_REAL; }
|
|
|
|
#{SIGN}*"."{DIGIT}* { yylval = number_real(yytext); return TKN_NUMBER_REAL; }
|
|
|
|
{DIGIT}+ { yylval = number(yytext); return TKN_NUMBER; }
|
|
|
|
{DIGIT}+"."{DIGIT}* { yylval = number_real(yytext); return TKN_NUMBER_REAL; }
|
|
|
|
"."{DIGIT}+ { yylval = number_real(yytext); return TKN_NUMBER_REAL; }
|
2001-10-14 23:17:26 +00:00
|
|
|
|
2005-11-01 23:02:06 +00:00
|
|
|
"\"" { string_buf_ptr = string_buf; BEGIN(strng); }
|
2001-10-14 23:17:26 +00:00
|
|
|
|
|
|
|
0x{HEXDIGIT}+ { yylval = hexnumber(yytext); return TKN_NUMBER; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# { /* The following eats '#' style comments to end of line */
|
|
|
|
BEGIN(comment); }
|
2005-11-02 21:49:52 +00:00
|
|
|
<comment>[^\n] { /* eat comments */ }
|
2022-07-18 17:10:09 +00:00
|
|
|
<comment>\n { cfg_lineno++; BEGIN(INITIAL); }
|
2001-10-14 23:17:26 +00:00
|
|
|
|
|
|
|
|
|
|
|
"/*" { /* The following eats multiline C style comments */
|
|
|
|
int c;
|
|
|
|
int comment_start;
|
|
|
|
|
2022-07-18 17:10:09 +00:00
|
|
|
comment_start = cfg_lineno;
|
2001-10-14 23:17:26 +00:00
|
|
|
while (1) {
|
|
|
|
while (((c = input()) != '*') && (c != EOF)) {
|
|
|
|
/* eat up text of comment, but keep counting lines */
|
|
|
|
if (c == '\n')
|
2022-07-18 17:10:09 +00:00
|
|
|
cfg_lineno++;
|
2001-10-14 23:17:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (c == '*') {
|
|
|
|
while ((c = input()) == '*')
|
|
|
|
;
|
|
|
|
if (c == '/')
|
|
|
|
break; /* found the end */
|
|
|
|
}
|
|
|
|
|
|
|
|
if (c == EOF) {
|
2014-06-17 20:08:28 +00:00
|
|
|
yyerror("EOF in comment (started on line %d)", comment_start);
|
|
|
|
return YYERRCODE;
|
2001-10-14 23:17:26 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2005-11-02 21:49:52 +00:00
|
|
|
<strng>\" { *string_buf_ptr = 0; string_buf_ptr = string_buf;
|
|
|
|
yylval = string(string_buf_ptr); BEGIN(INITIAL); return TKN_STRING; }
|
|
|
|
<strng>\\n *string_buf_ptr++ = '\n';
|
|
|
|
<strng>\\t *string_buf_ptr++ = '\t';
|
|
|
|
<strng>\\r *string_buf_ptr++ = '\r';
|
|
|
|
<strng>\\b *string_buf_ptr++ = '\b';
|
|
|
|
<strng>\\f *string_buf_ptr++ = '\f';
|
|
|
|
<strng>\\(.|\n) *(string_buf_ptr++) = yytext[1];
|
|
|
|
<strng>[^\\\n\"]+ { char *yptr = yytext; while (*yptr)
|
2001-10-14 23:17:26 +00:00
|
|
|
*(string_buf_ptr++) = *(yptr++); }
|
2014-06-17 20:08:28 +00:00
|
|
|
|
|
|
|
<strng>\n { yyerror("unterminated character constant");
|
|
|
|
return YYERRCODE; }
|
2001-10-14 23:17:26 +00:00
|
|
|
|
Alias keyword (#868)
Implementation for an "alias" keyword.
By now, only applied inside memory descriptions.
* Make "mem_alias" a separate nonterminal.
The previous implementation attempt caused a syntax error in
yacc code, and separating mem_alias on the same level as
mem_spec appears to be the cleaner solution anyway.
* Maintain real memory aliases.
Instead of duplicating the aliased memory with a new name, maintain a
second list of memory aliases (per device) that contains a pointer to
the memory area it is aliased to. That way, a memory name can be
clearly distinguished between the canonical one and any aliases.
* Check p->mem_alias != NULL before touching it
* Add avr_find_memalias()
This takes a memory region as input, and searches whether an
alias can be found for it.
* We need to add a list structure for the mem_alias list, always.
By that means, mem_alias won't ever be NULL, so no need to check
later.
Also, in avr_dup_part(), duplicate the alias list.
* In a memory alias, actually remember the current name.
* In avr_dup_part(), adjust pointers of aliased memories
While walking the list of memories, for each entry, see if there is an
alias pointing to it. If so, allocate a duplicated one, and fix its
aliased_mem pointer to point to the duplicated memory region instead
of the original one.
* Add avr_locate_mem_noalias()
When looking whether any memory region has already been defined for
the current part while parsing the config file, only non-aliased names
must be considered. Otherwise, a newly defined alias would kick out
the memory definition it is being aliased to.
* When defining a mem_alias, drop any existing one of that name.
* Actually use avr_find_memalias() to find aliases
* Add declaration for avr_find_memalias()
* When defining a memory, also search for an existing alias
If the newly defined name has the same as an existing alias, the alias
can be removed.
Note that we do explicitly *not* remove any memory by the same name of
a later defined alias, as this might invalidate another alias'es
pointer. If someone defines that, the alias name just won't ever be
found by avr_locate_mem().
2022-02-10 19:39:19 +00:00
|
|
|
alias { yylval=NULL; return K_ALIAS; }
|
Mega-commit to bring in both, the STK500v2 support from Erik
Walthinsen, as well as JTAG ICE mkII support (by me).
Erik's submission has been cleaned up a little bit, mostly to add his
name and the current year to the copyright of the new file, remove
trailing white space before importing the files, and fix the minor
syntax errors in his avrdude.conf.in additions (missing semicolons).
The JTAG ICE mkII support should be considered alpha to beta quality
at this point. Few things are still to be done, like defering the
hfuse (OCDEN) tweaks until they are really required. Also, for
reasons not yet known, the target MCU doesn't start to run after
signing off from the ICE, it needs a power-cycle first (at least on my
STK500).
Note that for the JTAG ICE, I did change a few things in the internal
API. Notably I made the serial receive timeout configurable by the
backends via an exported variable (done in both the Posix and the
Win32 implementation), and I made the serial_recv() function return a
-1 instead of bailing out with exit(1) upon encountering a receive
timeout (currently only done in the Posix implementation). Both
measures together allow me to receive a datastreem from the ICE at 115
kbps on a somewhat lossy PCI multi-UART card that occasionally drops a
character. The JTAG ICE mkII protocol has enough of safety layers to
allow recovering from these events, but the previous code wasn't
prepared for any kind of recovery. The Win32 change for this still
has to be done, and the traditional drivers need to be converted to
exit(1) upon encountering a timeout (as they're now getting a -1
returned they didn't see before in that case).
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@451 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-05-10 19:17:12 +00:00
|
|
|
allowfullpagebitstream { yylval=NULL; return K_ALLOWFULLPAGEBITSTREAM; }
|
|
|
|
avr910_devcode { yylval=NULL; return K_AVR910_DEVCODE; }
|
2001-10-16 23:32:30 +00:00
|
|
|
bank_size { yylval=NULL; return K_PAGE_SIZE; }
|
|
|
|
banked { yylval=NULL; return K_PAGED; }
|
2004-01-03 18:36:44 +00:00
|
|
|
baudrate { yylval=NULL; return K_BAUDRATE; }
|
2012-02-01 09:12:55 +00:00
|
|
|
blocksize { yylval=NULL; return K_BLOCKSIZE; }
|
2003-02-20 14:11:34 +00:00
|
|
|
bs2 { yylval=NULL; return K_BS2; }
|
2001-10-14 23:17:26 +00:00
|
|
|
buff { yylval=NULL; return K_BUFF; }
|
2012-02-01 09:12:55 +00:00
|
|
|
bytedelay { yylval=NULL; return K_BYTEDELAY; }
|
|
|
|
chip_erase { yylval=new_token(K_CHIP_ERASE); return K_CHIP_ERASE; }
|
2001-10-14 23:17:26 +00:00
|
|
|
chip_erase_delay { yylval=NULL; return K_CHIP_ERASE_DELAY; }
|
2012-02-01 09:12:55 +00:00
|
|
|
chiperasepolltimeout { yylval=NULL; return K_CHIPERASEPOLLTIMEOUT; }
|
|
|
|
chiperasepulsewidth { yylval=NULL; return K_CHIPERASEPULSEWIDTH; }
|
|
|
|
chiperasetime { yylval=NULL; return K_CHIPERASETIME; }
|
|
|
|
cmdexedelay { yylval=NULL; return K_CMDEXEDELAY; }
|
2012-01-30 17:08:48 +00:00
|
|
|
connection_type { yylval=NULL; return K_CONNTYPE; }
|
2012-02-01 09:12:55 +00:00
|
|
|
dedicated { yylval=new_token(K_DEDICATED); return K_DEDICATED; }
|
|
|
|
default_bitclock { yylval=NULL; return K_DEFAULT_BITCLOCK; }
|
2003-02-21 18:46:51 +00:00
|
|
|
default_parallel { yylval=NULL; return K_DEFAULT_PARALLEL; }
|
2003-02-21 21:07:43 +00:00
|
|
|
default_programmer { yylval=NULL; return K_DEFAULT_PROGRAMMER; }
|
2003-02-21 18:46:51 +00:00
|
|
|
default_serial { yylval=NULL; return K_DEFAULT_SERIAL; }
|
2022-04-10 21:36:53 +00:00
|
|
|
default_spi { yylval=NULL; return K_DEFAULT_SPI; }
|
2012-02-01 09:12:55 +00:00
|
|
|
delay { yylval=NULL; return K_DELAY; }
|
|
|
|
desc { yylval=NULL; return K_DESC; }
|
Submitted by Jan Egil Ruud <janegil.ruud@microchip.com>
patch #9507: Fix UPDI chip erase
* lexer.l (family_id): New keyword.
* config_gram.y: (Ditto)
* doc/avrdude.texi: Document new keyword
* avrdude.conf.in: Add family_id for avr8x devices
* avr.c: Pass error code up.
* jtag3.c: Pass error code from memory read up; implement
jtag3_read_sib()
* libavrdude.h: Add new items.
* main.c: Implement different chip erase handling required
for UPDI devices.
Submitted by Jan Egil Ruud <janegil.ruud@microchip.com>
patch #9506: Script to create device configuration stub from Atmel ATDF files
* avrdude.conf.in (ATtiny202, ATtiny204, ATtiny402, ATtiny404)
(ATtiny406, ATtiny804, ATtiny806, ATtiny807, ATtiny1604)
(ATtiny1606, ATtiny1607, ATtiny212, ATtiny214, ATtiny412)
(ATTiny414, ATtiny416, ATtiny417, ATtiny814, ATtiny816)
(ATtiny1614, ATtiny1616, ATtiny3214, ATtiny3216, ATtiny3217)
(ATmega3208, ATmega3209, ATmega4808, ATmega4809): New devices
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1405 81a1dc3b-b13d-400b-aceb-764788c761c2
2018-01-09 23:29:31 +00:00
|
|
|
family_id { yylval=NULL; return K_FAMILY_ID; }
|
2002-12-01 04:30:01 +00:00
|
|
|
devicecode { yylval=NULL; return K_DEVICECODE; }
|
Quite some cleanup of the JTAG ICE mkII stuff.
. Implement the new EECRAddress field in the device descriptor that is
required by the 4.x firmware; make an uneducated guess about what
firmware requires what length of device descriptor -- perhaps Atmel
can be convinced to publish an official matrix for that.
. Specify EECR in the config file where required. Obviously, only
locations that differ from the 0x3c default are mentioned in the
XML files, so by now, this only affects the AT90CAN128 for us.
. After clarification with Atmel, EnablePageProgramming should really
default to 1, and only cleared if specified by an XML parameter. So
far, only the XML files for the ATmega256x and ATmega406 do specify
it at all, and they specify a 1, too.
. Drop the entire OCDEN fuse heuristic. If OCDEN is unprogrammed at
startup, issue a warning that single-byte EEPROM updates won't be
possible. Leave it to the user to program the fuse if desired.
That way, we won't run into any issue of prematurely wearing out the
hfuse EEPROM cell. Interestingly enough, this also solved the
problem of the target not restarting from scratch upon sign-off.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@461 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-05-11 20:06:23 +00:00
|
|
|
eecr { yylval=NULL; return K_EECR; }
|
2001-10-14 23:17:26 +00:00
|
|
|
eeprom { yylval=NULL; return K_EEPROM; }
|
2012-02-01 09:12:55 +00:00
|
|
|
eeprom_instr { yylval=NULL; return K_EEPROM_INSTR; }
|
Mega-commit to bring in both, the STK500v2 support from Erik
Walthinsen, as well as JTAG ICE mkII support (by me).
Erik's submission has been cleaned up a little bit, mostly to add his
name and the current year to the copyright of the new file, remove
trailing white space before importing the files, and fix the minor
syntax errors in his avrdude.conf.in additions (missing semicolons).
The JTAG ICE mkII support should be considered alpha to beta quality
at this point. Few things are still to be done, like defering the
hfuse (OCDEN) tweaks until they are really required. Also, for
reasons not yet known, the target MCU doesn't start to run after
signing off from the ICE, it needs a power-cycle first (at least on my
STK500).
Note that for the JTAG ICE, I did change a few things in the internal
API. Notably I made the serial receive timeout configurable by the
backends via an exported variable (done in both the Posix and the
Win32 implementation), and I made the serial_recv() function return a
-1 instead of bailing out with exit(1) upon encountering a receive
timeout (currently only done in the Posix implementation). Both
measures together allow me to receive a datastreem from the ICE at 115
kbps on a somewhat lossy PCI multi-UART card that occasionally drops a
character. The JTAG ICE mkII protocol has enough of safety layers to
allow recovering from these events, but the previous code wasn't
prepared for any kind of recovery. The Win32 change for this still
has to be done, and the traditional drivers need to be converted to
exit(1) upon encountering a timeout (as they're now getting a -1
returned they didn't see before in that case).
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@451 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-05-10 19:17:12 +00:00
|
|
|
enablepageprogramming { yylval=NULL; return K_ENABLEPAGEPROGRAMMING; }
|
2001-10-14 23:17:26 +00:00
|
|
|
errled { yylval=NULL; return K_ERRLED; }
|
|
|
|
flash { yylval=NULL; return K_FLASH; }
|
2012-02-01 09:12:55 +00:00
|
|
|
flash_instr { yylval=NULL; return K_FLASH_INSTR; }
|
2006-11-20 23:23:37 +00:00
|
|
|
has_debugwire { yylval=NULL; return K_HAS_DW; }
|
2012-02-01 09:12:55 +00:00
|
|
|
has_jtag { yylval=NULL; return K_HAS_JTAG; }
|
2008-07-26 22:53:40 +00:00
|
|
|
has_pdi { yylval=NULL; return K_HAS_PDI; }
|
2010-01-15 16:36:13 +00:00
|
|
|
has_tpi { yylval=NULL; return K_HAS_TPI; }
|
2017-11-29 23:09:51 +00:00
|
|
|
has_updi { yylval=NULL; return K_HAS_UPDI; }
|
2012-02-01 09:12:55 +00:00
|
|
|
hventerstabdelay { yylval=NULL; return K_HVENTERSTABDELAY; }
|
|
|
|
hvleavestabdelay { yylval=NULL; return K_HVLEAVESTABDELAY; }
|
|
|
|
hvsp_controlstack { yylval=NULL; return K_HVSP_CONTROLSTACK; }
|
|
|
|
hvspcmdexedelay { yylval=NULL; return K_HVSPCMDEXEDELAY; }
|
2022-06-30 14:15:24 +00:00
|
|
|
hvupdi_support { yylval=NULL; return K_HVUPDI_SUPPORT; }
|
2022-06-25 22:11:51 +00:00
|
|
|
hvupdi_variant { yylval=NULL; return K_HVUPDI_VARIANT; }
|
2001-10-14 23:17:26 +00:00
|
|
|
id { yylval=NULL; return K_ID; }
|
Mega-commit to bring in both, the STK500v2 support from Erik
Walthinsen, as well as JTAG ICE mkII support (by me).
Erik's submission has been cleaned up a little bit, mostly to add his
name and the current year to the copyright of the new file, remove
trailing white space before importing the files, and fix the minor
syntax errors in his avrdude.conf.in additions (missing semicolons).
The JTAG ICE mkII support should be considered alpha to beta quality
at this point. Few things are still to be done, like defering the
hfuse (OCDEN) tweaks until they are really required. Also, for
reasons not yet known, the target MCU doesn't start to run after
signing off from the ICE, it needs a power-cycle first (at least on my
STK500).
Note that for the JTAG ICE, I did change a few things in the internal
API. Notably I made the serial receive timeout configurable by the
backends via an exported variable (done in both the Posix and the
Win32 implementation), and I made the serial_recv() function return a
-1 instead of bailing out with exit(1) upon encountering a receive
timeout (currently only done in the Posix implementation). Both
measures together allow me to receive a datastreem from the ICE at 115
kbps on a somewhat lossy PCI multi-UART card that occasionally drops a
character. The JTAG ICE mkII protocol has enough of safety layers to
allow recovering from these events, but the previous code wasn't
prepared for any kind of recovery. The Win32 change for this still
has to be done, and the traditional drivers need to be converted to
exit(1) upon encountering a timeout (as they're now getting a -1
returned they didn't see before in that case).
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@451 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-05-10 19:17:12 +00:00
|
|
|
idr { yylval=NULL; return K_IDR; }
|
2012-02-01 09:12:55 +00:00
|
|
|
io { yylval=new_token(K_IO); return K_IO; }
|
2011-08-29 09:25:04 +00:00
|
|
|
is_at90s1200 { yylval=NULL; return K_IS_AT90S1200; }
|
2009-10-12 16:44:30 +00:00
|
|
|
is_avr32 { yylval=NULL; return K_IS_AVR32; }
|
2012-02-01 09:12:55 +00:00
|
|
|
latchcycles { yylval=NULL; return K_LATCHCYCLES; }
|
|
|
|
load_ext_addr { yylval=new_token(K_LOAD_EXT_ADDR); return K_LOAD_EXT_ADDR; }
|
|
|
|
loadpage_hi { yylval=new_token(K_LOADPAGE_HI); return K_LOADPAGE_HI; }
|
|
|
|
loadpage_lo { yylval=new_token(K_LOADPAGE_LO); return K_LOADPAGE_LO; }
|
2001-10-14 23:17:26 +00:00
|
|
|
max_write_delay { yylval=NULL; return K_MAX_WRITE_DELAY; }
|
2012-04-13 15:25:41 +00:00
|
|
|
mcu_base { yylval=NULL; return K_MCU_BASE; }
|
2003-02-21 17:24:47 +00:00
|
|
|
memory { yylval=NULL; return K_MEMORY; }
|
2001-10-14 23:17:26 +00:00
|
|
|
min_write_delay { yylval=NULL; return K_MIN_WRITE_DELAY; }
|
|
|
|
miso { yylval=NULL; return K_MISO; }
|
2012-02-01 09:12:55 +00:00
|
|
|
mode { yylval=NULL; return K_MODE; }
|
2001-10-14 23:17:26 +00:00
|
|
|
mosi { yylval=NULL; return K_MOSI; }
|
2012-02-01 09:12:55 +00:00
|
|
|
no { yylval=new_token(K_NO); return K_NO; }
|
2001-10-16 23:32:30 +00:00
|
|
|
num_banks { yylval=NULL; return K_NUM_PAGES; }
|
|
|
|
num_pages { yylval=NULL; return K_NUM_PAGES; }
|
2008-07-26 22:53:40 +00:00
|
|
|
nvm_base { yylval=NULL; return K_NVM_BASE; }
|
2017-11-29 23:09:51 +00:00
|
|
|
ocd_base { yylval=NULL; return K_OCD_BASE; }
|
2012-12-04 13:59:37 +00:00
|
|
|
ocdrev { yylval=NULL; return K_OCDREV; }
|
2008-07-26 22:53:40 +00:00
|
|
|
offset { yylval=NULL; return K_OFFSET; }
|
2001-10-16 23:32:30 +00:00
|
|
|
page_size { yylval=NULL; return K_PAGE_SIZE; }
|
|
|
|
paged { yylval=NULL; return K_PAGED; }
|
2003-02-20 14:11:34 +00:00
|
|
|
pagel { yylval=NULL; return K_PAGEL; }
|
2003-02-20 19:46:23 +00:00
|
|
|
parallel { yylval=NULL; return K_PARALLEL; }
|
2011-12-29 16:51:44 +00:00
|
|
|
parent { yylval=NULL; return K_PARENT; }
|
2001-10-14 23:17:26 +00:00
|
|
|
part { yylval=NULL; return K_PART; }
|
2012-02-01 09:12:55 +00:00
|
|
|
pgm_enable { yylval=new_token(K_PGM_ENABLE); return K_PGM_ENABLE; }
|
2001-10-14 23:17:26 +00:00
|
|
|
pgmled { yylval=NULL; return K_PGMLED; }
|
2012-02-01 09:12:55 +00:00
|
|
|
pollindex { yylval=NULL; return K_POLLINDEX; }
|
|
|
|
pollmethod { yylval=NULL; return K_POLLMETHOD; }
|
|
|
|
pollvalue { yylval=NULL; return K_POLLVALUE; }
|
|
|
|
postdelay { yylval=NULL; return K_POSTDELAY; }
|
|
|
|
poweroffdelay { yylval=NULL; return K_POWEROFFDELAY; }
|
|
|
|
pp_controlstack { yylval=NULL; return K_PP_CONTROLSTACK; }
|
|
|
|
predelay { yylval=NULL; return K_PREDELAY; }
|
|
|
|
progmodedelay { yylval=NULL; return K_PROGMODEDELAY; }
|
|
|
|
programfusepolltimeout { yylval=NULL; return K_PROGRAMFUSEPOLLTIMEOUT; }
|
|
|
|
programfusepulsewidth { yylval=NULL; return K_PROGRAMFUSEPULSEWIDTH; }
|
|
|
|
programlockpolltimeout { yylval=NULL; return K_PROGRAMLOCKPOLLTIMEOUT; }
|
|
|
|
programlockpulsewidth { yylval=NULL; return K_PROGRAMLOCKPULSEWIDTH; }
|
2001-10-14 23:17:26 +00:00
|
|
|
programmer { yylval=NULL; return K_PROGRAMMER; }
|
2012-02-01 09:12:55 +00:00
|
|
|
pseudo { yylval=new_token(K_PSEUDO); return K_PSEUDO; }
|
2002-11-30 14:09:12 +00:00
|
|
|
pwroff_after_write { yylval=NULL; return K_PWROFF_AFTER_WRITE; }
|
Mega-commit to bring in both, the STK500v2 support from Erik
Walthinsen, as well as JTAG ICE mkII support (by me).
Erik's submission has been cleaned up a little bit, mostly to add his
name and the current year to the copyright of the new file, remove
trailing white space before importing the files, and fix the minor
syntax errors in his avrdude.conf.in additions (missing semicolons).
The JTAG ICE mkII support should be considered alpha to beta quality
at this point. Few things are still to be done, like defering the
hfuse (OCDEN) tweaks until they are really required. Also, for
reasons not yet known, the target MCU doesn't start to run after
signing off from the ICE, it needs a power-cycle first (at least on my
STK500).
Note that for the JTAG ICE, I did change a few things in the internal
API. Notably I made the serial receive timeout configurable by the
backends via an exported variable (done in both the Posix and the
Win32 implementation), and I made the serial_recv() function return a
-1 instead of bailing out with exit(1) upon encountering a receive
timeout (currently only done in the Posix implementation). Both
measures together allow me to receive a datastreem from the ICE at 115
kbps on a somewhat lossy PCI multi-UART card that occasionally drops a
character. The JTAG ICE mkII protocol has enough of safety layers to
allow recovering from these events, but the previous code wasn't
prepared for any kind of recovery. The Win32 change for this still
has to be done, and the traditional drivers need to be converted to
exit(1) upon encountering a timeout (as they're now getting a -1
returned they didn't see before in that case).
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@451 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-05-10 19:17:12 +00:00
|
|
|
rampz { yylval=NULL; return K_RAMPZ; }
|
2001-10-14 23:17:26 +00:00
|
|
|
rdyled { yylval=NULL; return K_RDYLED; }
|
2012-02-01 09:12:55 +00:00
|
|
|
read { yylval=new_token(K_READ); return K_READ; }
|
|
|
|
read_hi { yylval=new_token(K_READ_HI); return K_READ_HI; }
|
|
|
|
read_lo { yylval=new_token(K_READ_LO); return K_READ_LO; }
|
2001-10-14 23:17:26 +00:00
|
|
|
readback_p1 { yylval=NULL; return K_READBACK_P1; }
|
|
|
|
readback_p2 { yylval=NULL; return K_READBACK_P2; }
|
2012-02-01 09:12:55 +00:00
|
|
|
readsize { yylval=NULL; return K_READSIZE; }
|
|
|
|
reset { yylval=new_token(K_RESET); return K_RESET; }
|
|
|
|
resetdelay { yylval=NULL; return K_RESETDELAY; }
|
|
|
|
resetdelayms { yylval=NULL; return K_RESETDELAYMS; }
|
|
|
|
resetdelayus { yylval=NULL; return K_RESETDELAYUS; }
|
2003-02-21 17:24:47 +00:00
|
|
|
retry_pulse { yylval=NULL; return K_RETRY_PULSE; }
|
2012-02-01 09:12:55 +00:00
|
|
|
sck { yylval=new_token(K_SCK); return K_SCK; }
|
2003-02-20 19:46:23 +00:00
|
|
|
serial { yylval=NULL; return K_SERIAL; }
|
2006-02-27 17:18:42 +00:00
|
|
|
signature { yylval=NULL; return K_SIGNATURE; }
|
2001-10-14 23:17:26 +00:00
|
|
|
size { yylval=NULL; return K_SIZE; }
|
2022-04-10 21:36:53 +00:00
|
|
|
spi { yylval=NULL; return K_SPI; }
|
Mega-commit to bring in both, the STK500v2 support from Erik
Walthinsen, as well as JTAG ICE mkII support (by me).
Erik's submission has been cleaned up a little bit, mostly to add his
name and the current year to the copyright of the new file, remove
trailing white space before importing the files, and fix the minor
syntax errors in his avrdude.conf.in additions (missing semicolons).
The JTAG ICE mkII support should be considered alpha to beta quality
at this point. Few things are still to be done, like defering the
hfuse (OCDEN) tweaks until they are really required. Also, for
reasons not yet known, the target MCU doesn't start to run after
signing off from the ICE, it needs a power-cycle first (at least on my
STK500).
Note that for the JTAG ICE, I did change a few things in the internal
API. Notably I made the serial receive timeout configurable by the
backends via an exported variable (done in both the Posix and the
Win32 implementation), and I made the serial_recv() function return a
-1 instead of bailing out with exit(1) upon encountering a receive
timeout (currently only done in the Posix implementation). Both
measures together allow me to receive a datastreem from the ICE at 115
kbps on a somewhat lossy PCI multi-UART card that occasionally drops a
character. The JTAG ICE mkII protocol has enough of safety layers to
allow recovering from these events, but the previous code wasn't
prepared for any kind of recovery. The Win32 change for this still
has to be done, and the traditional drivers need to be converted to
exit(1) upon encountering a timeout (as they're now getting a -1
returned they didn't see before in that case).
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@451 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-05-10 19:17:12 +00:00
|
|
|
spmcr { yylval=NULL; return K_SPMCR; }
|
2012-02-01 09:12:55 +00:00
|
|
|
stabdelay { yylval=NULL; return K_STABDELAY; }
|
Mega-commit to bring in both, the STK500v2 support from Erik
Walthinsen, as well as JTAG ICE mkII support (by me).
Erik's submission has been cleaned up a little bit, mostly to add his
name and the current year to the copyright of the new file, remove
trailing white space before importing the files, and fix the minor
syntax errors in his avrdude.conf.in additions (missing semicolons).
The JTAG ICE mkII support should be considered alpha to beta quality
at this point. Few things are still to be done, like defering the
hfuse (OCDEN) tweaks until they are really required. Also, for
reasons not yet known, the target MCU doesn't start to run after
signing off from the ICE, it needs a power-cycle first (at least on my
STK500).
Note that for the JTAG ICE, I did change a few things in the internal
API. Notably I made the serial receive timeout configurable by the
backends via an exported variable (done in both the Posix and the
Win32 implementation), and I made the serial_recv() function return a
-1 instead of bailing out with exit(1) upon encountering a receive
timeout (currently only done in the Posix implementation). Both
measures together allow me to receive a datastreem from the ICE at 115
kbps on a somewhat lossy PCI multi-UART card that occasionally drops a
character. The JTAG ICE mkII protocol has enough of safety layers to
allow recovering from these events, but the previous code wasn't
prepared for any kind of recovery. The Win32 change for this still
has to be done, and the traditional drivers need to be converted to
exit(1) upon encountering a timeout (as they're now getting a -1
returned they didn't see before in that case).
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@451 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-05-10 19:17:12 +00:00
|
|
|
stk500_devcode { yylval=NULL; return K_STK500_DEVCODE; }
|
2012-02-01 09:12:55 +00:00
|
|
|
synchcycles { yylval=NULL; return K_SYNCHCYCLES; }
|
|
|
|
synchloops { yylval=NULL; return K_SYNCHLOOPS; }
|
|
|
|
timeout { yylval=NULL; return K_TIMEOUT; }
|
|
|
|
togglevtg { yylval=NULL; return K_TOGGLEVTG; }
|
2002-11-30 14:09:12 +00:00
|
|
|
type { yylval=NULL; return K_TYPE; }
|
2012-01-30 17:08:48 +00:00
|
|
|
usb { yylval=NULL; return K_USB; }
|
2011-08-25 16:12:30 +00:00
|
|
|
usbdev { yylval=NULL; return K_USBDEV; }
|
|
|
|
usbpid { yylval=NULL; return K_USBPID; }
|
|
|
|
usbproduct { yylval=NULL; return K_USBPRODUCT; }
|
|
|
|
usbsn { yylval=NULL; return K_USBSN; }
|
|
|
|
usbvendor { yylval=NULL; return K_USBVENDOR; }
|
|
|
|
usbvid { yylval=NULL; return K_USBVID; }
|
2001-10-14 23:17:26 +00:00
|
|
|
vcc { yylval=NULL; return K_VCC; }
|
|
|
|
vfyled { yylval=NULL; return K_VFYLED; }
|
2001-11-21 02:46:55 +00:00
|
|
|
write { yylval=new_token(K_WRITE); return K_WRITE; }
|
|
|
|
write_hi { yylval=new_token(K_WRITE_HI); return K_WRITE_HI; }
|
2012-02-01 09:12:55 +00:00
|
|
|
write_lo { yylval=new_token(K_WRITE_LO); return K_WRITE_LO; }
|
2001-11-21 02:46:55 +00:00
|
|
|
writepage { yylval=new_token(K_WRITEPAGE); return K_WRITEPAGE; }
|
2001-10-14 23:17:26 +00:00
|
|
|
yes { yylval=new_token(K_YES); return K_YES; }
|
|
|
|
|
|
|
|
"," { yylval = NULL; pyytext(); return TKN_COMMA; }
|
|
|
|
"=" { yylval = NULL; pyytext(); return TKN_EQUAL; }
|
|
|
|
";" { yylval = NULL; pyytext(); return TKN_SEMI; }
|
2005-09-18 20:12:23 +00:00
|
|
|
"~" { yylval = NULL; pyytext(); return TKN_TILDE; }
|
2012-11-13 21:34:02 +00:00
|
|
|
"(" { yylval = NULL; pyytext(); return TKN_LEFT_PAREN; }
|
|
|
|
")" { yylval = NULL; pyytext(); return TKN_RIGHT_PAREN; }
|
2001-10-14 23:17:26 +00:00
|
|
|
|
2022-07-18 17:10:09 +00:00
|
|
|
"\n" { cfg_lineno++; }
|
2005-11-02 21:49:52 +00:00
|
|
|
[ \r\t]+ { /* ignore whitespace */ }
|
2001-10-14 23:17:26 +00:00
|
|
|
|
2014-06-17 20:08:28 +00:00
|
|
|
c: { yyerror("possible old-style config file entry\n"
|
|
|
|
" Update your config file (see " CONFIG_DIR
|
|
|
|
"/avrdude.conf.sample for a sample)");
|
2012-01-31 17:03:43 +00:00
|
|
|
return YYERRCODE; }
|
2001-10-15 00:11:56 +00:00
|
|
|
|
2012-01-31 17:03:43 +00:00
|
|
|
. { return YYERRCODE; }
|
2001-10-14 23:17:26 +00:00
|
|
|
|
|
|
|
%%
|
|
|
|
|