<?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>Kinetis MicrocontrollersのトピックRe: mcuxpresso: how to set micro's flash security when Tee tool is not available?</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/mcuxpresso-how-to-set-micro-s-flash-security-when-Tee-tool-is/m-p/1179005#M58745</link>
    <description>&lt;P&gt;Hi Kevin,&lt;/P&gt;
&lt;P&gt;In order to change FSEC bit in MCUXpresso please first install MCUXpresso SDK of your device. You can download in the link below, or you can directly import it by clicking the Install New Plugin SDKs button in the IDE.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://mcuxpresso.nxp.com/en/welcome" target="_blank"&gt;Welcome | MCUXpresso SDK Builder&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="image.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/129239i0525726A385C9793/image-size/medium?v=v2&amp;amp;px=400" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Then, create a new project using new SDK project wizard or import example from SDK.&lt;/P&gt;
&lt;P&gt;If you see &lt;STRONG&gt;startup_mke02z4.c&lt;/STRONG&gt; file in the project you will find the Flash config section. These 16-byte section is the flash configuration field and it is related to the following snippet from the RM.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="image.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/129240iDE39B8A8F0297D3E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;This means that to enable flash security you will need to change the highlighted byte &lt;STRONG&gt;from FE to FD&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="image.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/129241i2E282E78F7EE8344/image-size/medium?v=v2&amp;amp;px=400" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;I hope this helps!&lt;/P&gt;
&lt;P&gt;Have a great day,&lt;/P&gt;
&lt;P&gt;Felipe&lt;/P&gt;
&lt;P&gt;-------------------------------------------------------------------------------&lt;/P&gt;
&lt;P&gt;Note:&lt;/P&gt;
&lt;P&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;/P&gt;
&lt;P&gt;- We are following threads for 7 weeks after the last post, later replies are ignored. Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;/P&gt;
&lt;P&gt;------------------------------------------------------------------------------&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 06 Nov 2020 00:12:07 GMT</pubDate>
    <dc:creator>FelipeGarcia</dc:creator>
    <dc:date>2020-11-06T00:12:07Z</dc:date>
    <item>
      <title>mcuxpresso: how to set micro's flash security when Tee tool is not available?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/mcuxpresso-how-to-set-micro-s-flash-security-when-Tee-tool-is/m-p/1177995#M58729</link>
      <description>&lt;P&gt;How can the MKE02Z64's flash security be set when using the MCUXpresso IDE?&amp;nbsp;&amp;nbsp;MCUXpresso says the Tee security tool is not available for the MKE02Z64 micro controller.&amp;nbsp; The programming language is C.&lt;/P&gt;&lt;P&gt;I have tried below which does not work. Which makes sense because the flash security is not part of the running program.&amp;nbsp;&lt;/P&gt;&lt;P&gt;FTMRH-&amp;gt;FSEC = 0x01;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;P&amp;amp;E generated code within Kinetis Design Studio made the below code:&lt;/P&gt;&lt;P&gt;/* Flash configuration field */&lt;BR /&gt;__attribute__ ((section (".cfmconfig"))) const uint8_t _cfm[0x10] = {&lt;BR /&gt;/* NV_BACKKEY0: KEY=0x13 */&lt;BR /&gt;0xD3U,&lt;BR /&gt;/* NV_BACKKEY1: KEY=0x86 */&lt;BR /&gt;0x2BU,&lt;BR /&gt;/* NV_BACKKEY2: KEY=0x77 */&lt;BR /&gt;0x49U,&lt;BR /&gt;/* NV_BACKKEY3: KEY=0x22 */&lt;BR /&gt;0xD5U,&lt;BR /&gt;/* NV_BACKKEY4: KEY=0x45 */&lt;BR /&gt;0xF4U,&lt;BR /&gt;/* NV_BACKKEY5: KEY=0xAC */&lt;BR /&gt;0xA2U,&lt;BR /&gt;/* NV_BACKKEY6: KEY=0x76 */&lt;BR /&gt;0x99U,&lt;BR /&gt;/* NV_BACKKEY7: KEY=0x67 */&lt;BR /&gt;0x50U,&lt;BR /&gt;0xFFU,&lt;BR /&gt;0xFFU,&lt;BR /&gt;0xFFU,&lt;BR /&gt;0xFFU,&lt;BR /&gt;/* NV_EEPROT: DPOPEN=1,??=0,??=0,??=0,??=0,DPS=7 */&lt;BR /&gt;0x87U,&lt;BR /&gt;/* NV_FPROT: FPOPEN=1,??=1,FPHDIS=1,FPHS=3,FPLDIS=0,FPLS=3 */&lt;BR /&gt;0xFBU,&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;&lt;FONT color="#000000"&gt;/* NV_FSEC: KEYEN=0,??=1,??=1,??=1,??=1,&lt;/FONT&gt;SEC=1 */&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;0x3DU,&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;/* NV_FOPT: ??=1,??=1,??=1,??=1,??=1,??=1,??=1,??=1 */&lt;BR /&gt;0xFFU&lt;BR /&gt;};&lt;/P&gt;</description>
      <pubDate>Wed, 04 Nov 2020 14:05:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/mcuxpresso-how-to-set-micro-s-flash-security-when-Tee-tool-is/m-p/1177995#M58729</guid>
      <dc:creator>Kratz</dc:creator>
      <dc:date>2020-11-04T14:05:32Z</dc:date>
    </item>
    <item>
      <title>Re: mcuxpresso: how to set micro's flash security when Tee tool is not available?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/mcuxpresso-how-to-set-micro-s-flash-security-when-Tee-tool-is/m-p/1178810#M58738</link>
      <description>&lt;P&gt;It looks like setting up an attribute statement like this is needed.&amp;nbsp; I am not sure how to tell the compiler how to set location 0x400 as the place for this:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;const uint8_t __attribute__((section("0x400"))) _cfm[0x10] = {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Also I read in the chip manual to add the array to the end of the vector table which I did on a bare metal project.&amp;nbsp; In MCUXpresso header file there was an incomplete vector table.&amp;nbsp; I have not figured out how to add the vector table this way either.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Nov 2020 14:13:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/mcuxpresso-how-to-set-micro-s-flash-security-when-Tee-tool-is/m-p/1178810#M58738</guid>
      <dc:creator>Kratz</dc:creator>
      <dc:date>2020-11-05T14:13:08Z</dc:date>
    </item>
    <item>
      <title>Re: mcuxpresso: how to set micro's flash security when Tee tool is not available?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/mcuxpresso-how-to-set-micro-s-flash-security-when-Tee-tool-is/m-p/1179005#M58745</link>
      <description>&lt;P&gt;Hi Kevin,&lt;/P&gt;
&lt;P&gt;In order to change FSEC bit in MCUXpresso please first install MCUXpresso SDK of your device. You can download in the link below, or you can directly import it by clicking the Install New Plugin SDKs button in the IDE.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://mcuxpresso.nxp.com/en/welcome" target="_blank"&gt;Welcome | MCUXpresso SDK Builder&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="image.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/129239i0525726A385C9793/image-size/medium?v=v2&amp;amp;px=400" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Then, create a new project using new SDK project wizard or import example from SDK.&lt;/P&gt;
&lt;P&gt;If you see &lt;STRONG&gt;startup_mke02z4.c&lt;/STRONG&gt; file in the project you will find the Flash config section. These 16-byte section is the flash configuration field and it is related to the following snippet from the RM.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="image.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/129240iDE39B8A8F0297D3E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;This means that to enable flash security you will need to change the highlighted byte &lt;STRONG&gt;from FE to FD&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="image.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/129241i2E282E78F7EE8344/image-size/medium?v=v2&amp;amp;px=400" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;I hope this helps!&lt;/P&gt;
&lt;P&gt;Have a great day,&lt;/P&gt;
&lt;P&gt;Felipe&lt;/P&gt;
&lt;P&gt;-------------------------------------------------------------------------------&lt;/P&gt;
&lt;P&gt;Note:&lt;/P&gt;
&lt;P&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;/P&gt;
&lt;P&gt;- We are following threads for 7 weeks after the last post, later replies are ignored. Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;/P&gt;
&lt;P&gt;------------------------------------------------------------------------------&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Nov 2020 00:12:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/mcuxpresso-how-to-set-micro-s-flash-security-when-Tee-tool-is/m-p/1179005#M58745</guid>
      <dc:creator>FelipeGarcia</dc:creator>
      <dc:date>2020-11-06T00:12:07Z</dc:date>
    </item>
    <item>
      <title>Re: mcuxpresso: how to set micro's flash security when Tee tool is not available?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/mcuxpresso-how-to-set-micro-s-flash-security-when-Tee-tool-is/m-p/1179704#M58762</link>
      <description>&lt;P&gt;My board is a production PCB with a 32 pin chip instead of the being the demo board, so I don't think the SDK would work.&amp;nbsp; However, I did find the code you showed in the startup_mke02z4.c file.&amp;nbsp;&lt;STRONG&gt; I was able to change the hexadecimal "E" to a "D".&amp;nbsp; The Chip is now Secure.&lt;/STRONG&gt;&amp;nbsp; Since there is no SDK, there should be no other way the security bytes in setup file could get overridden is there?&lt;/P&gt;&lt;P&gt;Thank you for your help!&lt;/P&gt;</description>
      <pubDate>Sat, 07 Nov 2020 14:54:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/mcuxpresso-how-to-set-micro-s-flash-security-when-Tee-tool-is/m-p/1179704#M58762</guid>
      <dc:creator>Kratz</dc:creator>
      <dc:date>2020-11-07T14:54:11Z</dc:date>
    </item>
  </channel>
</rss>

