<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>TF-M and MCUBoot (on the nrf9160)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/91375/tf-m-and-mcuboot-on-the-nrf9160</link><description>Hi, 
 
 I am using the nrf9160 and attempting to enable MCUBoot and secure boot. Is it correct that you still cannot use any form of TF-M with MCUBoot on the nrf53 or nrf91 (as of NCS v2.0.2) ? Is it still supported to use the SPM + MCUBoot combo for</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 14 Sep 2022 11:45:29 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/91375/tf-m-and-mcuboot-on-the-nrf9160" /><item><title>RE: TF-M and MCUBoot (on the nrf9160)</title><link>https://devzone.nordicsemi.com/thread/386151?ContentTypeID=1</link><pubDate>Wed, 14 Sep 2022 11:45:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:95f6e777-a2d9-44d1-8815-e2d3645d6238</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You can change the static partition layout&amp;nbsp;handled by partition manager (&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/scripts/partition_manager/partition_manager.html"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/scripts/partition_manager/partition_manager.html&lt;/a&gt;) to change the size of the mcuboot region&amp;nbsp;by defining a my_project/pm_static.yml file (which can be derived from my_project/build/partitions.yml file).&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;An easier choice is to set the size of mcuboot in my_project/child_image/mcuboot.conf file:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_PM_PARTITION_SIZE_MCUBOOT=0x10000&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This will then be picked up by the build system (partition manager) and adjusted accordingly.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TF-M and MCUBoot (on the nrf9160)</title><link>https://devzone.nordicsemi.com/thread/386069?ContentTypeID=1</link><pubDate>Wed, 14 Sep 2022 01:11:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2f82ad28-b2b5-4c36-bb21-fa145439524c</guid><dc:creator>jeremyherbert</dc:creator><description>&lt;p&gt;Hi Abhijith,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;OK, but what do I do then if I need debug optimisations?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TF-M and MCUBoot (on the nrf9160)</title><link>https://devzone.nordicsemi.com/thread/383888?ContentTypeID=1</link><pubDate>Tue, 30 Aug 2022 11:52:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bfa74c81-3810-4429-81ef-91a768a99ff4</guid><dc:creator>Menon</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Sorry for the long response time&lt;/p&gt;
&lt;p&gt;Could you try removing the debug configuration and run the code again. I tried this and now it does not hang.&lt;/p&gt;
&lt;p&gt;And I can see there is CONFIG_FPROTECT=n in&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a title="https://github.com/nrfconnect/sdk-mcuboot/blob/main/boot/zephyr/boards/thingy91_nrf9160.conf" href="https://github.com/nrfconnect/sdk-mcuboot/blob/main/boot/zephyr/boards/thingy91_nrf9160.conf" rel="noopener noreferrer" target="_blank"&gt;thigy91_nrf9160 mcuboot overlay file&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/a&gt;which disables flash protection. This might be the reason for:&lt;span&gt;&lt;em&gt;&amp;nbsp;hangs with a failed assertion in&amp;nbsp;nrf_spu_flashregion_set.&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Kind Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Abhijith&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TF-M and MCUBoot (on the nrf9160)</title><link>https://devzone.nordicsemi.com/thread/383540?ContentTypeID=1</link><pubDate>Sat, 27 Aug 2022 01:56:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c908ac80-28bc-439d-aee6-eab5cc03d533</guid><dc:creator>jeremyherbert</dc:creator><description>&lt;p&gt;Seems like the culprit here is the flash. If you create a copy of the hello_world project, add this to the prj.conf:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_FLASH=y
CONFIG_FLASH_MAP=y
CONFIG_FLASH_PAGE_LAYOUT=y

CONFIG_BOOTLOADER_MCUBOOT=y

CONFIG_DEBUG_OPTIMIZATIONS=y
CONFIG_DEBUG=y&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Then build and flash to the nrf9160dk_nrf9160_ns, it&amp;nbsp;hangs with a failed assertion in&amp;nbsp;nrf_spu_flashregion_set.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I can also reproduce a very similar problem without MCUBoot and just enabling littlefs:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_FLASH=y
CONFIG_FLASH_MAP=y
CONFIG_FLASH_PAGE_LAYOUT=y

CONFIG_FILE_SYSTEM=y
CONFIG_FILE_SYSTEM_LITTLEFS=y

CONFIG_DEBUG_OPTIMIZATIONS=y
CONFIG_DEBUG=y&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If I then append the following to either of these:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_BUILD_WITH_TFM=n
CONFIG_SPM=y&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;They build and run fine. So it indeed seems that TF-M and MCUBoot are currently mutually exclusive.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>