[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avrdude-dev] USBasp tracing (Was: Verification errors with TPI and
From: |
Joakim Lubeck |
Subject: |
Re: [avrdude-dev] USBasp tracing (Was: Verification errors with TPI and PDI programming) |
Date: |
Mon, 02 Sep 2013 11:41:50 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130330 Thunderbird/17.0.5 |
On 09/02/2013 08:46 AM, Joerg Wunsch wrote:
I also added it for the non-TPI functions now. Thus, USBasp can be
traced with a detailed log with -vvv, and including the low-level
device communication with -vvvv. Hopefully, this will make debugging
any issues easier in the future.
I think it sneeked in a bug there, it's verbose even if I not tell it to
be. After a quick lock in usbasp.c I think it's at the end of
usbasp_spi_cmd:
---
if (verbose > 2)
if (verbose > 3)
fprintf(stderr, "%s: usbasp_cpi_cmd()", progname);
fprintf(stderr, " => 0x%02x, 0x%02x, 0x%02x, 0x%02x\n",
res[0], res[1], res[2], res[3]);
---
The missing {}'s make the last printf always print the debug message.
Example:
---
$ avrdude -c usbasp -p t85 -B5
avrdude: set SCK frequency to 187500 Hz
avrdude: AVR device initialized and ready to accept instructions
Reading | | 0% 0.00s
=> 0x00, 0x30, 0x00, 0x1e
=> 0x00, 0x30, 0x00, 0x93
Reading | ################# | 33% 0.00s
=> 0x00, 0x30, 0x00, 0x0b
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e930b
=> 0x00, 0x50, 0x00, 0x62
=> 0x00, 0x50, 0x00, 0x62
=> 0x00, 0x50, 0x00, 0x62
=> 0x00, 0x58, 0x08, 0xdf
=> 0x00, 0x58, 0x08, 0xdf
=> 0x00, 0x58, 0x08, 0xdf
=> 0x00, 0x50, 0x08, 0xff
=> 0x00, 0x50, 0x08, 0xff
=> 0x00, 0x50, 0x08, 0xff
=> 0x00, 0x50, 0x00, 0x62
=> 0x00, 0x50, 0x00, 0x62
=> 0x00, 0x50, 0x00, 0x62
=> 0x00, 0x58, 0x08, 0xdf
=> 0x00, 0x58, 0x08, 0xdf
=> 0x00, 0x58, 0x08, 0xdf
=> 0x00, 0x50, 0x08, 0xff
=> 0x00, 0x50, 0x08, 0xff
=> 0x00, 0x50, 0x08, 0xff
avrdude: safemode: Fuses OK
avrdude done. Thank you.
---
/Joakim