Old version of dfu-programmer in Debian and Ubuntu is buggy

classic Classic list List threaded Threaded
4 messages Options
Martin Guy Martin Guy
Reply | Threaded
Open this post in threaded view
|

Old version of dfu-programmer in Debian and Ubuntu is buggy

Hi
  I just spent half a day going crazy with errors writing to flash on
AVR32, which only happened with one particular firmware image (to be
precise, current git trunk built with avr32-gcc-4.3 for Mizar with
256K flash memory).
Long story short, the version of dfu-programmer present in current
Ubuntu and Debian is very old and the defect has been fixed in more
recent versions.
So if you get the mysterious

$ dfu-programmer at32uc3a0256 flash elua_lualong_at32uc3a0256.hex
Validating...
Image did not validate.
$

error, which goes away if you change toolchain, build options or
platform configuration, you might like to check that your version of
dfu-programmer is more recent than 0.5.1

installation is:

wget http://downloads.sourceforge.net/project/dfu-programmer/dfu-programmer/0.5.4/dfu-programmer-0.5.4.tar.gz
tar xfz dfu-programmer-0.5.4.tar.gz
cd dfu-programmer-0.5.4
./configure
make
sudo make install

Cheers

    M
_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
Dado Sutter Dado Sutter
Reply | Threaded
Open this post in threaded view
|

Re: Old version of dfu-programmer in Debian and Ubuntu is buggy

Thanks !!!!

Best
Dado


On Wed, Jul 13, 2011 at 17:41, Martin Guy <[hidden email]> wrote:
Hi
 I just spent half a day going crazy with errors writing to flash on
AVR32, which only happened with one particular firmware image (to be
precise, current git trunk built with avr32-gcc-4.3 for Mizar with
256K flash memory).
Long story short, the version of dfu-programmer present in current
Ubuntu and Debian is very old and the defect has been fixed in more
recent versions.
So if you get the mysterious

$ dfu-programmer at32uc3a0256 flash elua_lualong_at32uc3a0256.hex
Validating...
Image did not validate.
$

error, which goes away if you change toolchain, build options or
platform configuration, you might like to check that your version of
dfu-programmer is more recent than 0.5.1

installation is:

wget http://downloads.sourceforge.net/project/dfu-programmer/dfu-programmer/0.5.4/dfu-programmer-0.5.4.tar.gz
tar xfz dfu-programmer-0.5.4.tar.gz
cd dfu-programmer-0.5.4
./configure
make
sudo make install

Cheers

   M
_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev


_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
jbsnyder jbsnyder
Reply | Threaded
Open this post in threaded view
|

Re: Old version of dfu-programmer in Debian and Ubuntu is buggy

In reply to this post by Martin Guy
On Wed, Jul 13, 2011 at 4:41 PM, Martin Guy <[hidden email]> wrote:

> Hi
>  I just spent half a day going crazy with errors writing to flash on
> AVR32, which only happened with one particular firmware image (to be
> precise, current git trunk built with avr32-gcc-4.3 for Mizar with
> 256K flash memory).
> Long story short, the version of dfu-programmer present in current
> Ubuntu and Debian is very old and the defect has been fixed in more
> recent versions.
> So if you get the mysterious
>
> $ dfu-programmer at32uc3a0256 flash elua_lualong_at32uc3a0256.hex
> Validating...
> Image did not validate.
> $

Yep.  I believe this has to do with an off-by-one error in the dumping
code.  Presumably flashing works, but validation is unreliable.

>
> error, which goes away if you change toolchain, build options or
> platform configuration, you might like to check that your version of
> dfu-programmer is more recent than 0.5.1
>
> installation is:
>
> wget http://downloads.sourceforge.net/project/dfu-programmer/dfu-programmer/0.5.4/dfu-programmer-0.5.4.tar.gz
> tar xfz dfu-programmer-0.5.4.tar.gz
> cd dfu-programmer-0.5.4
> ./configure
> make
> sudo make install

In case it's not installed already, you might also need the libusb-dev
package on Debian/Ubuntu in order to do the compilation (or whatever
package provides libusb 0.1.x libraries + headers on your distro)

>
> Cheers
>
>    M
> _______________________________________________
> eLua-dev mailing list
> [hidden email]
> https://lists.berlios.de/mailman/listinfo/elua-dev
>
_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
Martin Guy Martin Guy
Reply | Threaded
Open this post in threaded view
|

Re: Old version of dfu-programmer in Debian and Ubuntu is buggy

On 14 July 2011 00:16, James Snyder <[hidden email]> wrote:
> On Wed, Jul 13, 2011 at 4:41 PM, Martin Guy <[hidden email]> wrote:
>> $ dfu-programmer at32uc3a0256 flash elua_lualong_at32uc3a0256.hex
>> Validating...
>> Image did not validate.
>> $
>
> Yep.  I believe this has to do with an off-by-one error in the dumping
> code.  Presumably flashing works, but validation is unreliable.

No, it was repeatable single-bit data corruption at 6 locations in a
150KB image.
Output from cmp (offset (origin 1), should-be, is):
143364   6   4
144387 141 145
147457 165  65
153603 155 115
155652 150 152
158724 374 334

Thanks for the off-by-one hint. That explains why, with the new
version, the single-bit errors vanished but my verification code
stopped working.

>> wget http://downloads.sourceforge.net/project/dfu-programmer/dfu-programmer/0.5.4/dfu-programmer-0.5.4.tar.gz
>> tar xfz dfu-programmer-0.5.4.tar.gz
>> cd dfu-programmer-0.5.4
>> ./configure
>> make
>> sudo make install
>
> In case it's not installed already, you might also need the libusb-dev
> package on Debian/Ubuntu in order to do the compilation (or whatever
> package provides libusb 0.1.x libraries + headers on your distro)

Yep.

     M
_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev