Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Thread

[AVR-Chat] Re; CRC using IAR compiler

[AVR-Chat] Re; CRC using IAR compiler

2010-05-11 by wagnerj@proaxis.com

Hello, Phillipe

I did some digging through the IAR docs.

In the Linker documentation, it shows you how to generate and view the CRC
of various linked modules. And, if you search that same document for
"checksum", you will find a description of their checksum algorithm that
can be included in code, as in a bootloader.

Hope this helps
Jim

Re: [AVR-Chat] Re; CRC using IAR compiler

2010-05-12 by Philippe Habib

Thanks,

I got that far too.  I can get the CRC placed into the file, and I can  
read it.  My problem is I can't generate one that matches the one in  
the file.  I tried several methods and while they agree with each  
other, none agree with the IAR one.

I've seen the same problem raised in the AVR forum, but the people  
who've solved it never post the resolution.

I'll have to back off and take a fresh look.
Show quoted textHide quoted text
On May 11, 2010, at 1:18 PM, wagnerj@proaxis.com wrote:

> Hello, Phillipe
>
> I did some digging through the IAR docs.
>
> In the Linker documentation, it shows you how to generate and view  
> the CRC
> of various linked modules. And, if you search that same document for
> "checksum", you will find a description of their checksum algorithm  
> that
> can be included in code, as in a bootloader.
>
> Hope this helps
> Jim
>
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>

Re: [AVR-Chat] Re; CRC using IAR compiler

2010-05-12 by wagnerj@proaxis.com

Are you comparing an internally generated CRC to the CRC generated by
their published algorithm?

Or are comparing a CRC generated by their published algorithm against
something computed elsewhere?

Also, make note of the fact that what is saved in memory MAY be the
complement (I think thats it) of the real CRC such that when you run the
CRC test over the ENTIRE code (including the CRC), you get some
"well-known" value, such as 0x00.

Jim
Show quoted textHide quoted text
> Thanks,
>
> I got that far too.  I can get the CRC placed into the file, and I can
> read it.  My problem is I can't generate one that matches the one in
> the file.  I tried several methods and while they agree with each
> other, none agree with the IAR one.
>
> I've seen the same problem raised in the AVR forum, but the people
> who've solved it never post the resolution.
>
> I'll have to back off and take a fresh look.
>
>
> On May 11, 2010, at 1:18 PM, wagnerj@proaxis.com wrote:
>
>> Hello, Phillipe
>>
>> I did some digging through the IAR docs.
>>
>> In the Linker documentation, it shows you how to generate and view
>> the CRC
>> of various linked modules. And, if you search that same document for
>> "checksum", you will find a description of their checksum algorithm
>> that
>> can be included in code, as in a bootloader.
>>
>> Hope this helps
>> Jim
>>
>>
>>
>> ------------------------------------
>>
>> Yahoo! Groups Links
>>
>>
>>
>
>

Re: Re; CRC using IAR compiler

2010-05-12 by ecros_technology

--- In AVR-Chat@yahoogroups.com, David Kelly <dkelly@...> wrote:

> There is a lot of debate as to
> how a CRC should be calculated.

I think this is true only in circles where the precise meaning of "CRC" is not understood.  The mathematics of cyclic redundancy checks has been extensively studied and optimal solutions exist for just about any situation you can imagine.

On the other hand, people are inclined to use the term CRC to mean any kind of redundant data transmitted or stored along with any piece of data that may be received or recovered with errors.  A checksum, for example, is much easier to compute than a CRC but offers inferior protection against errors.  This, I think, is where the debate happens.

Graham.

Re: [AVR-Chat] Re; CRC using IAR compiler

2010-05-13 by David Kelly

On May 12, 2010, at 10:09 AM, Philippe Habib wrote:

> Thanks,
> 
> I got that far too.  I can get the CRC placed into the file, and I can  
> read it.  My problem is I can't generate one that matches the one in  
> the file.  I tried several methods and while they agree with each  
> other, none agree with the IAR one.
> 
> I've seen the same problem raised in the AVR forum, but the people  
> who've solved it never post the resolution.
> 
> I'll have to back off and take a fresh look.


I'm tuning in late but if you are having problems replicating the result of IAR's CRC calculation then perhaps one should ask IAR how the value is calculated?

There is a lot of debate as to how a CRC should be calculated. In the past when I studied this issue there was one school of thought that the last bits fed to the CRC generator were weaker than all the other bits previously fed. Their solution was to "close" the calculation by always pushing 0xffff (or some such known value) into the CRC checksum as the very last values added.

--
David Kelly N4HHE, dkelly@HiWAAY.net
========================================================================
Whom computers would destroy, they must first drive mad.

