<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>CodeWarrior for MCUのトピックRe: SW checksums and S-Records when uploading code to targets</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/SW-checksums-and-S-Records-when-uploading-code-to-targets/m-p/124118#M37</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;How do you generate binaries?&lt;/DIV&gt;&lt;DIV&gt;For a banked memory application?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Anders&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 23 Feb 2007 13:02:59 GMT</pubDate>
    <dc:creator>AndersJ</dc:creator>
    <dc:date>2007-02-23T13:02:59Z</dc:date>
    <item>
      <title>SW checksums and S-Records when uploading code to targets</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/SW-checksums-and-S-Records-when-uploading-code-to-targets/m-p/124112#M31</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;Hi,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Working with a bootloader I started thinking about checksumming an entire application, to ensure the full program is downloaded into the the target via the bootloader.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Question 1:&lt;/DIV&gt;&lt;DIV&gt;Is there a way to automatically generate, and/or add a checksum to the firmware so a check can be made that the S-Record file is intact before committing to erase and reprogram&amp;nbsp;the target.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Follow up:&lt;/DIV&gt;&lt;DIV&gt;Every line of an S-Record has a checksum, which is fine.&lt;/DIV&gt;&lt;DIV&gt;But, how do you&amp;nbsp;make sure ALL lines of the S-Record file are in the file?&lt;/DIV&gt;&lt;DIV&gt;It is an editable file, and&amp;nbsp;a line may have been lost?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks for&amp;nbsp;any and all comments,&lt;/DIV&gt;&lt;DIV&gt;Anders J&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Feb 2007 17:33:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/SW-checksums-and-S-Records-when-uploading-code-to-targets/m-p/124112#M31</guid>
      <dc:creator>AndersJ</dc:creator>
      <dc:date>2007-02-22T17:33:09Z</dc:date>
    </item>
    <item>
      <title>Re: SW checksums and S-Records when uploading code to targets</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/SW-checksums-and-S-Records-when-uploading-code-to-targets/m-p/124113#M32</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hello&lt;/DIV&gt;&lt;DIV&gt;This depends on the processor you are targeting and on the version of CodeWarrior you are using.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;- Which CPU are you targeting (HC08, HC12, Coldfire, ..)&lt;BR /&gt;- Which version of CodeWarrior are you using?&lt;BR /&gt;&amp;nbsp; To retrieve that info:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; - Start CodeWarrior&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; - Select Help -&amp;gt; About Freescale CodeWarrior&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; - Click on "Install Products"&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; - CodeWarrior version used is displayed on top in the Installed Products dialog.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;CrasyCat&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Feb 2007 17:37:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/SW-checksums-and-S-Records-when-uploading-code-to-targets/m-p/124113#M32</guid>
      <dc:creator>CrasyCat</dc:creator>
      <dc:date>2007-02-22T17:37:30Z</dc:date>
    </item>
    <item>
      <title>Re: SW checksums and S-Records when uploading code to targets</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/SW-checksums-and-S-Records-when-uploading-code-to-targets/m-p/124114#M33</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hmmm.....&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;You would have to loose EXACTLY a whole line, quite unlikely.&lt;/DIV&gt;&lt;DIV&gt;Checksum the checksums????&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Feb 2007 17:42:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/SW-checksums-and-S-Records-when-uploading-code-to-targets/m-p/124114#M33</guid>
      <dc:creator>peg</dc:creator>
      <dc:date>2007-02-22T17:42:11Z</dc:date>
    </item>
    <item>
      <title>Re: SW checksums and S-Records when uploading code to targets</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/SW-checksums-and-S-Records-when-uploading-code-to-targets/m-p/124115#M34</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Sorry, some people never learn, do they?&lt;/DIV&gt;&lt;DIV&gt;HCS12 and CW3.1&lt;/DIV&gt;&lt;DIV&gt;Anders&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Feb 2007 17:46:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/SW-checksums-and-S-Records-when-uploading-code-to-targets/m-p/124115#M34</guid>
      <dc:creator>AndersJ</dc:creator>
      <dc:date>2007-02-22T17:46:39Z</dc:date>
    </item>
    <item>
      <title>Re: SW checksums and S-Records when uploading code to targets</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/SW-checksums-and-S-Records-when-uploading-code-to-targets/m-p/124116#M35</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hello&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;CodeWarrior for HCS12 includes a checksum computation feature.&lt;/DIV&gt;&lt;DIV&gt;Check in "{}Install}\help\pdf\Manual_SmartLinker.pdf", chapter "Linking Issues" section "Checksum Computation".&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;There are also sample project using Checksum computation in directory&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {Install}\(CodeWarrior_Examples)\HC12\Checksums&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Please note that if you have banked code in your application, you cannot compute checksum over page boundary. You need to evaluate checksum of each page separately.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I hope this helps.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;CrasyCat&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Feb 2007 17:53:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/SW-checksums-and-S-Records-when-uploading-code-to-targets/m-p/124116#M35</guid>
      <dc:creator>CrasyCat</dc:creator>
      <dc:date>2007-02-22T17:53:08Z</dc:date>
    </item>
    <item>
      <title>Re: SW checksums and S-Records when uploading code to targets</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/SW-checksums-and-S-Records-when-uploading-code-to-targets/m-p/124117#M36</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;I've done MainApp checksumming with the products I've worked on. We created an application that calculates the checksums and inserts it into the&amp;nbsp;"update" file. We also use that for joining the bootloader and mainapp applications.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I wouldn't mess doing checksums with S19 files... is a lot easier&amp;nbsp;getting checksums&amp;nbsp;and reprogram a product using raw binary files. Actually I don't generate S19 files after linking... but binaries.&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Feb 2007 03:58:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/SW-checksums-and-S-Records-when-uploading-code-to-targets/m-p/124117#M36</guid>
      <dc:creator>GonzaloVictorio</dc:creator>
      <dc:date>2007-02-23T03:58:40Z</dc:date>
    </item>
    <item>
      <title>Re: SW checksums and S-Records when uploading code to targets</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/SW-checksums-and-S-Records-when-uploading-code-to-targets/m-p/124118#M37</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;How do you generate binaries?&lt;/DIV&gt;&lt;DIV&gt;For a banked memory application?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Anders&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Feb 2007 13:02:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/SW-checksums-and-S-Records-when-uploading-code-to-targets/m-p/124118#M37</guid>
      <dc:creator>AndersJ</dc:creator>
      <dc:date>2007-02-23T13:02:59Z</dc:date>
    </item>
    <item>
      <title>Re: SW checksums and S-Records when uploading code to targets</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/SW-checksums-and-S-Records-when-uploading-code-to-targets/m-p/124119#M38</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;For generating binaries I basically modified the .bbl file of the project:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New"&gt;OPENFILE "%ABS_FILE%.bin"&lt;BR /&gt;format=binary&lt;BR /&gt;busWidth=1&lt;BR /&gt;origin=0x7c00&lt;BR /&gt;len=0x6600&lt;BR /&gt;undefByte=0xff&lt;BR /&gt;SENDBYTE 1 "%ABS_FILE%"&lt;BR /&gt;CLOSE&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;You can have more than one bbl file; for instance I have one for the Bootloader targets and one for the MainApp targets... your target will use the one that is&amp;nbsp;selected as part of the target (using the Files tab).&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I compile the code using the -Ms option and have quite a few segments defined in the .prm file for all the memory areas that I use for boot and mainapp.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Hope this helps!&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;btw: I use CW v5.1 for HC08&lt;/EM&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Feb 2007 02:48:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/SW-checksums-and-S-Records-when-uploading-code-to-targets/m-p/124119#M38</guid>
      <dc:creator>GonzaloVictorio</dc:creator>
      <dc:date>2007-02-24T02:48:38Z</dc:date>
    </item>
    <item>
      <title>Re: SW checksums and S-Records when uploading code to targets</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/SW-checksums-and-S-Records-when-uploading-code-to-targets/m-p/124120#M39</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Hello&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Just my 10 cents on that topic.&lt;/DIV&gt;&lt;DIV&gt;I would not recommend using binary files for HCS12 banked application.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;A binary file does not include any address information.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;And keep in mind address space for HCS12 is not linear.&lt;/DIV&gt;&lt;DIV&gt;You cannot map that in a raw binary file.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;CrasyCat&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Feb 2007 15:56:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/SW-checksums-and-S-Records-when-uploading-code-to-targets/m-p/124120#M39</guid>
      <dc:creator>CrasyCat</dc:creator>
      <dc:date>2007-02-27T15:56:28Z</dc:date>
    </item>
    <item>
      <title>Re: SW checksums and S-Records when uploading code to targets</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/SW-checksums-and-S-Records-when-uploading-code-to-targets/m-p/124121#M40</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;BLOCKQUOTE&gt;&lt;DIV&gt;&lt;HR /&gt;AndersJ wrote:&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;...&lt;/DIV&gt;&lt;DIV&gt;Is there a way to automatically generate, and/or add a checksum to the firmware so a check can be made that the S-Record file is intact before committing to erase and reprogram&amp;nbsp;the target.&lt;/DIV&gt;&lt;DIV&gt;...&lt;/DIV&gt;&lt;DIV&gt;Every line of an S-Record has a checksum, which is fine.&lt;/DIV&gt;&lt;DIV&gt;But, how do you&amp;nbsp;make sure ALL lines of the S-Record file are in the file?&lt;/DIV&gt;&lt;DIV&gt;It is an editable file, and&amp;nbsp;a line may have been lost?&lt;BR /&gt;&lt;HR /&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;DIV&gt;You could do it like this:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;OL&gt;&lt;LI&gt;Use the 'FILL' command in the linker file (for HCS12; may be different for ColdFire), to ensure that the S-Record file always contains the same amount of data, regardless of the size of your code.&lt;/LI&gt;&lt;LI&gt;Write a utility to process the S-Record file. Because the whole (flash) memory space is always covered, you always know the order in which the S-Records will appear, which is of particular relevance if you're using an HCS12 with banked memory.&lt;/LI&gt;&lt;LI&gt;Compute a checksum over the whole memory space, and insert it into the code.&lt;/LI&gt;&lt;LI&gt;Given that the S-Record format is quite inefficient, you might want to convert to a simple binary format, perhaps with a header at the start, and a checksum at the end, perhaps with encryption as well, if desired.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Steve.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Feb 2007 21:45:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/SW-checksums-and-S-Records-when-uploading-code-to-targets/m-p/124121#M40</guid>
      <dc:creator>sjmelnikoff</dc:creator>
      <dc:date>2007-02-28T21:45:49Z</dc:date>
    </item>
  </channel>
</rss>

