mirror of
https://github.com/avrdudes/avrdude.git
synced 2026-10-02 16:09:00 +03:00
Move some selected _info() msgs to _notice()
This commit is contained in:
@@ -329,7 +329,7 @@ static int avrftdi_transmit_bb(const PROGRAMMER *pgm, unsigned char mode, const
|
||||
size_t max_size = MIN(pdata->ftdic->max_packet_size, (unsigned int) pdata->tx_buffer_size);
|
||||
// select block size so that resulting commands does not exceed max_size if possible
|
||||
blocksize = MAX(1,(max_size-7)/((8*2*6)+(8*1*2)));
|
||||
// msg_info("blocksize %d \n", blocksize);
|
||||
// msg_notice("blocksize %d \n", blocksize);
|
||||
|
||||
unsigned char* send_buffer = alloca((8 * 2 * 6) * blocksize + (8 * 1 * 2) * blocksize + 7);
|
||||
unsigned char* recv_buffer = alloca(2 * 16 * blocksize);
|
||||
@@ -618,7 +618,7 @@ static int avrftdi_pin_setup(const PROGRAMMER *pgm) {
|
||||
|
||||
pdata->use_bitbanging = !pin_check_mpsse;
|
||||
if (pdata->use_bitbanging)
|
||||
pmsg_info("fallback to bitbanging mode because of pin configuration\n");
|
||||
pmsg_notice("fallback to bitbanging mode because of pin configuration\n");
|
||||
|
||||
/*
|
||||
* TODO: No need to fail for a wrongly configured led or something.
|
||||
@@ -707,7 +707,7 @@ static int avrftdi_open(PROGRAMMER *pgm, const char *port) {
|
||||
pdata->ftdic->usb_dev = NULL;
|
||||
return err;
|
||||
} else {
|
||||
pmsg_info("using device VID:PID %04x:%04x and SN %s on interface %c\n",
|
||||
pmsg_notice("using device VID:PID %04x:%04x and SN %s on interface %c\n",
|
||||
vid, pid, serial? serial: "(none)", INTERFACE_A == interface? 'A': 'B');
|
||||
}
|
||||
|
||||
@@ -1053,22 +1053,22 @@ static int avrftdi_flash_write(const PROGRAMMER *pgm, const AVRPART *p, const AV
|
||||
if(verbose >= MSG_TRACE2)
|
||||
buf_dump(buf, buf_size, "command buffer", 0, 16*2);
|
||||
|
||||
pmsg_info("transmitting buffer of size: %d\n", buf_size);
|
||||
pmsg_notice("transmitting buffer of size: %d\n", buf_size);
|
||||
if (0 > avrftdi_transmit(pgm, MPSSE_DO_WRITE, buf, buf, buf_size))
|
||||
return -1;
|
||||
|
||||
bufptr = buf;
|
||||
|
||||
pmsg_info("using m->buf[%d] = 0x%02x as polling value ", poll_index,
|
||||
pmsg_notice("using m->buf[%d] = 0x%02x as polling value ", poll_index,
|
||||
m->buf[poll_index]);
|
||||
/* poll page write ready */
|
||||
do {
|
||||
msg_info(".");
|
||||
msg_notice(".");
|
||||
|
||||
pgm->read_byte(pgm, p, m, poll_index, &poll_byte);
|
||||
} while (m->buf[poll_index] != poll_byte);
|
||||
|
||||
msg_info("\n");
|
||||
msg_notice("\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
10
src/config.c
10
src/config.c
@@ -308,7 +308,7 @@ TOKEN *new_number(const char *text) {
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
msg_info("NUMBER(%d)\n", tkn->value.number);
|
||||
msg_notice("NUMBER(%d)\n", tkn->value.number);
|
||||
#endif
|
||||
|
||||
return tkn;
|
||||
@@ -326,7 +326,7 @@ TOKEN *new_number_real(const char *text) {
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
msg_info("NUMBER(%g)\n", tkn->value.number_real);
|
||||
msg_notice("NUMBER(%g)\n", tkn->value.number_real);
|
||||
#endif
|
||||
|
||||
return tkn;
|
||||
@@ -369,7 +369,7 @@ TOKEN *new_constant(const char *con) {
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
msg_info("CONSTANT(%s=%d)\n", con, tkn->value.number);
|
||||
msg_notice("CONSTANT(%s=%d)\n", con, tkn->value.number);
|
||||
#endif
|
||||
|
||||
return tkn;
|
||||
@@ -381,7 +381,7 @@ TOKEN *new_string(const char *text) {
|
||||
tkn->value.string = mmt_strdup(text);
|
||||
|
||||
#if DEBUG
|
||||
msg_info("STRING(%s)\n", tkn->value.string);
|
||||
msg_notice("STRING(%s)\n", tkn->value.string);
|
||||
#endif
|
||||
|
||||
return tkn;
|
||||
@@ -423,7 +423,7 @@ void print_token(TOKEN *tkn) {
|
||||
void pyytext(void)
|
||||
{
|
||||
#if DEBUG
|
||||
msg_info("TOKEN: %s\n", yytext);
|
||||
msg_notice("TOKEN: %s\n", yytext);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -234,7 +234,7 @@ static int ft245r_flush(const PROGRAMMER *pgm) {
|
||||
avail = len;
|
||||
|
||||
#if FT245R_DEBUG
|
||||
msg_info("%s: writing %d bytes\n", __func__, avail);
|
||||
msg_notice("%s: writing %d bytes\n", __func__, avail);
|
||||
#endif
|
||||
rv = ftdi_write_data(my.handle, src, avail);
|
||||
if (rv != avail) {
|
||||
@@ -277,7 +277,7 @@ static int ft245r_recv(const PROGRAMMER *pgm, unsigned char *buf, size_t len) {
|
||||
ft245r_fill(pgm);
|
||||
|
||||
#if FT245R_DEBUG
|
||||
msg_info("%s: discarding %d, consuming %lu bytes\n", __func__, my.rx.discard, (unsigned long) len);
|
||||
msg_notice("%s: discarding %d, consuming %lu bytes\n", __func__, my.rx.discard, (unsigned long) len);
|
||||
#endif
|
||||
while (my.rx.discard > 0) {
|
||||
int result = ft245r_rx_buf_fill_and_get(pgm);
|
||||
@@ -390,7 +390,7 @@ static int get_pin(const PROGRAMMER *pgm, int pinname) {
|
||||
if (ftdi_read_pins(my.handle, &byte) != 0)
|
||||
return -1;
|
||||
if (FT245R_DEBUG)
|
||||
msg_info("%s: in 0x%02x\n", __func__, byte);
|
||||
msg_notice("%s: in 0x%02x\n", __func__, byte);
|
||||
return GET_BITS_0(byte, pgm, pinname) != 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -1170,7 +1170,7 @@ static int jtagmkII_initialize(const PROGRAMMER *pgm, const AVRPART *p) {
|
||||
const char *ifname;
|
||||
|
||||
if (PDATA(pgm)->rts_mode != RTS_MODE_DEFAULT) {
|
||||
pmsg_info("forcing serial DTR/RTS handshake lines %s\n",
|
||||
pmsg_notice("forcing serial DTR/RTS handshake lines %s\n",
|
||||
PDATA(pgm)->rts_mode == RTS_MODE_LOW ? "LOW" : "HIGH");
|
||||
}
|
||||
|
||||
@@ -1765,7 +1765,7 @@ void jtagmkII_close(PROGRAMMER * pgm)
|
||||
}
|
||||
|
||||
if (PDATA(pgm)->rts_mode != RTS_MODE_DEFAULT) {
|
||||
pmsg_info("releasing DTR/RTS handshake lines\n");
|
||||
pmsg_notice("releasing DTR/RTS handshake lines\n");
|
||||
serial_set_dtr_rts(&pgm->fd, 0);
|
||||
}
|
||||
|
||||
|
||||
@@ -733,7 +733,7 @@ void linuxgpio_initpgm(PROGRAMMER *pgm) {
|
||||
|
||||
#ifdef HAVE_LIBGPIOD
|
||||
if (libgpiod_is_working()) {
|
||||
msg_info("using libgpiod for linuxgpio\n");
|
||||
msg_notice("using libgpiod for linuxgpio\n");
|
||||
pgm->display = linuxgpio_libgpiod_display;
|
||||
pgm->open = linuxgpio_libgpiod_open;
|
||||
pgm->close = linuxgpio_libgpiod_close;
|
||||
@@ -741,7 +741,7 @@ void linuxgpio_initpgm(PROGRAMMER *pgm) {
|
||||
pgm->getpin = linuxgpio_libgpiod_getpin;
|
||||
pgm->highpulsepin = linuxgpio_libgpiod_highpulsepin;
|
||||
} else {
|
||||
msg_info("falling back to sysfs for linuxgpio\n");
|
||||
msg_notice("falling back to sysfs for linuxgpio\n");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -1735,14 +1735,14 @@ skipopen:
|
||||
} else {
|
||||
exitrc = avr_chip_erase(pgm, p);
|
||||
if(exitrc == LIBAVRDUDE_SOFTFAIL) {
|
||||
pmsg_info("delaying chip erase until first -U upload to flash\n");
|
||||
pmsg_notice("delaying chip erase until first -U upload to flash\n");
|
||||
ce_delayed = 1;
|
||||
exitrc = 0;
|
||||
} else if(exitrc) {
|
||||
pmsg_error("chip erase failed\n");
|
||||
goto main_exit;
|
||||
}
|
||||
pmsg_notice("erased chip\n");
|
||||
} else
|
||||
pmsg_notice("erased chip\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@ static int serbb_setpin(const PROGRAMMER *pgm, int pinfunc, int value) {
|
||||
return -1;
|
||||
|
||||
#ifdef DEBUG
|
||||
msg_info("%s to %d\n", serpins[pin], value);
|
||||
msg_notice("%s to %d\n", serpins[pin], value);
|
||||
#endif
|
||||
|
||||
switch ( pin )
|
||||
@@ -172,14 +172,14 @@ static int serbb_getpin(const PROGRAMMER *pgm, int pinfunc) {
|
||||
if ( !invert )
|
||||
{
|
||||
#ifdef DEBUG
|
||||
msg_info("%s is %d\n", serpins[pin], ctl & serregbits[pin]? 1: 0);
|
||||
msg_notice("%s is %d\n", serpins[pin], ctl & serregbits[pin]? 1: 0);
|
||||
#endif
|
||||
return ctl & serregbits[pin]? 1: 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef DEBUG
|
||||
msg_info("%s is %d (~)\n", serpins[pin], ctl & serregbits[pin]? 0: 1);
|
||||
msg_notice("%s is %d (~)\n", serpins[pin], ctl & serregbits[pin]? 0: 1);
|
||||
#endif
|
||||
return ctl & serregbits[pin]? 0: 1;
|
||||
}
|
||||
|
||||
@@ -315,7 +315,7 @@ int touch_serialport(char **portp, int baudrate, int nwaits) {
|
||||
if(!sp1 || n1 <= 0 || !portp)
|
||||
return -1;
|
||||
|
||||
pmsg_info("touching serial port %s at %d baud\n", *portp, baudrate);
|
||||
pmsg_notice("touching serial port %s at %d baud\n", *portp, baudrate);
|
||||
|
||||
union pinfo pinfo;
|
||||
union filedescriptor fd;
|
||||
@@ -334,7 +334,7 @@ int touch_serialport(char **portp, int baudrate, int nwaits) {
|
||||
#if (defined(__arm__) || defined(__aarch64__)) && !defined(__APPLE__)
|
||||
nwaits += 2;
|
||||
#endif
|
||||
pmsg_info("waiting for new port...");
|
||||
pmsg_notice("waiting for new port...");
|
||||
usleep(400*1000*nwaits);
|
||||
for(i = nloops; i > 0; i--) {
|
||||
usleep(nap*1000);
|
||||
@@ -345,7 +345,7 @@ int touch_serialport(char **portp, int baudrate, int nwaits) {
|
||||
if(*portp)
|
||||
mmt_free(*portp);
|
||||
*portp = mmt_strdup((*diff)->port);
|
||||
msg_info(" %d ms:", (nloops-i+1)*nap + nwaits*400);
|
||||
msg_notice(" %d ms:", (nloops-i+1)*nap + nwaits*400);
|
||||
i = -1; // Leave loop
|
||||
}
|
||||
mmt_free(diff);
|
||||
@@ -353,7 +353,7 @@ int touch_serialport(char **portp, int baudrate, int nwaits) {
|
||||
}
|
||||
}
|
||||
free_libserialport_data(sp1, n1);
|
||||
msg_info(" using %s port %s\n", i<0? "new": "same", *portp);
|
||||
msg_notice(" using %s port %s\n", i<0? "new": "same", *portp);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -184,7 +184,7 @@ static void serialupdi_close(PROGRAMMER * pgm)
|
||||
pmsg_error("unable to leave NVM programming mode\n");
|
||||
}
|
||||
if (updi_get_rts_mode(pgm) != RTS_MODE_DEFAULT) {
|
||||
pmsg_info("releasing DTR/RTS handshake lines\n");
|
||||
pmsg_notice("releasing DTR/RTS handshake lines\n");
|
||||
}
|
||||
|
||||
updi_link_close(pgm);
|
||||
@@ -602,7 +602,7 @@ static int serialupdi_initialize(const PROGRAMMER *pgm, const AVRPART *p) {
|
||||
pmsg_notice2("UPDI link initialization OK\n");
|
||||
|
||||
if (updi_get_rts_mode(pgm) != RTS_MODE_DEFAULT) {
|
||||
pmsg_info("forcing serial DTR/RTS handshake lines %s\n", updi_get_rts_mode(pgm) == RTS_MODE_LOW ? "LOW" : "HIGH");
|
||||
pmsg_notice("forcing serial DTR/RTS handshake lines %s\n", updi_get_rts_mode(pgm) == RTS_MODE_LOW ? "LOW" : "HIGH");
|
||||
}
|
||||
|
||||
if (updi_read_cs(pgm, UPDI_ASI_SYS_STATUS, &value)<0) {
|
||||
|
||||
@@ -447,7 +447,7 @@ static int stk500_initialize(const PROGRAMMER *pgm, const AVRPART *p) {
|
||||
}
|
||||
|
||||
#if 0
|
||||
pmsg_info("%s(): n_extparms = %d\n", __func__, n_extparms);
|
||||
pmsg_notice("%s(): n_extparms = %d\n", __func__, n_extparms);
|
||||
#endif
|
||||
|
||||
buf[5] = 1; /* polling supported - XXX need this in config file */
|
||||
|
||||
@@ -3059,9 +3059,9 @@ static int stk500v2_paged_load(const PROGRAMMER *pgm, const AVRPART *p, const AV
|
||||
}
|
||||
#if 0
|
||||
for (i=0; i<page_size; i++) {
|
||||
msg_info("%02X", buf[2+i]);
|
||||
msg_notice("%02X", buf[2+i]);
|
||||
if (i%16 == 15)
|
||||
msg_info("\n");
|
||||
msg_notice("\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -3139,9 +3139,9 @@ static int stk500hv_paged_load(const PROGRAMMER *pgm, const AVRPART *p, const AV
|
||||
}
|
||||
#if 0
|
||||
for (i = 0; i < page_size; i++) {
|
||||
msg_info("%02X", buf[2 + i]);
|
||||
msg_notice("%02X", buf[2 + i]);
|
||||
if (i % 16 == 15)
|
||||
msg_info("\n");
|
||||
msg_notice("\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user