Re: [AVR-Chat] Re; CRC using IAR compiler

2010-06-01 by Jim Wagner

Did this ever get solved?

Jim Wagner

On May 12, 2010, at 8:09 AM, Philippe Habib wrote:

> Thanks,
>
> I got that far too. I can get the CRC placed into the file, and I can
> read it. My problem is I can't generate one that matches the one in
> the file. I tried several methods and while they agree with each
> other, none agree with the IAR one.
>
> I've seen the same problem raised in the AVR forum, but the people
> who've solved it never post the resolution.
>
> I'll have to back off and take a fresh look.
>
> On May 11, 2010, at 1:18 PM, wagnerj@proaxis.com wrote:
>
> > Hello, Phillipe
> >
> > I did some digging through the IAR docs.
> >
> > In the Linker documentation, it shows you how to generate and view
> > the CRC
> > of various linked modules. And, if you search that same document for
> > "checksum", you will find a description of their checksum algorithm
> > that
> > can be included in code, as in a bootloader.
> >
> > Hope this helps
> > Jim
> >
> >
> >
> > ------------------------------------
> >
> > Yahoo! Groups Links
> >
> >
> >
>
>
> 



[Non-text portions of this message have been removed]

Re: [AVR-Chat] Re; CRC using IAR compiler

2010-06-01 by Philippe Habib

Not yet.  I have been buried in an unrelated issue and have not looked  
at it for a while.
Show quoted textHide quoted text
On May 31, 2010, at 6:27 PM, Jim Wagner wrote:

> Did this ever get solved?
>
> Jim Wagner
>
> On May 12, 2010, at 8:09 AM, Philippe Habib wrote:
>
>> Thanks,
>>
>> I got that far too. I can get the CRC placed into the file, and I can
>> read it. My problem is I can't generate one that matches the one in
>> the file. I tried several methods and while they agree with each
>> other, none agree with the IAR one.
>>
>> I've seen the same problem raised in the AVR forum, but the people
>> who've solved it never post the resolution.
>>
>> I'll have to back off and take a fresh look.
>>
>> On May 11, 2010, at 1:18 PM, wagnerj@proaxis.com wrote:
>>
>>> Hello, Phillipe
>>>
>>> I did some digging through the IAR docs.
>>>
>>> In the Linker documentation, it shows you how to generate and view
>>> the CRC
>>> of various linked modules. And, if you search that same document for
>>> "checksum", you will find a description of their checksum algorithm
>>> that
>>> can be included in code, as in a bootloader.
>>>
>>> Hope this helps
>>> Jim
>>>
>>>
>>>
>>> ------------------------------------
>>>
>>> Yahoo! Groups Links
>>>
>>>
>>>
>>
>>
>>
>
>
>
> [Non-text portions of this message have been removed]
>
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>

Re: [AVR-Chat] Re; CRC using IAR compiler

2010-06-01 by Jim Wagner

Thanks

Jim
On Jun 1, 2010, at 7:37 AM, Philippe Habib wrote:

> Not yet. I have been buried in an unrelated issue and have not looked
> at it for a while.
>
> On May 31, 2010, at 6:27 PM, Jim Wagner wrote:
>
> > Did this ever get solved?
> >
> > Jim Wagner
> >
> > On May 12, 2010, at 8:09 AM, Philippe Habib wrote:
> >
> >> Thanks,
> >>
> >> I got that far too. I can get the CRC placed into the file, and I  
> can
> >> read it. My problem is I can't generate one that matches the one in
> >> the file. I tried several methods and while they agree with each
> >> other, none agree with the IAR one.
> >>
> >> I've seen the same problem raised in the AVR forum, but the people
> >> who've solved it never post the resolution.
> >>
> >> I'll have to back off and take a fresh look.
> >>
> >> On May 11, 2010, at 1:18 PM, wagnerj@proaxis.com wrote:
> >>
> >>> Hello, Phillipe
> >>>
> >>> I did some digging through the IAR docs.
> >>>
> >>> In the Linker documentation, it shows you how to generate and view
> >>> the CRC
> >>> of various linked modules. And, if you search that same document  
> for
> >>> "checksum", you will find a description of their checksum  
> algorithm
> >>> that
> >>> can be included in code, as in a bootloader.
> >>>
> >>> Hope this helps
> >>> Jim
> >>>
> >>>
> >>>
> >>> ------------------------------------
> >>>
> >>> Yahoo! Groups Links
> >>>
> >>>
> >>>
> >>
> >>
> >>
> >
> >
> >
> > [Non-text portions of this message have been removed]
> >
> >
> >
> > ------------------------------------
> >
> > Yahoo! Groups Links
> >
> >
> >
>
>
> 



[Non-text portions of this message have been removed]

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.