<?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>nRF9160 and direct-xip</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/109640/nrf9160-and-direct-xip</link><description>Hi, 
 We would like to run our next nRF9160 project using Direct XIP and a single-stage immutable bootloader to accomplish LTE-based FOTA or our application. There is a lot of documentation and numerous issues on DevZone related to this topic, but I haven</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 08 Apr 2024 11:11:52 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/109640/nrf9160-and-direct-xip" /><item><title>RE: nRF9160 and direct-xip</title><link>https://devzone.nordicsemi.com/thread/477525?ContentTypeID=1</link><pubDate>Mon, 08 Apr 2024 11:11:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:efc5031a-4f76-4fad-be7b-c3ee195bb8bb</guid><dc:creator>pemar13</dc:creator><description>&lt;p&gt;Thanks Sigurd,&lt;/p&gt;
&lt;p&gt;We will continue using swap without scratch until Direct XIP is fully supported and working (faster and minimizes flash wear even if the swap approach is good enough from the point of view of security agains tpower off). Hopefully this won&amp;#39;t be too long.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Per&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 and direct-xip</title><link>https://devzone.nordicsemi.com/thread/477090?ContentTypeID=1</link><pubDate>Thu, 04 Apr 2024 11:53:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:10255f07-dc97-4227-8f5c-371d43b7868c</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Instead of asking the developers, I remembered that I can just check mcuboot docs.&lt;/p&gt;
&lt;p&gt;See &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/mcuboot/design.html#reset-recovery"&gt;Reset recovery&lt;/a&gt; docs. This is the protection that you get while using swap, and it might be enough for you?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 and direct-xip</title><link>https://devzone.nordicsemi.com/thread/475985?ContentTypeID=1</link><pubDate>Tue, 26 Mar 2024 15:03:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3e5cfda0-b8b7-438e-a7d6-dad862ba7d52</guid><dc:creator>pemar13</dc:creator><description>&lt;p&gt;I have not yet tested your patch, but will do so.&lt;br /&gt;Lets be in touch after easter!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 and direct-xip</title><link>https://devzone.nordicsemi.com/thread/475969?ContentTypeID=1</link><pubDate>Tue, 26 Mar 2024 14:28:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e534dced-1742-4d4c-b457-51536d22fa96</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Those are some good points.&lt;/p&gt;
&lt;p&gt;I would think that the swap method has some protection against power cuts, but I do not have enough insight to say that for sure. So, I will ask our MCUboot developers about this.&lt;br /&gt;They will likely get back to me sometime after easter.&lt;/p&gt;
&lt;p&gt;But I can help with direct-xip in the meantime&lt;/p&gt;
&lt;p&gt;The bug mentioned in &lt;span&gt;317819&lt;/span&gt; has not been fixed in v2.6.0.&lt;/p&gt;
&lt;p&gt;Did the patch I provided in that ticket fix your issue?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 and direct-xip</title><link>https://devzone.nordicsemi.com/thread/475957?ContentTypeID=1</link><pubDate>Tue, 26 Mar 2024 14:07:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:45a798ca-a439-4739-aa8b-9d32d8a054c9</guid><dc:creator>pemar13</dc:creator><description>&lt;p&gt;Good idea, since we might well have misunderstood things.&lt;/p&gt;
&lt;p&gt;Our first nRF9160 project was started with very early versions of ncs, when the Direct_XIP feature wasn&amp;#39;t implemented. Thus we used the &amp;quot;normal&amp;quot; MCUBoot with DFU using swapping of slots 0 and 1. We haven&amp;#39;t been totally happy with the need for a swap in view of the risk for an accidental power cut. In our first project this risk is minor since we have a BU battery for the nRF91, but in our new project we don&amp;#39;t (power can be cut by an operator using a key to switch off his vehicle at any time). That is why we have&amp;nbsp;thought that the Direct XIP methodology could be an advantage. Please let us know if we misunderstood things.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Per&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 and direct-xip</title><link>https://devzone.nordicsemi.com/thread/475918?ContentTypeID=1</link><pubDate>Tue, 26 Mar 2024 13:01:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:722d977b-2640-4f83-81d7-edfbd6d12ee2</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;EDIT: Sorry I got confused so I deleted the message.&lt;/p&gt;
&lt;p&gt;I really do think you should answer the question which I asked:&lt;/p&gt;
&lt;p&gt;Why do you think you need Direct-XIP?&lt;/p&gt;
&lt;p&gt;Knowing the context will help me guide you better.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 and direct-xip</title><link>https://devzone.nordicsemi.com/thread/475909?ContentTypeID=1</link><pubDate>Tue, 26 Mar 2024 12:50:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4c29cc3a-fdbd-4d97-ab92-6f960398089a</guid><dc:creator>pemar13</dc:creator><description>&lt;p&gt;Thank you Sigurd for the quick response!&lt;br /&gt;I will study the lesson, but I have this&amp;nbsp;immediate follow-up question:&lt;/p&gt;
&lt;p&gt;I believe I did what you suggest&amp;nbsp;by modifying slightly nrf\samples\cellular\http_update\application_update (1. using CONFIG_BOOT_SIGNATURE_KEY_FILE in mcuboot.conf to set up custom key (this part works fine), setting&amp;nbsp;CONFIG_BOOT_DIRECT_XIP=y in mcuboot.conf, and setting CONFIG_MCUBOOT_BOOTLOADER_MODE_DIRECT_XIP=y in prj.conf).&lt;/p&gt;
&lt;p&gt;I try to build using no pm_static.yml to get a &amp;quot;suggestion&amp;quot;&amp;nbsp;partitions.yml. However, both using ncs 2.5.2 and 2.6.0, I get the same build error as mentioned in Case ID&amp;nbsp;&lt;span&gt;317819). This error seems&amp;nbsp;to occur when running nrf&amp;nbsp;\cmake\partition_manager.cmake because because&amp;nbsp;PM_MCUBOOT_SECONDARY_ADDRESS and&amp;nbsp;PM_MCUBOOT_PRIMARY_ADDRESS are not defined when running lines 630-634 for ncs 2.5:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;    math(EXPR app_to_secondary
      &amp;quot;${xip_addr} \
      + ${PM_MCUBOOT_SECONDARY_ADDRESS} \
      - ${PM_MCUBOOT_PRIMARY_ADDRESS}&amp;quot;
      )&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;In your reply to 317819 you write that this has been reported as a bug. Does this mean that ncs 2.6.0&amp;nbsp;has not been fixed for this?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Per&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 and direct-xip</title><link>https://devzone.nordicsemi.com/thread/475874?ContentTypeID=1</link><pubDate>Tue, 26 Mar 2024 11:34:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5a81eebb-0f2f-4ba0-81d2-420f424977d1</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""] using Direct XIP[/quote]
