<?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>S12 / MagniV MicrocontrollersのトピックHow to verify flash with elf file?</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/How-to-verify-flash-with-elf-file/m-p/669719#M14087</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have many version of elf file. How to verify those code with MCU?&lt;/P&gt;&lt;P&gt;And, how to security MCU flash (unable to read)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Aaron&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 14 Jul 2017 02:07:39 GMT</pubDate>
    <dc:creator>aaronlee</dc:creator>
    <dc:date>2017-07-14T02:07:39Z</dc:date>
    <item>
      <title>How to verify flash with elf file?</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/How-to-verify-flash-with-elf-file/m-p/669719#M14087</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have many version of elf file. How to verify those code with MCU?&lt;/P&gt;&lt;P&gt;And, how to security MCU flash (unable to read)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Aaron&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Jul 2017 02:07:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/How-to-verify-flash-with-elf-file/m-p/669719#M14087</guid>
      <dc:creator>aaronlee</dc:creator>
      <dc:date>2017-07-14T02:07:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to verify flash with elf file?</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/How-to-verify-flash-with-elf-file/m-p/669720#M14088</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Aaron,&lt;/P&gt;&lt;P&gt;If I understood correctly, you want to process how to load elf file into MCU without original project.&lt;/P&gt;&lt;P&gt;Correct?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The simplest way will be creating new project for target MCU derivative.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After that, please open “Target Task” window by menu-Window-Show view-Other-Debug-Target Tasks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now, you may create new Target Task&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Flash Programmer1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/25257i982F47B676E2C2A2/image-size/large?v=v2&amp;amp;px=999" role="button" title="Flash Programmer1.png" alt="Flash Programmer1.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please enter name and select configuration (The configuration was created with our new project). As Task type, select Flash Programmer for S12Z.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Flash Programmer2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/25309i1CD4436C4D6542B6/image-size/large?v=v2&amp;amp;px=999" role="button" title="Flash Programmer2.png" alt="Flash Programmer2.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please add Flash Device – separately for Flash and EEPROM (if necessary)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Flash Programmer3.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/25356i9B4E6C0DC7C60A48/image-size/large?v=v2&amp;amp;px=999" role="button" title="Flash Programmer3.png" alt="Flash Programmer3.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Add Action – Erase/Blank check&lt;/P&gt;&lt;P&gt;I would like to recommend erase whole block. If you program also EEPROM, erase also EEPROM block&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Flash Programmer4.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/25407iA3C4EBEFF37205AE/image-size/large?v=v2&amp;amp;px=999" role="button" title="Flash Programmer4.png" alt="Flash Programmer4.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Add Action – Program/Verify&lt;/P&gt;&lt;P&gt;Select your elf file and check Restrict to Addresses in this Range if you program Flash and EEPROM separately&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Flash Programmer5.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/25451i96E39E1F5E3BB2A1/image-size/large?v=v2&amp;amp;px=999" role="button" title="Flash Programmer5.png" alt="Flash Programmer5.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You may add also verify commands or enable/disable commends by check buttons on left side.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Flash Programmer6.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/25476i7E1462D2922F1B6E/image-size/large?v=v2&amp;amp;px=999" role="button" title="Flash Programmer6.png" alt="Flash Programmer6.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The Task may be run by special Run Task button.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Flash Programmer7.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/25258i39AFB46126A8E8AD/image-size/large?v=v2&amp;amp;px=999" role="button" title="Flash Programmer7.png" alt="Flash Programmer7.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Optionally you may configure Project Debug Configuration, uncheck Perform Standard Download and add your Task into the list. In this case, the you may start debug session the same was as for standard Project.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Debug Configuration-Execute Task.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/25545i7AAB6531744FE812/image-size/large?v=v2&amp;amp;px=999" role="button" title="Debug Configuration-Execute Task.png" alt="Debug Configuration-Execute Task.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note: The CW10 have also Flash programmer button (blue lightning, Alt+B,F) in Commander window, which will run wizard for configure new Target Task.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The FSEC byte at address 0xFFFE0F should be programmed for secure an MCU. The last two bits SEC[1:0] should differ from 0b10 for enable security feature (recommended is 0b01).&lt;/P&gt;&lt;P&gt;Since S12Z flash contains ECC feature, the additional securing is not trivial task – we have to read last Flash sector, erase them, modify SEC[1:0] bits and program whole sector back.&lt;/P&gt;&lt;P&gt;Some more details about Security feature:&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-wiki-small" data-containerid="11493" data-containertype="14" data-objectid="93803" data-objecttype="102" href="https://community.nxp.com/docs/DOC-93803"&gt;https://community.nxp.com/docs/DOC-93803&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If FSEC configuration is not part of original elf file data, the managing security will be probably quite annoying.&lt;/P&gt;&lt;P&gt;In such case, I would like to recommend working with S-record files (contains only NVM data in readable format) and manually edit these files (See attached tool).&lt;/P&gt;&lt;P&gt;The S-record files may be generated by linker directly during building or converted from elf file by burner.exe tool.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope it helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a great day,&lt;BR /&gt;Radek&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Jul 2017 14:40:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/How-to-verify-flash-with-elf-file/m-p/669720#M14088</guid>
      <dc:creator>RadekS</dc:creator>
      <dc:date>2017-07-17T14:40:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to verify flash with elf file?</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/How-to-verify-flash-with-elf-file/m-p/669721#M14089</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Radek,&lt;/P&gt;&lt;P&gt;It's helpful. Thank&amp;nbsp;you very much.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Aaron&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Jul 2017 17:06:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/How-to-verify-flash-with-elf-file/m-p/669721#M14089</guid>
      <dc:creator>aaronlee</dc:creator>
      <dc:date>2017-07-18T17:06:45Z</dc:date>
    </item>
  </channel>
</rss>

