<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><o:SmartTagType
 namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="Street"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="address"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="PostalCode"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="State"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="City"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="place"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="PersonName"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
p.MsoAutoSig, li.MsoAutoSig, div.MsoAutoSig
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
span.emailstyle17
        {font-family:Arial;
        color:windowtext;}
span.emailstyle19
        {font-family:Arial;
        color:navy;}
span.emailstyle20
        {font-family:Arial;
        color:navy;}
span.EmailStyle21
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
 /* List Definitions */
 @list l0
        {mso-list-id:686951172;
        mso-list-template-ids:2141777280;}
@list l1
        {mso-list-id:795804520;
        mso-list-template-ids:2141777280;}
@list l2
        {mso-list-id:860824057;
        mso-list-type:hybrid;
        mso-list-template-ids:493154908 67698689 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l2:level1
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Symbol;}
@list l3
        {mso-list-id:1048260430;
        mso-list-template-ids:2141777280;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Michael &#8211; <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<ol style='margin-top:0in' start=1 type=1>
 <li class=MsoNormal style='color:navy;mso-list:l0 level1 lfo1'><font size=2
     color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial'>How
     do I loop through the program memory?</span></font><o:p></o:p></li>
</ol>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 color=black
face=Arial><span style='font-size:10.0pt;font-family:Arial;color:black'>Looping
through memory is easy, reading it is the tricky part.&nbsp; Unless I missed
something, I&#8217;ve found that ICCAVR does not handle very well reading Flash
above the 64KB boundary (ie &#8211; using ELPM v. LPM).&nbsp; The compiler
doesn&#8217;t know how to (1) implement ELPM to read flash directly and (2) use
RAMPZ&#8230;at least from what I&#8217;ve found in the Help and experience.&nbsp;
Richard may have to set me straight on this one&#8230;=)<o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 color=black
face=Arial><span style='font-size:10.0pt;font-family:Arial;color:black'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 color=black
face=Arial><span style='font-size:10.0pt;font-family:Arial;color:black'>Since I
am developing for the M2560, I had to implement the looping through reading
program memory in ASM to reach beyond the 64KB boundary.&nbsp; I didn&#8217;t bother
messing with the compiler area names since I needed to perform a CRC on the
entire application space starting at 0x0000 (includes the startup code and
variables) and going clear up to the bootloader space (last 1/2/4/8 KB of
Flash).<o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 color=black
face=Arial><span style='font-size:10.0pt;font-family:Arial;color:black'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 color=black
face=Arial><span style='font-size:10.0pt;font-family:Arial;color:black'>I have
been unsuccessful at getting ICCAVR to generate proper ASM code from C code to
read a flash address directly [ie &#8211; something like *(unsigned char*)
(&lt;word address&gt;)], so I&#8217;ve written my routines in ASM to read flash.&nbsp;
ICCAVR does not have a &#8220;FLASH&#8221; identifier like IAR to let you tell
the compiler that you wish to access a flash address instead of normal SRAM.&nbsp;
There is also the issue of having to manually manipulate RAMPZ on devices with
&gt;64KB flash&#8230;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<ol style='margin-top:0in' start=2 type=1>
 <li class=MsoNormal style='color:navy;mso-list:l0 level1 lfo1'><font size=2
     color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial'>How
     do I store the correct CRC at the end of the Flash memory?</span></font><o:p></o:p></li>
</ol>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in'><font size=3 color=black
face="Times New Roman"><span style='font-size:12.0pt;color:black'>You can
either use a small app to edit the HEX file to add the CRC bytes to the proper
location or you can hand-edit the HEX file (just google &#8220;Intel HEX&#8221;
to learn what to do).&nbsp; I have implemented a bootloader, so I built an
application that adds the CRC into the HEX flash image when it is creating the
update file to feed to the bootloader.<o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in'><font size=3 color=black
face="Times New Roman"><span style='font-size:12.0pt;color:black'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in'><font size=3 color=black
face="Times New Roman"><span style='font-size:12.0pt;color:black'>Another
option is to create the CRC routine that both generates and checks the CRC. &nbsp;Then
you only have figure out a way to tell your code to generate a CRC if one isn&#8217;t
there.&nbsp; This way you do not have to modify the HEX flash image at all.&nbsp;
This does require the use of the SPM instruction in your code to burn Flash
on-chip.<o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in'><font size=3 color=black
face="Times New Roman"><span style='font-size:12.0pt;color:black'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in'><font size=3 color=black
face="Times New Roman"><span style='font-size:12.0pt;color:black'>A standard
CRC-16 routine will both generate and validate a CRC with the same code.&nbsp;
My bootloader implements ASM CRC code (that I can send to you) that will both
generate and validate a CRC.&nbsp; I currently only use it to validate the CRC.<o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in'><font size=3 color=black
face="Times New Roman"><span style='font-size:12.0pt;color:black'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=3 color=black face="Times New Roman"><span
style='font-size:12.0pt;color:black'>It all depends on how you plan to (1)
generate the CRC and (2) use it on the device.&nbsp; Currently I do the
following:<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 color=black face="Times New Roman"><span
style='font-size:12.0pt;color:black'><o:p>&nbsp;</o:p></span></font></p>

<ol style='margin-top:0in' start=1 type=1>
 <li class=MsoNormal style='color:black;mso-list:l3 level1 lfo4'><font size=3
     color=black face="Times New Roman"><span style='font-size:12.0pt'>A
     bootloader is implemented that performs the CRC check on the application
     space only (no CRC on the bootloader).<o:p></o:p></span></font></li>
 <li class=MsoNormal style='color:black;mso-list:l3 level1 lfo4'><font size=3
     color=black face="Times New Roman"><span style='font-size:12.0pt'>An
     external PC application takes the HEX file generated by ICCAVR and
     converts it to a format the bootloader understands.<o:p></o:p></span></font></li>
 <li class=MsoNormal style='color:black;mso-list:l3 level1 lfo4'><font size=3
     color=black face="Times New Roman"><span style='font-size:12.0pt'>Additionally,
     this app also calculates the CRC on the application flash space and
     appends the CRC to the last 2 bytes of the application memory space.&nbsp;
     This is added to the update file built for the bootloader.<o:p></o:p></span></font></li>
 <li class=MsoNormal style='color:black;mso-list:l3 level1 lfo4'><font size=3
     color=black face="Times New Roman"><span style='font-size:12.0pt'>I burn
     the bootloader to the device and then use the bootloader to update/burn
     the flash application memory.<o:p></o:p></span></font></li>
 <li class=MsoNormal style='color:black;mso-list:l3 level1 lfo4'><font size=3
     color=black face="Times New Roman"><span style='font-size:12.0pt'>Now I
     can use the bootloader to perform the CRC check on the entire flash
     application space anytime I want to.<o:p></o:p></span></font></li>
</ol>

<p class=MsoNormal><font size=3 color=black face="Times New Roman"><span
style='font-size:12.0pt;color:black'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=3 color=black face="Times New Roman"><span
style='font-size:12.0pt;color:black'>I hope this helps more than confuses&#8230;or
at least avoid stating the obvious. =)&nbsp; I have submitted my CRC code
(including looping through reading Flash) to Richard as a code sample, but I
can send it to you as well if you think it can help.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<div>

<p class=MsoAutoSig><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy'>Cheers!<o:p></o:p></span></font></p>

<p class=MsoAutoSig><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoAutoSig><st1:PersonName w:st="on"><font size=3 color=navy
 face="Times New Roman"><span style='font-size:12.0pt;color:navy'>Rodney
 Pearson</span></font></st1:PersonName><font color=navy><span style='color:
navy'><o:p></o:p></span></font></p>

<p class=MsoAutoSig><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy'>Software Engineer<o:p></o:p></span></font></p>

<p class=MsoAutoSig><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy'>Juniper Systems, Inc.<o:p></o:p></span></font></p>

<p class=MsoAutoSig><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy'>www.junipersys.com<o:p></o:p></span></font></p>

</div>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'> Bate, Michael
[mailto:<st1:PersonName w:st="on">michael.bate@integra-ls.com</st1:PersonName>]
<br>
<b><span style='font-weight:bold'>Sent:</span></b> Wednesday, October 03, 2007
1:54 PM<br>
<b><span style='font-weight:bold'>To:</span></b> <st1:PersonName w:st="on">Rodney
 Pearson</st1:PersonName>; icc-avr@imagecraft.com<br>
<b><span style='font-weight:bold'>Subject:</span></b> RE: [Icc-avr] CRC Check
of Program Memory</span></font><o:p></o:p></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Rodney (and the ICC list),</span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>&nbsp;</span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Thank you!</span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>&nbsp;</span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Actually my problem should be fairly
simple, since I already have a routine (in C) to calculate CRCs. &nbsp;I really
have two questions:</span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>&nbsp;</span></font><o:p></o:p></p>

<ol style='margin-top:0in' start=1 type=1>
 <li class=MsoNormal style='color:navy;mso-list:l1 level1 lfo2'><font size=2
     color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial'>How
     do I loop through the program memory?</span></font><o:p></o:p></li>
 <li class=MsoNormal style='color:navy;mso-list:l1 level1 lfo2'><font size=2
     color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial'>How
     do I store the correct CRC at the end of the Flash memory?</span></font><o:p></o:p></li>
</ol>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>&nbsp;</span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Regarding question 1, I tried coding:</span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>&nbsp;</span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>for (iprog = __func_lit_start; iprog &lt;=
__text_end; iprog++)</span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>{</span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Add contents of location &#8220;iprog&#8221; to CRC</span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>}</span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>&nbsp;</span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Where __func_lit_start and _text_end are
defined as external, but they do not link (the map says they are &#8220;Global
Symbols&#8221; but the linker doesn&#8217;t know about them).</span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>&nbsp;</span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Regarding the second question: if I can
get the first part working, I can run with the debugger to get the correct CRC,
but then what do I do with it? &nbsp;How do I get it into Flash memory?</span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>&nbsp;</span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Am I doing something stupid?</span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>&nbsp;</span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Michael Bate</span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>&nbsp;</span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>&nbsp;</span></font><o:p></o:p></p>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'> <st1:PersonName
w:st="on">Rodney Pearson</st1:PersonName> [mailto:rodney@junipersys.com] <br>
<b><span style='font-weight:bold'>Sent:</span></b> Friday, September 28, 2007
12:09 PM<br>
<b><span style='font-weight:bold'>To:</span></b> <st1:PersonName w:st="on">Discussion
 list for ICCAVR and ICCtiny Users. You do NOT need tosubscribeto icc-announce
 if you are a member of this.</st1:PersonName>; Bate, Michael<br>
<b><span style='font-weight:bold'>Subject:</span></b> RE: [Icc-avr] CRC Check
of Program Memory</span></font><o:p></o:p></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>&nbsp;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Hello Michael &#8211;</span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>&nbsp;</span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>I have worked on this.&nbsp; I developed a
bootloader for the M2560 that has a bootstrap that does what you are trying to
do.&nbsp; The app note you refer to has all the pieces, but it is not the
clearest code in the world if your plan on implementing it differently than
Atmel has&#8230;I ended up just stripping out the relevant CRC checking code
(rot_word,rot_loop), creating my own ASM routines and then called those from
the C code.&nbsp; This made it much more flexible for me since my CRC is
pre-calculated and stored in the last WORD of Flash&#8230;</span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>&nbsp;</span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>&nbsp;</span></font><o:p></o:p></p>

<div>

<p class=MsoAutoSig><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy'>Cheers!</span></font><o:p></o:p></p>

<p class=MsoAutoSig><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy'>&nbsp;</span></font><o:p></o:p></p>

<p class=MsoAutoSig><st1:PersonName w:st="on"><font size=3 color=navy
 face="Times New Roman"><span style='font-size:12.0pt;color:navy'>Rodney
 Pearson</span></font></st1:PersonName><o:p></o:p></p>

<p class=MsoAutoSig><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy'>Software Engineer</span></font><o:p></o:p></p>

<p class=MsoAutoSig><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy'>Juniper Systems, Inc.</span></font><o:p></o:p></p>

<p class=MsoAutoSig><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy'>www.junipersys.com</span></font><o:p></o:p></p>

</div>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>&nbsp;</span></font><o:p></o:p></p>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
icc-avr-bounces@imagecraft.com [mailto:icc-avr-bounces@imagecraft.com] <b><span
style='font-weight:bold'>On Behalf Of </span></b>Bate, Michael<br>
<b><span style='font-weight:bold'>Sent:</span></b> Friday, September 28, 2007
9:06 AM<br>
<b><span style='font-weight:bold'>To:</span></b> icc-avr@imagecraft.com<br>
<b><span style='font-weight:bold'>Subject:</span></b> [Icc-avr] CRC Check of
Program Memory</span></font><o:p></o:p></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>&nbsp;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>This may have come up before; unfortunately I don&#8217;t
see how to search the archives of this list.</span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp;</span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>I am looking for a way to validate the program memory of an
AVR Atmega168. &nbsp;Atmel provides an application note (AVR236) which includes
some assembly language code, but I do not see how to combine this code with my
C program written for the ImageCraft C compiler. &nbsp;There are problems
assembling this even with the assembler in AVR Studio.</span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp;</span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Has anyone solved this problem already?</span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp;</span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Thanks in advance.</span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp;</span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'>----</span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'>Michael Bate</span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'>Principal Software Engineer</span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'>Integra Radionics</span></font><o:p></o:p></p>

<p class=MsoNormal><U1:STREET><U1:ADDRESS><st1:Street w:st="on"><st1:address
 w:st="on"><font size=2 face="Courier New"><span style='font-size:10.0pt;
  font-family:"Courier New"'>22 Terry Avenue</span></font></st1:address></st1:Street></U1:ADDRESS></U1:STREET><o:p></o:p></p>

<p class=MsoNormal><U1:PLACE><U1:CITY><st1:place w:st="on"><st1:City w:st="on"><font
  size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>Burlington</span></font></st1:City><font
 size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'></U1:CITY>,
 <U1:STATE><st1:State w:st="on">MA</U1:STATE></st1:State> <U1:POSTALCODE><st1:PostalCode
 w:st="on">01803</st1:PostalCode></span></font></st1:place></U1:POSTALCODE></U1:PLACE><o:p></o:p></p>

<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'>Phone:&nbsp; 781-565-1313</span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'>Fax:&nbsp;&nbsp;&nbsp;&nbsp;781-238-0606</span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'>E-mail: <a href="mailto:michael.bate@integra-ls.com"
title="mailto:michael.bate@integra-ls.com"></a><font color=navy><span
style='color:navy'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></font>&nbsp;</span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'><a href="www.radionics.com"
title="file:///C:/Documents%20and%20Settings/michael.bate/Application%20Data/Microsoft/Signatures/www.radionics.com">www.radionics.com</a></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>&nbsp;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'>Integra Radionics, Trusted Accuracy</span></font><o:p></o:p></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>&nbsp;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'>******************************</span></font><o:p></o:p></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>&nbsp;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>&nbsp;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'>Confidentiality Notice: This e-mail transmission may
contain&nbsp;material that is confidential and/or proprietary. If the reader of
this message is not the intended recipient, dissemination, disclosure,
distribution or reliance on&nbsp;the contents is strictly prohibited. If you
have received this e-mail transmission in error, please reply to the sender and
delete the message and its contents from your system. Thank you.</span></font><o:p></o:p></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>&nbsp;<o:p></o:p></span></font></p>

</div>

</body>

</html>