Pages: [1]   Go Down
Author Topic: Avrdude Verifcation failure when using -q switch  (Read 927 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Full Member
***
Karma: 0
Posts: 106
Where's the Kaboom?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This isn't Arduino per se, but just wondering if anyone's come across this before - I was initially using the VisualMicro IDE to upload to a Tiny85 using a TinyISP programmer, but have now removed the IDE from from the suspects list and can reproduce with just avrdude and my compiled .hex

Basically this works:
Code:
avrdude -c usbtiny -p attiny85 -U flash:w:Tiny85Test.hex

but adding the -q switch like this fails
Code:
avrdude -c usbtiny -p attiny85 -q -U flash:w:Tiny85Test.hex

with the following error
Code:
avrdude: verification error, first mismatch at byte 0x00c0
         0xb0 != 0x68
avrdude: verification error; content mismatch

I'm using the Arduino 1.0.3 fileset and the Avrdude that that contains...
Unfortunately VisualMicro adds the -q when it builds teh Avrdude command line, so the upload always fails.

Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 106
Where's the Kaboom?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

A bit more investigation shows that it fails with avrdude v5.11 but succeeds with v5.10

I was wondering if it could be a timing issue, since outputting the ### progress markers on the console might be slowing things down enough to affect timings somewhere...
Logged

Denmark
Offline Offline
Edison Member
*
Karma: 35
Posts: 1051
Happy Hobbyist
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I don't know if this helps:

I noticed that a new release of avrdude, was released just one month after ver. 5.11  called 5.11.1

So maybe there was a bug in 5.11 ?

http://download.savannah.gnu.org/releases/avrdude/

More about ver. 5.11 problems

http://arduino.cc/forum/index.php/topic,152732.0.html
« Last Edit: March 12, 2013, 10:07:25 am by Erni » Logged

Valencia, Spain
Online Online
Faraday Member
**
Karma: 142
Posts: 5296
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

A bit more investigation shows that it fails with avrdude v5.11 but succeeds with v5.10

I'm using USBtinyISP and avrdude 5.11. I use it on a lot of different chips, it works fine.

Logged

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

Denmark
Offline Offline
Edison Member
*
Karma: 35
Posts: 1051
Happy Hobbyist
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

yet another error report re.: avrdude ver. 5.11 and 5.11.1 and USBTiny

http://forums.adafruit.com/viewtopic.php?f=25&t=28382

Quote
I'm using USBtinyISP and avrdude 5.11. I use it on a lot of different chips, it works fine.

Maybe difference in firmware version or driver or OS ?
Logged

Wahiawa, Hawaii
Offline Offline
God Member
*****
Karma: 29
Posts: 582
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I get the verification failures usually when the programmer's sck clock is too fast when the attiny internal clocking set below 1.5 MHz.  You can usually fix this by slowing down the sck clock signal.  A few programmers like the usbtiny can be told to slow down with an avrdude -B option.

Try this:
Code:
avrdude -c usbtiny -p attiny85 -q -B50 -U flash:w:Tiny85Test.hex


You may need to experiment with bigger numbers -B100, -B250.  Of course it will really slow down the programming the higher you go.

I suspect that that the -q option is removing some delays in outputting the progress bar display info.  So in effect it is speeding up the writing a little bit.


Logged

Wahiawa, Hawaii
Offline Offline
God Member
*****
Karma: 29
Posts: 582
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Alternatively, if you are not able to use the -B option in avrdude, some programmers do not support that option, or you are not able to add that to the command sequence.  You can try a programmer like the USBasp which will support a hardware jumper setting to use a slow sck clock.  But be aware that there are many different versions of the USBasp and some do not support the hardware jumper setting.

Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 106
Where's the Kaboom?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I tried the 5.11.1 patch last night but no luck - problem still exists. I have just realised that this is still a 'virginal' Tiny85 - the fuses have not yet been set (due to a possible issue with VisualMicro) so that may have a bearing. it's supposed to be on 8Mhz internal clock but is currently on 1Mhz I think. I'll set teh fuses separately tonigth and see if that changes anything...
Logged

Wahiawa, Hawaii
Offline Offline
God Member
*****
Karma: 29
Posts: 582
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Were you able to try the -B50 option with avrdude?  That should work with the 1MHz clocking.

Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 106
Where's the Kaboom?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Literally just tried it - still the same problem

Also burnt the fuses for 8 / 8 and 8 / 1 MHz - still fails at both settings smiley-sad

Logged

Wahiawa, Hawaii
Offline Offline
God Member
*****
Karma: 29
Posts: 582
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Sounds like your USBtinyISP may be have problems.  Or are you able to try another tiny85 chip to verify?
Do you have another type of programmer to test with?



Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 106
Where's the Kaboom?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I don't think it's the programmer as it worked fine with avrdude 5.10 and has been working for a couple of years. Don't have another '85 but I do have a '2313 so I'll try that as soon as I get a chance again
Logged

Pages: [1]   Go Up
Jump to: