avrdude-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avrdude-dev] Patch to support updated buspirate firmware in avrdude


From: Michal Ludvig
Subject: Re: [avrdude-dev] Patch to support updated buspirate firmware in avrdude
Date: Sun, 18 Jul 2010 17:01:33 +1200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.4) Gecko/20100608 SUSE/3.1.0 Thunderbird/3.1

Thanks for that Kari, I'll put the patch to SVN shortly.

Michal


On 07/18/2010 01:19 AM, Kari Knuuttila wrote:
Hi,

BusPirate uart interface saw some updates in recent versions which broke
the avrdude support.

This patch fixes:
* Recognition of command input line.
* 'y' answer to "Are you sure" question when performing reset.

Patch is backwards compatible.
Tested with latest BusPirate Fw 5.3 (new UI) and FW 4.3 (old UI).

-Kari Knuuttila


---
Index: buspirate.c
===================================================================
--- buspirate.c (revision 945)
+++ buspirate.c (working copy)
@@ -257,7 +257,11 @@
static int buspirate_is_prompt(char *str)
{
/* Prompt ends with '>' all other input probably ends with '\n' */
- return (str[strlen(str) - 1] == '>');
+ if( str[strlen(str) - 1] == '>' ||
+ str[strlen(str) - 2] == '>' )
+ return 1;
+ else
+ return 0;
}

static int buspirate_expect(struct programmer_t *pgm, char *send,
@@ -536,6 +540,7 @@
static void buspirate_enable(struct programmer_t *pgm)
{
unsigned char *reset_str = "#\n";
+ unsigned char *accept_str = "y\n";
char *rcvd;
int fw_v1 = 0, fw_v2 = 0;
int rc, print_banner = 0;
@@ -559,6 +564,9 @@
buspirate_enable(pgm);
return;
}
+ if (strncmp(rcvd, "Are you sure?",13) == 0) {
+ buspirate_send_bin(pgm, accept_str, strlen(accept_str));
+ }
if (strncmp(rcvd, "RESET", 5) == 0) {
print_banner = 1;
continue;



_______________________________________________
avrdude-dev mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/avrdude-dev





reply via email to

[Prev in Thread] Current Thread [Next in Thread]