&lt;p&gt;Why Direct-XIP? &lt;br /&gt;I like to make sure that users make informed choices when doing something non-default.&lt;/p&gt;
[quote user=""] Is it possible to use MCUBoot as immutable bootloader for the nRF9160 providing FOTA for app and modem and, if so, how can this be accomplished?[/quote]
&lt;p&gt;Yes. Just enable MCUboot and then use the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/libraries/networking/fota_download.html#fota-download"&gt;FOTA download &lt;/a&gt;library or the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/libraries/dfu/dfu_target.html#dfu-target"&gt;DFU Target&lt;/a&gt; library. (FOTA download uses DFU target behind the scenes.) With only MCUboot, MCUboot will be an immutable bootloader.&lt;/p&gt;
&lt;p&gt;In the end, the bootloader does not care how you move data into secondary slot. If there is a new, ready image in mcuboot_secondary, the bootloader will perform its part of DFU and the new image will run.&lt;/p&gt;
[quote user=""]If not, is there a way to accomplish application FOTA using NSIB?[/quote]
&lt;p&gt;Same as for MCUboot: As long as you get the image to the correct place, NSIB does the rest. So you can FOTA for NSIB as well. However, we recommend using MCUboot if you need only one bootloader.&lt;/p&gt;
&lt;p&gt;I recommend the bootloader part of &lt;a href="https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/"&gt;https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/&lt;/a&gt;. (Lesson 8)&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>