1
AVRDude / avrdude -x ascii -x cpufreq issues
It looks like the GUI parsing is broken in ASCII mode -- the [tt:]buspirate_readline_noexit()[/tt:] function is waiting for a newline, which is not printed with the prompt, so it eventually times out with [tt:]avrdude: ser_recv(): programmer is not responding[/tt:]. Adding a break in the readline routine for [tt:]'>'[/tt:] fixed the prompt parsing.
The next problem is that after a chip erase the [tt:]pgm->initialize()[/tt:] function is called, which tries to reconfigure the PWM output. This fails since the [tt:]g[/tt:] command both enables and disables the output, so the second time it turns it off rather than going back into the PWM menu. Just disabling the second call seems to be ok and prevents this from happening.
This patch to the current SVN head of avrdude fixes both of these issues. However, why is the recovery clock not supported in binary mode? The ASCII mode is painfully slow -- almost five minutes to flash an 8 KB chip!
Code: [Select]
Index: buspirate.c
===================================================================
--- buspirate.c (revision 1126)
+++ buspirate.c (working copy)
@@ -195,6 +195,8 @@
continue;
if (*buf_p == 'n')
break;
+ if (*buf_p == '>')
+ break;
if (*buf_p == EOF) {
*buf_p = ' ';
break;
@@ -940,7 +942,7 @@
avr_set_bits(p->op[AVR_OP_CHIP_ERASE], cmd);
pgm->cmd(pgm, cmd, res);
usleep(p->chip_erase_delay);
- pgm->initialize(pgm, p);
+ //pgm->initialize(pgm, p);
pgm->pgm_led(pgm, OFF);