<?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: TrustZone Secure Setting and __ARM_FEATURE_CMSE in MCX Microcontrollers</title>
    <link>https://community.nxp.com/t5/MCX-Microcontrollers/TrustZone-Secure-Setting-and-ARM-FEATURE-CMSE/m-p/1919951#M1399</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;As you know that the TrustZone is a feature of cortex-M33 core, so the ARM defines the macro __ARM_FEATURE_CMSE.&lt;/P&gt;
&lt;P&gt;Pls refer to the link:&lt;/P&gt;
&lt;P&gt;It define the bit meaning of the __ARM_FEATURE_CMSE compiler macro.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="xiangjun_rong_0-1722311883258.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/290876iF093E20D9A322D5E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="xiangjun_rong_0-1722311883258.png" alt="xiangjun_rong_0-1722311883258.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope it can help you&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun rong&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 30 Jul 2024 05:37:32 GMT</pubDate>
    <dc:creator>xiangjun_rong</dc:creator>
    <dc:date>2024-07-30T05:37:32Z</dc:date>
    <item>
      <title>TrustZone Secure Setting and __ARM_FEATURE_CMSE</title>
      <link>https://community.nxp.com/t5/MCX-Microcontrollers/TrustZone-Secure-Setting-and-ARM-FEATURE-CMSE/m-p/1916577#M1341</link>
      <description>&lt;P&gt;Hello All MCX'ers,&lt;/P&gt;&lt;P&gt;This is a first time for me using an M33 MCU with TrustZone and I am trying to understand the security and build settings - mainly related to the __ARM_FEATURE_CMSE macro.&lt;/P&gt;&lt;P&gt;Here is what I understand:&lt;/P&gt;&lt;P&gt;If I build with TrustZone set to 'None',&amp;nbsp; __ARM_FEATURE_CMSE is set to 1.&amp;nbsp;But, by default the MCU should run everything in Secure mode out of RESET(?).&lt;/P&gt;&lt;P&gt;If I build with TrustZone set to 'Non-secure', __ARM_FEATURE_CMSE is still 1. The MCU should run in non-secure mode (?).&lt;/P&gt;&lt;P&gt;If I build with TrustZone set to 'Secure', __ARM_FEATURE_CMSE is 3. The MCU should run in secure mode. .&lt;/P&gt;&lt;P&gt;So, I am not understanding&amp;nbsp; the 'None' mode or the __ARM_FEATURE_CMSE macro, because shouldn't 'None' and 'Secure' both result in&amp;nbsp;__ARM_FEATURE_CMSE equal to 3?&lt;/P&gt;&lt;P&gt;I appreciate any clarification the forum can provide, Thanks!&lt;/P&gt;&lt;P&gt;Todd&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jul 2024 20:04:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCX-Microcontrollers/TrustZone-Secure-Setting-and-ARM-FEATURE-CMSE/m-p/1916577#M1341</guid>
      <dc:creator>mortontd</dc:creator>
      <dc:date>2024-07-24T20:04:59Z</dc:date>
    </item>
    <item>
      <title>Re: TrustZone Secure Setting and __ARM_FEATURE_CMSE</title>
      <link>https://community.nxp.com/t5/MCX-Microcontrollers/TrustZone-Secure-Setting-and-ARM-FEATURE-CMSE/m-p/1919951#M1399</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;As you know that the TrustZone is a feature of cortex-M33 core, so the ARM defines the macro __ARM_FEATURE_CMSE.&lt;/P&gt;
