<?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>Issues with XIP execution from external QSPI on nRF with MCUBOOT</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/125422/issues-with-xip-execution-from-external-qspi-on-nrf-with-mcuboot</link><description>Hi all, 
 I am trying to execute an application in XIP mode from an external QSPI flash on an nRF device (nRF5340, Zephyr + MCUBOOT). The setup is: 
 
 Partition file:pm_static.yml 
 
 
 
 prj.conf snippet: 
 
 
 
 The QSPI is correctly flashed using</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 27 Nov 2025 21:59:22 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/125422/issues-with-xip-execution-from-external-qspi-on-nrf-with-mcuboot" /><item><title>RE: Issues with XIP execution from external QSPI on nRF with MCUBOOT</title><link>https://devzone.nordicsemi.com/thread/555673?ContentTypeID=1</link><pubDate>Thu, 27 Nov 2025 21:59:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:54b23d5a-0658-416c-babc-8de2d89e26a3</guid><dc:creator>PjGlasso</dc:creator><description>&lt;p&gt;Hi there,&lt;/p&gt;
&lt;h3 data-start="2870" data-end="2914"&gt;Use &lt;strong data-start="2881" data-end="2900"&gt;multi-image DFU&lt;/strong&gt; / split image&lt;/h3&gt;
&lt;p data-start="2916" data-end="3049"&gt;Nordic has a &lt;strong data-start="2929" data-end="2953"&gt;QSPI XIP split-image&lt;/strong&gt; feature: one image in internal flash, one in QSPI, managed as separate images under MCUboot.&lt;/p&gt;
&lt;p data-start="3051" data-end="3062"&gt;High level:&lt;/p&gt;
&lt;ol data-start="3064" data-end="3388"&gt;
&lt;li data-start="3064" data-end="3190"&gt;
&lt;p data-start="3067" data-end="3097"&gt;&lt;strong data-start="3067" data-end="3088"&gt;Partition manager&lt;/strong&gt; defines:&lt;/p&gt;
&lt;ul data-start="3101" data-end="3190"&gt;
&lt;li data-start="3101" data-end="3139"&gt;
&lt;p data-start="3103" data-end="3139"&gt;&lt;code data-start="3103" data-end="3120"&gt;mcuboot_primary&lt;/code&gt; (internal flash)&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="3143" data-end="3190"&gt;
&lt;p data-start="3145" data-end="3190"&gt;&lt;code data-start="3145" data-end="3156"&gt;xip_image&lt;/code&gt; (external flash, QSPI) or similar&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li data-start="3192" data-end="3298"&gt;
&lt;p data-start="3195" data-end="3225"&gt;Build produces &lt;strong data-start="3210" data-end="3224"&gt;two images&lt;/strong&gt;:&lt;/p&gt;
&lt;ul data-start="3229" data-end="3298"&gt;
&lt;li data-start="3229" data-end="3259"&gt;
&lt;p data-start="3231" data-end="3259"&gt;Image 0: main app (internal)&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="3263" data-end="3298"&gt;
&lt;p data-start="3265" data-end="3298"&gt;Image 1: XIP data (model in QSPI)&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li data-start="3300" data-end="3388"&gt;
&lt;p data-start="3303" data-end="3336"&gt;With mcumgr/dfu-util they upload:&lt;/p&gt;
&lt;ul data-start="3340" data-end="3388"&gt;
&lt;li data-start="3340" data-end="3363"&gt;
&lt;p data-start="3342" data-end="3363"&gt;Slot 0 &amp;rarr; internal app&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="3367" data-end="3388"&gt;
&lt;p data-start="3369" data-end="3388"&gt;Slot 1 &amp;rarr; QSPI image&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p data-start="3390" data-end="3494"&gt;This is more work, but it&amp;rsquo;s the &amp;ldquo;official&amp;rdquo; way if they need firmware-style updates to the QSPI contents.&lt;/p&gt;
&lt;p data-start="3390" data-end="3494"&gt;HTH&lt;/p&gt;
&lt;p data-start="3390" data-end="3494"&gt;GL :-) PJ :v:&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issues with XIP execution from external QSPI on nRF with MCUBOOT</title><link>https://devzone.nordicsemi.com/thread/553555?ContentTypeID=1</link><pubDate>Thu, 06 Nov 2025 12:31:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:966c60dd-b270-461d-8397-b299c15135cf</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello&amp;nbsp;&lt;span&gt;Rémi,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I&amp;#39;m not aware of any plans to add support direct-xip with external memory on this device, and I&amp;#39;m not sure how much effort it will take. Based on your current findings it seems that you will at least need to run parts of the application such as the QSPI driver from flash.&lt;/span&gt;&lt;/p&gt;
[quote user="Remi Moessner"]The main advantage of using external QSPI is to avoid SWAP during update (by using xip_offset). Do you have any solution to avoid swapping between two bank with a split image ? Is it possible ?[/quote]
&lt;p&gt;But is reducing the FW activation times with a few seconds worth performance reduction during normal operation? Your FW&amp;nbsp;is going to run differently depending on whether it&amp;#39;s being executed from internal or external flash which also may increase your test requirements.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regars,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span&gt;Vidar&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issues with XIP execution from external QSPI on nRF with MCUBOOT</title><link>https://devzone.nordicsemi.com/thread/553530?ContentTypeID=1</link><pubDate>Thu, 06 Nov 2025 09:34:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6c72b5ee-debd-4f11-afdf-3bb9644ff811</guid><dc:creator>Remi Moessner</dc:creator><description>&lt;p&gt;Hello VIdar,&lt;/p&gt;
&lt;p&gt;Thanks for your answer&lt;/p&gt;
[quote userid="4240" url="~/f/nordic-q-a/125422/issues-with-xip-execution-from-external-qspi-on-nrf-with-mcuboot/553488"]The&amp;nbsp;mcuboot &lt;a href="https://docs.nordicsemi.com/bundle/ncs-3.1.1/page/mcuboot/design.html#equal_slots_direct-xip"&gt;direct xip&lt;/a&gt; feature is&amp;nbsp;currently not supported with external memory.&amp;nbsp;[/quote]
&lt;p&gt;OK, is it planned ?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote userid="4240" url="~/f/nordic-q-a/125422/issues-with-xip-execution-from-external-qspi-on-nrf-with-mcuboot/553488"]However, since executing code from directly from QSPI flash also adds a significant performance penalty in terms of execution speed and power consumption compared to running code from internal flash (see&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/app_dev/device_guides/nrf53/qspi_xip_guide_nrf5340.html#indication_of_xip_performance"&gt;Indication of XIP performance&lt;/a&gt;) I would recommend consiering the QSPI XIP split image approach described here:&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/app_dev/bootloaders_dfu/qspi_xip_split_image.html"&gt;https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/app_dev/bootloaders_dfu/qspi_xip_split_image.html&lt;/a&gt;&amp;nbsp;instead. This is assuming&amp;nbsp;that&amp;nbsp;goal is to free up internal memory.[/quote]
&lt;p&gt;I based my initial investigation on this example and tried to simplified to avoid using internal memory :)&lt;/p&gt;
&lt;p&gt;The main advantage of using external QSPI is to avoid SWAP during update (by using xip_offset). Do you have any solution to avoid swapping between two bank with a split image ? Is it possible ?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;/p&gt;
&lt;p&gt;R&amp;eacute;mi&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issues with XIP execution from external QSPI on nRF with MCUBOOT</title><link>https://devzone.nordicsemi.com/thread/553488?ContentTypeID=1</link><pubDate>Wed, 05 Nov 2025 19:49:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:110306bc-7212-4758-aacc-36c4db1e7d0a</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello&amp;nbsp;&lt;span&gt;Rémi,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;The&amp;nbsp;mcuboot &lt;a href="https://docs.nordicsemi.com/bundle/ncs-3.1.1/page/mcuboot/design.html#equal_slots_direct-xip"&gt;direct xip&lt;/a&gt; feature is&amp;nbsp;currently not supported with external memory.&amp;nbsp; However, since executing code from directly from QSPI flash also adds a significant performance penalty in terms of execution speed and power consumption compared to running code from internal flash (see&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/app_dev/device_guides/nrf53/qspi_xip_guide_nrf5340.html#indication_of_xip_performance"&gt;Indication of XIP performance&lt;/a&gt;) I would recommend consiering the QSPI XIP split image approach described here:&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/app_dev/bootloaders_dfu/qspi_xip_split_image.html"&gt;https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/app_dev/bootloaders_dfu/qspi_xip_split_image.html&lt;/a&gt;&amp;nbsp;instead. This is assuming&amp;nbsp;that&amp;nbsp;goal is to free up internal memory.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>