[Top][All Lists]

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

Re: [avr-chat] Verify on-target image

From: Rogier Wolff
Subject: Re: [avr-chat] Verify on-target image
Date: Tue, 11 Apr 2017 08:38:05 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Tue, Apr 11, 2017 at 07:54:34AM +0200, Rolf Pfister wrote:
> Am 11.04.17 um 00:03 schrieb Sam Voss:
> >I was wondering if it was possible to compare the hex file that is
> >currently on the chip to hex files on the host and determine which (if
> >any) were the flashed version?
> >
> With avrdude you could do this:
> avrdude -p m8 -c avr910 -P /dev/ttyUSB0 -U flash:r:flash.hex:i
> This will write the content of the microcontroller to the file flash.hex.
> But when compared the contents of flash.hex with your hex file
> usally you will get a difference even the content is the same.
> So it needs to convert to binary first to compare the two hex files.

That's not going to help.  The problem with a direct compare is that
the flash file that your compiler made only contains those bytes that
matter. The programmer leaves all other bytes at the default value of
0xff. When reading back from the chip you'll also see those "default
0xff" bytes in the hexfile. 

Just compare the hexfiles with diff, and expect to see one file
ending, and the other continuing with 0xff.... 


** address@hidden ** http://www.BitWizard.nl/ ** +31-15-2600998 **
**    Delftechpark 26 2628 XH  Delft, The Netherlands. KVK: 27239233    **
*-- BitWizard writes Linux device drivers for any device you may have! --*
The plan was simple, like my brother-in-law Phil. But unlike
Phil, this plan just might work.

reply via email to

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