avrdude-dev
[Top][All Lists]
Advanced

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

Re: [avrdude-dev] [patch #8444] Proposal for modifications in -B and -U


From: Didrik Madheden
Subject: Re: [avrdude-dev] [patch #8444] Proposal for modifications in -B and -U command options managment
Date: Thu, 1 May 2014 14:50:14 +0200

On 1 May 2014 14:00, mauro <address@hidden> wrote:
> I found out two features I think can be useful.
>
> 1) about the -B option [ISP-frequence settings]
>    I realized that avrdude just considers the last occurrence
>    of the option, but it can be very useful to have a dynamic
>    frequence.
> I mean, for example, a command like
>
> .... -B 8 -U:.:w.... -B 1 -U:.:w....
>
> where I would like to use a lower frequence for the first write
> and a higher frequence for the second write.
>
> I need it in order to upgrade fuses in the first write
> satisfying the 1/4 MCU frequence bound
> and then speeding up before the ROM upload.

I have not investigated this, but there may be programmers that cannot
change the frequency without reinitializing the device. In this case,
adding this feature may be more complex than it appears on the
surface. But if your shell is of a UNIX-ey flavor, you could always
chain the commands with &&.

avrdude -c xxx -p xxx -B 8 -U lfuse:w:0xXX:m && avrdude -c xxx -p xxx
-B 1 -U flash:w:filename

Or otherwise on Windows, put the two commands in a .bat (or .cmd) file.

> 2) about -U option, I think it would be better
>    to use a non-":a" format as default in case of read operations
>    necause it does not make sense.
> Really, I had other troubles in using -U:<memory>:r case
> and for the moment I gave up, I will just use write.

So, what seems to happen here is that it detects the file format based
on the file contents, which means that the auto switch will only work
if a file whose format can be detected already exists. This is
arguably a bug. It should either always show an error when (explicitly
or implicitly) given the a operation or try to detect the format based
on the file name only.

But it's not a show-stopper of course. You can always specify the
format explicitly. If you need an example of a correct option for read
operation, try:

-U flash:r:test.hex:i

/Didrik



reply via email to

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