mirror of
https://github.com/avrdudes/avrdude.git
synced 2026-09-30 21:08:45 +03:00
Merge pull request #1810 from stefanrueger/prog_modes
Warn when programmer failes to define `prog_modes`
This commit is contained in:
@@ -275,6 +275,9 @@ prog_def :
|
||||
yyerror("programmer type not specified");
|
||||
YYABORT;
|
||||
}
|
||||
if(!current_prog->prog_modes && cx->lex_kw_is_programmer)
|
||||
yywarning("programmer %s fails to specify prog_modes = PM_...;",
|
||||
(char *) ldata(lfirst(current_prog->id)));
|
||||
for(LNODEID ln = lfirst(current_prog->id); ln; ln = lnext(ln)) {
|
||||
char *id = ldata(ln);
|
||||
if((existing_prog = locate_programmer(programmers, id))) {
|
||||
|
||||
@@ -226,7 +226,8 @@ part { yylval=NULL; ccap(); current_strct = COMP_AVRPART; return K_P
|
||||
pgm_enable { yylval=new_token(K_PGM_ENABLE); ccap(); return K_PGM_ENABLE; }
|
||||
pgmled { yylval=NULL; ccap(); return K_PGMLED; }
|
||||
pp_controlstack { yylval=NULL; ccap(); return K_PP_CONTROLSTACK; }
|
||||
(programmer|serialadapter) { yylval=NULL; ccap(); current_strct = COMP_PROGRAMMER; return K_PROGRAMMER; }
|
||||
(programmer|serialadapter) { yylval=NULL; ccap(); current_strct = COMP_PROGRAMMER;
|
||||
cx->lex_kw_is_programmer = *yytext == 'p'; return K_PROGRAMMER; }
|
||||
rdyled { yylval=NULL; ccap(); return K_RDYLED; }
|
||||
read { yylval=new_token(K_READ); ccap(); return K_READ; }
|
||||
read_hi { yylval=new_token(K_READ_HI); ccap(); return K_READ_HI; }
|
||||
|
||||
@@ -1563,7 +1563,7 @@ typedef struct {
|
||||
uint16_t dfu_wIndex; // A running number for USB messages
|
||||
|
||||
// Static variable from config_gram.y
|
||||
int cfgy_pin_name; // Temporary variable for grammar parsing
|
||||
int cfgy_pin_name; // Temporary variable for grammar parsing
|
||||
|
||||
// Static variable from ppi.c
|
||||
unsigned char ppi_shadow[3];
|
||||
@@ -1604,6 +1604,9 @@ typedef struct {
|
||||
char usb_buf[USBDEV_MAX_XFER_3];
|
||||
int usb_buflen, usb_bufptr; // @@@ Check whether usb_buflen needs initialising with -1
|
||||
int usb_interface;
|
||||
|
||||
// Variable connecting lexer.l and config_gram.y
|
||||
int lex_kw_is_programmer; // Was the K_PROGRAMMER keyword "programmer"?
|
||||
} libavrdude_context;
|
||||
|
||||
extern libavrdude_context *cx;
|
||||
|
||||
Reference in New Issue
Block a user