&lt;P&gt;Pls refer to the link:&lt;/P&gt;
&lt;P&gt;It define the bit meaning of the __ARM_FEATURE_CMSE compiler macro.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="xiangjun_rong_0-1722311883258.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/290876iF093E20D9A322D5E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="xiangjun_rong_0-1722311883258.png" alt="xiangjun_rong_0-1722311883258.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope it can help you&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun rong&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jul 2024 05:37:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCX-Microcontrollers/TrustZone-Secure-Setting-and-ARM-FEATURE-CMSE/m-p/1919951#M1399</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2024-07-30T05:37:32Z</dc:date>
    </item>
    <item>
      <title>Re: TrustZone Secure Setting and __ARM_FEATURE_CMSE</title>
      <link>https://community.nxp.com/t5/MCX-Microcontrollers/TrustZone-Secure-Setting-and-ARM-FEATURE-CMSE/m-p/1920864#M1407</link>
      <description>&lt;P&gt;Thank you Xiangjun for the response and reference.&lt;/P&gt;&lt;P&gt;I do understand the part covered by the reference you linked so I should be more specific with my question...&lt;/P&gt;&lt;P&gt;First, my goal is to create an app on the N947 that does not use TrustZone. I want it to be like writing an app for the Cortex-m4, etc.&lt;/P&gt;&lt;P&gt;So my first thought was that I should set TrustZone to None in MCUXpresso. This causes __ARM_FEATURE_CMSE to be 1, and only adds the -mcpu=cortex-m33 compiler option. However the app appears to be running in secure mode so I get hard faults.&lt;/P&gt;&lt;P&gt;If I set TrustZone to Secure in MCUXpresso it sets __ARM_FEATURE_CMSE to be 3 and it works.&lt;/P&gt;&lt;P&gt;So what is the intention of the None setting? Is it supposed to be running in non-secure mode? Doesn't it run in secure mode out of reset? This is where I am confused.&lt;/P&gt;&lt;P&gt;Also, another thing that makes this hard to work with is that MCUXpresso does not expand the __ARM_FEATURE_CMSE macro correctly. If I hover, it will always expand to 1, and the greyed out areas of preprocessor if's are not correct. I tested this by setting a global to the value of the macro and it is 3 in Secure mode, even though the macro expands to 1, and the code in the greyed out areas does execute.&lt;/P&gt;&lt;P&gt;Thanks again,&lt;/P&gt;&lt;P&gt;-Todd&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jul 2024 20:52:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCX-Microcontrollers/TrustZone-Secure-Setting-and-ARM-FEATURE-CMSE/m-p/1920864#M1407</guid>
      <dc:creator>mortontd</dc:creator>
      <dc:date>2024-07-30T20:52:48Z</dc:date>
    </item>
    <item>
      <title>Re: TrustZone Secure Setting and __ARM_FEATURE_CMSE</title>
      <link>https://community.nxp.com/t5/MCX-Microcontrollers/TrustZone-Secure-Setting-and-ARM-FEATURE-CMSE/m-p/1921200#M1411</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;After Reset, the MCXN947 is in security mode in default, so __ARM_FEATURE_CMSE should&amp;nbsp; be 3.&lt;/P&gt;
&lt;P&gt;Hope it can help you&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun Rong&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jul 2024 05:44:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCX-Microcontrollers/TrustZone-Secure-Setting-and-ARM-FEATURE-CMSE/m-p/1921200#M1411</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2024-07-31T05:44:30Z</dc:date>
    </item>
    <item>
      <title>Re: TrustZone Secure Setting and __ARM_FEATURE_CMSE</title>
      <link>https://community.nxp.com/t5/MCX-Microcontrollers/TrustZone-Secure-Setting-and-ARM-FEATURE-CMSE/m-p/1929626#M1500</link>
      <description>&lt;P&gt;&lt;SPAN&gt;XiangJun,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you for your response.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I believe the rest of the issues are with the MCUXpresso IDE so I will ask in that forum.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;-Todd&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Aug 2024 17:12:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCX-Microcontrollers/TrustZone-Secure-Setting-and-ARM-FEATURE-CMSE/m-p/1929626#M1500</guid>
      <dc:creator>mortontd</dc:creator>
      <dc:date>2024-08-10T17:12:08Z</dc:date>
    </item>
  </channel>
</rss>

