avr-chat
[Top][All Lists]
Advanced

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

Re: [avr-chat] safemode and -V result in odd warnings/errors about fuses


From: Erik Christiansen
Subject: Re: [avr-chat] safemode and -V result in odd warnings/errors about fuses without -u
Date: Sun, 27 Oct 2019 12:51:37 +1100
User-agent: Mutt/1.8.0 (2017-02-23)

On 15.10.19 13:32, Britton Kerin wrote:
> I often use -V to speed up edit-compile-debug.  This always results in
> a message like this:
> 
>      avrdude: safemode: Verify error - unable to read efuse properly.
> Programmer may
> not be reliable.
> 
> Almost always the next line after this is:
> 
>     avrdude: safemode: Fuses OK (E:FD, H:DA, L:FF)
> 
> This seems inconsistent, since avrdude just claimed it couldn't verify
> the fuses.  Every once in a while there is instead a prompt saying
> fuses changed, should change back y/n or something about like that.  I
> wonder if something isn't being initialized right, and ends up with -V
> (without -u) sometimes triggering this?

While I don't use -V, my reading of the manpage is:

» When enabled, safemode will issue a warning if the any fuse bits are
found to be different at program exit than they were when avrdude was
invoked.«

I.e. The reported gobbeldygook then means "You changed 'em, I didn't.
It's up to you."

> Adding -u as well of course stops the warning by disabling safe mode.

Well, not quite. The manual says that it only does:

» -u      Disable the safemode fuse bit checks. «

I.e. It is the supported means for avoiding the inappropriate message
produced by code which is evidently written to handle real errors, and
has not been tweaked to reword itself when you've turned off its ability
to detect whether you're meddling with the fuses.

> I guess what's going on here is -V causes the fuses to not be read
> back out.  If this is indeed the case, I'd say the warning is pretty
> misleading and should be changed, probably to suggest -u as well.  And
> the next line about fuses being OK is totally wrong.

Yup, spot on. But the avrdude homepage hasn't been edited since 2010,
and the last serious guru to appear on this list is Juerg Wunsch, back
in 2016, so any code tweaking is up to us, I figure. (Fiddling a few
printf statements, and even a conditional or two, is no big deal, but
I'm up to my armpits building an off-grid retirement abode, as an
owner-builder, and have some AVR-based networked LED lighting
controllers to finish when the building's done.)

I'd just use -u, as that's what's available - and it works. :-)

Erik



reply via email to

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