avrdude: Fix error handling in arduino, fix various outputs

This commit is contained in:
Vojtech Kral 2018-06-19 15:45:30 +02:00 committed by bubnikv
parent 635bb1e484
commit 725b8524f2
3 changed files with 6 additions and 6 deletions

View File

@ -148,6 +148,7 @@ static int arduino_open(PROGRAMMER * pgm, char * port)
// Initialization sequence for programming the external FLASH on the Prusa MK3 // Initialization sequence for programming the external FLASH on the Prusa MK3
if (prusa_init_external_flash(pgm) < 0) { if (prusa_init_external_flash(pgm) < 0) {
avrdude_message(MSG_INFO, "%s: arduino_open(): Failed to initialize MK3 external flash programming mode\n", progname); avrdude_message(MSG_INFO, "%s: arduino_open(): Failed to initialize MK3 external flash programming mode\n", progname);
return -1;
} }
if (stk500_getsync(pgm) < 0) if (stk500_getsync(pgm) < 0)

View File

@ -378,7 +378,7 @@ void avr_mem_display(const char * prefix, FILE * f, AVRMEM * m, int type,
char * optr; char * optr;
if (m == NULL) { if (m == NULL) {
fprintf(f, avrdude_message(MSG_INFO,
"%s Block Poll Page Polled\n" "%s Block Poll Page Polled\n"
"%sMemory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack\n" "%sMemory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack\n"
"%s----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------\n", "%s----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------\n",
@ -386,13 +386,13 @@ void avr_mem_display(const char * prefix, FILE * f, AVRMEM * m, int type,
} }
else { else {
if (verbose > 2) { if (verbose > 2) {
fprintf(f, avrdude_message(MSG_INFO,
"%s Block Poll Page Polled\n" "%s Block Poll Page Polled\n"
"%sMemory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack\n" "%sMemory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack\n"
"%s----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------\n", "%s----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------\n",
prefix, prefix, prefix); prefix, prefix, prefix);
} }
fprintf(f, avrdude_message(MSG_INFO,
"%s%-11s %4d %5d %5d %4d %-6s %6d %4d %6d %5d %5d 0x%02x 0x%02x\n", "%s%-11s %4d %5d %5d %4d %-6s %6d %4d %6d %5d %5d 0x%02x 0x%02x\n",
prefix, m->desc, m->mode, m->delay, m->blocksize, m->pollindex, prefix, m->desc, m->mode, m->delay, m->blocksize, m->pollindex,
m->paged ? "yes" : "no", m->paged ? "yes" : "no",
@ -415,7 +415,7 @@ void avr_mem_display(const char * prefix, FILE * f, AVRMEM * m, int type,
optr = avr_op_str(i); optr = avr_op_str(i);
else else
optr = " "; optr = " ";
fprintf(f, avrdude_message(MSG_INFO,
"%s %-11s %8d %8s %5d %5d\n", "%s %-11s %8d %8s %5d %5d\n",
prefix, optr, j, prefix, optr, j,
bittype(m->op[i]->bit[j].type), bittype(m->op[i]->bit[j].type),
@ -620,7 +620,7 @@ void avr_display(FILE * f, AVRPART * p, const char * prefix, int verbose)
LNODEID ln; LNODEID ln;
AVRMEM * m; AVRMEM * m;
fprintf(f, avrdude_message(MSG_INFO,
"%sAVR Part : %s\n" "%sAVR Part : %s\n"
"%sChip Erase delay : %d us\n" "%sChip Erase delay : %d us\n"
"%sPAGEL : P%02X\n" "%sPAGEL : P%02X\n"

View File

@ -117,7 +117,6 @@ UPDATE * parse_op(char * s)
} }
upd->offset = offset; upd->offset = offset;
printf("parse_op: offset: %lu\n", offset);
p++; p++;
/* /*