<?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>topic Re: Calculating application image CRC for KBOOT V2 in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Calculating-application-image-CRC-for-KBOOT-V2/m-p/503455#M31589</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What did you enter for the Start address and End address?&amp;nbsp; I'm assuming if your application starts at 0xA000, and has size of 0x1000, then you would start (fill) at 0xB001 and end at 0x7FFF?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 26 May 2016 20:55:14 GMT</pubDate>
    <dc:creator>kevinlfw</dc:creator>
    <dc:date>2016-05-26T20:55:14Z</dc:date>
    <item>
      <title>Calculating application image CRC for KBOOT V2</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Calculating-application-image-CRC-for-KBOOT-V2/m-p/503452#M31586</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm looking to implement the bootloader integrity checking and need to set the CRC start address, byte count, and expected value found in KBOOT V2.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The reference manual states the &lt;STRONG&gt;crcStartAddress&lt;/STRONG&gt; is "generally the start address of the application image, where it resides in the flash or QuadSPI memory." so I'm curious if that start address of the application image would be &lt;STRONG&gt;BL_APP_VECTOR_TABLE_ADDRESS, &lt;/STRONG&gt;or is it where &lt;STRONG&gt;main&lt;/STRONG&gt; is placed (0xa464 in my case).&amp;nbsp; Also, what do you recommend I do to figure out the crcByteCount?&amp;nbsp; Can I just pull a number/calculation out of the .map file, and if so, which one?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lastly, how should I actually calculate the application CRC?&amp;nbsp; It seems like a utility or tool should be available where I can easily generate the CRC for my application.&amp;nbsp; The documentation doesn't really specify much to go off of so I'm hoping you can help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using IAR EWARM, FRDM-K22F board, KBOOT V2 freedom bootloader, app vector table address set to 0xA000, USB HID peripheral enabled.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Kevin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 May 2016 16:58:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Calculating-application-image-CRC-for-KBOOT-V2/m-p/503452#M31586</guid>
      <dc:creator>kevinlfw</dc:creator>
      <dc:date>2016-05-26T16:58:07Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating application image CRC for KBOOT V2</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Calculating-application-image-CRC-for-KBOOT-V2/m-p/503453#M31587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;IAR has options on the 'linker' tab to calculate a matching checksum, using the same address values.&amp;nbsp; I can only hope that this time the V2 bootloader instructions give you FULL details about CRC, which starts with the polynomial but also needs the seed, and bit/byte directions, and sometimes there is even a 'final math op' in CRC work...&amp;nbsp;&amp;nbsp; This process wants to put the result in a global var __checksum, which is best allocated 'by itself' in a linker block, which to place within this bootloader-table makes a bit of a hassle. And 'something' in code has to refer to it so that the linker will actually allocate the space, and not 'skip as unused'.&amp;nbsp; Of course I may be doing it all the hard way...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That linker-tab also has a spot to 'fill empty memory' with something so you can work with a 'fixed' end-address.&amp;nbsp; I fill with 0xDF, as in the Thumb instruction set this is system-call parameter 0xDF (#223), and I can 'catch' that in an interrupt handler and perform a reboot (should the PC ever 'get so lost' as to run into this empty space).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 May 2016 17:52:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Calculating-application-image-CRC-for-KBOOT-V2/m-p/503453#M31587</guid>
      <dc:creator>egoodii</dc:creator>
      <dc:date>2016-05-26T17:52:03Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating application image CRC for KBOOT V2</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Calculating-application-image-CRC-for-KBOOT-V2/m-p/503454#M31588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;After further review, using the KinetisFlashTool will calculate the application CRC, where you will then "Save" the BCA data after you "Config" the BCA area in the tool.&amp;nbsp; After you "Save" the BCA to the .bin file, you will then Update the device in the "Update" tab where it will write the CRC information for you.&amp;nbsp; Is this correct?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does this only work with .bin files?&amp;nbsp; What about .elf, .s19, .srec, etc. files?&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 May 2016 18:00:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Calculating-application-image-CRC-for-KBOOT-V2/m-p/503454#M31588</guid>
      <dc:creator>kevinlfw</dc:creator>
      <dc:date>2016-05-26T18:00:50Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating application image CRC for KBOOT V2</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Calculating-application-image-CRC-for-KBOOT-V2/m-p/503455#M31589</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What did you enter for the Start address and End address?&amp;nbsp; I'm assuming if your application starts at 0xA000, and has size of 0x1000, then you would start (fill) at 0xB001 and end at 0x7FFF?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 May 2016 20:55:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Calculating-application-image-CRC-for-KBOOT-V2/m-p/503455#M31589</guid>
      <dc:creator>kevinlfw</dc:creator>
      <dc:date>2016-05-26T20:55:14Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating application image CRC for KBOOT V2</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Calculating-application-image-CRC-for-KBOOT-V2/m-p/503456#M31590</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You don't have to tell it where to 'fill'.&amp;nbsp; If you start CRC at 0xA410 (past the location for the bootloader table) and end at 0xFFFF, then 'fill' will put your 'known value' everywhere in that range not occupied by explicit contents so that the CRC over said range will be all inclusive of known contents.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 May 2016 21:02:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Calculating-application-image-CRC-for-KBOOT-V2/m-p/503456#M31590</guid>
      <dc:creator>egoodii</dc:creator>
      <dc:date>2016-05-26T21:02:04Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating application image CRC for KBOOT V2</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Calculating-application-image-CRC-for-KBOOT-V2/m-p/503457#M31591</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, KinetisFlashTool can help to calculate the application CRC as you requested.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For image downloading, all the common file formats are supported by KinetisFlashTool, but for automatic BCA CRC data generation, currently only .bin file can be supported. Note: target bootloader can only recognise bin data sent from host.&lt;/P&gt;&lt;P&gt;One possible workaround is that you should convert the file into bin format, and then pass the bin file to KinetisFlashTool&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Typical user case:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: bold; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;SPAN style="font-weight: bold; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;crcStartAddress&lt;/SPAN&gt; = BL_APP_VECTOR_TABLE_ADDRESS&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: bold; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;crcByteCount = whole size of application image (bin file)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Jay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 May 2016 08:35:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Calculating-application-image-CRC-for-KBOOT-V2/m-p/503457#M31591</guid>
      <dc:creator>jay_heng</dc:creator>
      <dc:date>2016-05-27T08:35:25Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating application image CRC for KBOOT V2</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Calculating-application-image-CRC-for-KBOOT-V2/m-p/503458#M31592</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="http://srecord.sourceforge.net/" title="http://srecord.sourceforge.net/"&gt;SRecord 1.64&amp;nbsp; is a tool for calculating many types of CRCs &lt;/A&gt;etc.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 May 2016 11:56:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Calculating-application-image-CRC-for-KBOOT-V2/m-p/503458#M31592</guid>
      <dc:creator>bobpaddock</dc:creator>
      <dc:date>2016-05-27T11:56:33Z</dc:date>
    </item>
  </channel>
</rss>

