<?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>nRF5340 DFU both cores with external flash</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/105028/nrf5340-dfu-both-cores-with-external-flash</link><description>My current project is using nRF5340, NCS 2.3.0, nRF5340-DK hardware, and development environment is VS code in Windows. At present I&amp;#39;m struggling to get DFU working to update both the app and net cores. 
 I think that what&amp;#39;s happening now is this: the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 15 Mar 2024 12:09:06 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/105028/nrf5340-dfu-both-cores-with-external-flash" /><item><title>RE: nRF5340 DFU both cores with external flash</title><link>https://devzone.nordicsemi.com/thread/474073?ContentTypeID=1</link><pubDate>Fri, 15 Mar 2024 12:09:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:abfbfff7-0f79-496e-bd39-7ba648eef743</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;I think this is fixed in &lt;a href="https://github.com/vidarbe/sdk-nrf/commit/00ee7b3e0a562304dca7c8da2d3ad4c5b6cc3e9d"&gt;https://github.com/vidarbe/sdk-nrf/commit/00ee7b3e0a562304dca7c8da2d3ad4c5b6cc3e9d&lt;/a&gt; which should be part of v2.6.0.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 DFU both cores with external flash</title><link>https://devzone.nordicsemi.com/thread/473925?ContentTypeID=1</link><pubDate>Thu, 14 Mar 2024 14:40:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d5183370-fa4e-444a-ba9e-6868c1b3cffa</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;I tried again now, and got that issue.&lt;/p&gt;
&lt;p&gt;So it was just I who had missed something&lt;/p&gt;
&lt;p&gt;But that is good, now I can get into debugging this on my side.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 DFU both cores with external flash</title><link>https://devzone.nordicsemi.com/thread/473717?ContentTypeID=1</link><pubDate>Wed, 13 Mar 2024 15:57:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:28c23998-7786-448f-8bda-6c653e30d31b</guid><dc:creator>caeg</dc:creator><description>&lt;p&gt;OK, I&amp;#39;ve done the same with SDK v2.5.2: rm -rf build; west build -b nrf5340dk_nrf5340_cpuapp; west flash --recover. This boots on my 5340DK board. Repeating the steps, except building for _ns target, I get the same mcuboot error. And yes you understood correctly, this occurs when I flash the image directly over USB/Jlink. This 2.5.2 was installed only last week so I haven&amp;#39;t had much opportunity to make (and forget) changes in it yet. ;-)&lt;/p&gt;
&lt;pre&gt;I: Starting bootloader&lt;br /&gt;I: Image index: 0, Swap type: none&lt;br /&gt;I: Image index: 1, Swap type: none&lt;br /&gt;E: Image in the primary slot is not valid!&lt;br /&gt;E: Unable to find bootable image&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 DFU both cores with external flash</title><link>https://devzone.nordicsemi.com/thread/473621?ContentTypeID=1</link><pubDate>Wed, 13 Mar 2024 11:53:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1a30be52-680c-452b-b6d9-abc8b839d2f4</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Welcome back!&lt;/p&gt;
&lt;p&gt;Can you try the same for v2.5.2?&lt;br /&gt;I tried to build my sample for this version, and it builds and runs (first time at least did not try further) for _ns target.&lt;br /&gt;Or do you mean that it can not find the new image after DFU?&lt;/p&gt;
&lt;p&gt;If not we will have to figure out what differs from our installs here. &lt;br /&gt;Note: I did not test that sample very thurroughly for the _ns target before, so I would not be surprised if there are any errors here.&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><item><title>RE: nRF5340 DFU both cores with external flash</title><link>https://devzone.nordicsemi.com/thread/473311?ContentTypeID=1</link><pubDate>Mon, 11 Mar 2024 23:45:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ebd5c7f7-5099-41af-bc39-3a81f74bca40</guid><dc:creator>caeg</dc:creator><description>&lt;p&gt;Hi Sigurd,&lt;/p&gt;
&lt;p&gt;The project got busy and we needed to make progress on other features so OTA has been laid aside for the past few months. We&amp;#39;re back to it now. I saw the invitation for the upcoming OTA webinar and decided I should get this dusted off so I&amp;#39;ll be ready. :-)&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve cloned your repo again and built the sample in the mcuboot_smp_ble_simultaneous directory. This is for nrf5340dk_nrf5340_cpuapp board in Windows 10 with SDK 2.5.0, on the command line in a bash shell opened via Toolchain Manager. This configuration worked - repeatedly! I&amp;#39;ve pushed an OTA update from nRF Connect on Android to the device multiple times and confirmed both nRF5340 cores are updated. This is all as per the README.md file in that repo.&lt;/p&gt;
&lt;p&gt;We&amp;#39;re using the _ns configuration in our project though so I tried building the sample for nrf5340dk_nrf5340_cpuapp_ns. This doesn&amp;#39;t work: mcuboot complained &amp;quot;Unable to find bootable image&amp;quot;.&lt;/p&gt;
&lt;p&gt;My thoughts went first to partition manager. I&amp;#39;ve copied the generated partition.yml file from both builds (ns and not), copied the non-ns one to pm_static.yml, and started merging pieces from the ns version into my pm_static.yml. The result was inconclusive - I couldn&amp;#39;t boil it down to a particular piece that reliably correlated to an image that booted or not.&lt;/p&gt;
&lt;p&gt;Do you have any suggestions about the bootable image problem, or (better) about the bigger issue of running OTA in combination with an _ns target?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 DFU both cores with external flash</title><link>https://devzone.nordicsemi.com/thread/453184?ContentTypeID=1</link><pubDate>Tue, 31 Oct 2023 07:50:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:32021fcc-aefb-432f-b5ab-2e6067a2e2aa</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>[quote user="caeg"]Finally I arrived at the base sample again -- in fact, I used git restore to ensure this -- but still the sample no longer works.[/quote]
&lt;p&gt;This is odd indeed. Since the sample worked before, something is wrong here, and I think it is a good idea to figure out what that is before we go on.&lt;/p&gt;
[quote user="caeg"]There must be something causing your sample to not work now, but I haven&amp;#39;t been able to identify what it could be. Like I said, I&amp;#39;ve reset the code to its state from your repo. Also I&amp;#39;ve deleted my build directory, re-started VS code.. I&amp;#39;m running out of ideas![/quote]
&lt;p&gt;These are the things I would suggest:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Delete build directory&lt;/li&gt;
&lt;li&gt;flash with erase all&lt;/li&gt;
&lt;li&gt;erase qspi&lt;/li&gt;
&lt;li&gt;re-start VS Code&lt;/li&gt;
&lt;li&gt;Reset repo&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Then one step which you have not mentioned:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Check that you have no changes to the nRF Connect SDK
&lt;ul&gt;
&lt;li&gt;This can be done by doing &amp;quot;git status&amp;quot; from inside the different git folders. The relevant folders here would be nrf, zephyr and bootloader/mcuboot.&lt;/li&gt;
&lt;li&gt;Changing nRF Connect SDK versjon should also make sure that no changes are made to it.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Also:&lt;/p&gt;
&lt;p&gt;Do you see the same issue if you update only the application core with app_update.bin?&lt;br /&gt;Same for net_core_app_update.bin, do you see the issue?&lt;/p&gt;
&lt;p&gt;Or is it only if you update both?&lt;/p&gt;
&lt;p&gt;Which changes have you done to the project in the update file you send?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 DFU both cores with external flash</title><link>https://devzone.nordicsemi.com/thread/452813?ContentTypeID=1</link><pubDate>Fri, 27 Oct 2023 14:15:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d776a55d-8f73-4ad8-a0fb-9aa196ffc4dc</guid><dc:creator>caeg</dc:creator><description>&lt;p&gt;Yes, I have run into some trouble. I added items that were in my .conf files into yours until finally the upgrade broke. Then I began undoing my changes out of your sample. Finally I arrived at the base sample again -- in fact, I used git restore to ensure this -- but still the sample no longer works.&lt;/p&gt;
&lt;p&gt;After I upload the dfu_application.zip via BLE I see the following messages from mcuboot in the app core serial port:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;*** Booting Zephyr OS build v3.2.99-ncs2 ***
AAA this to see it change.
Bluetooth initialized
Advertising successfully started
I: Starting bootloader
I: Swap type: perm
I: Swap type: perm
I: Image upgrade secondary slot -&amp;gt; primary slot
I: Erasing the primary slot
I: Copying the secondary slot to the primary slot: 0x1cbb8 bytes
I: Image upgrade secondary slot -&amp;gt; primary slot
I: Erasing the primary slot
I: Copying the secondary slot to the primary slot: 0x2e040 bytes
I: Starting bootloader
I: Swap type: none
I: Swap type: perm
I: Image upgrade secondary slot -&amp;gt; primary slot
I: Erasing the primary slot
I: Copying the secondary slot to the primary slot: 0x2e040 bytes
I: Starting bootloader
I: Swap type: none
I: Swap type: perm
I: Image upgrade secondary slot -&amp;gt; primary slot
I: Erasing the primary slot
I: Copying the secondary slot to the primary slot: 0x2e040 bytes&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;As you can see, the app core image updates but the net core image is incomplete. The 0x2e040-size image is repeatedly copied to the primary slot but it does not progress further.&lt;/p&gt;
&lt;p&gt;Earlier, when your sample was working for me, I noticed that after the first time copying the 0x2e040-size image a message printed like &amp;quot;Net core turning on&amp;quot; or similar. That message is not printing now.&lt;/p&gt;
&lt;p&gt;This looping of copying the 0x2e040-size image continues even if I reset the board or re-flash the board. As described in my first post, I found I could stop this by erasing the QSPI flash with nrfjprog.&lt;/p&gt;
&lt;p&gt;There must be something causing your sample to not work now, but I haven&amp;#39;t been able to identify what it could be. Like I said, I&amp;#39;ve reset the code to its state from your repo. Also I&amp;#39;ve deleted my build directory, re-started VS code.. I&amp;#39;m running out of ideas!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 DFU both cores with external flash</title><link>https://devzone.nordicsemi.com/thread/452496?ContentTypeID=1</link><pubDate>Thu, 26 Oct 2023 10:35:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6891d3b0-e50e-4492-95c9-24b4f730b32d</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Nice&lt;br /&gt;Let me know if you have some questions along the way.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 DFU both cores with external flash</title><link>https://devzone.nordicsemi.com/thread/452400?ContentTypeID=1</link><pubDate>Thu, 26 Oct 2023 03:31:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2acc7d3b-0c3b-4245-8f9b-b76ad30bfc83</guid><dc:creator>caeg</dc:creator><description>&lt;p&gt;Thanks. I was able to build and run your sample. I have more work to do to discover why yours works and mine doesn&amp;#39;t -- everything that is in your .conf files is also in my .conf files, for example.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 DFU both cores with external flash</title><link>https://devzone.nordicsemi.com/thread/452190?ContentTypeID=1</link><pubDate>Wed, 25 Oct 2023 09:11:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:15635088-b525-4c40-bb67-e8abb48d48f8</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I got a sample for updating both cores at &lt;a href="https://github.com/hellesvik-nordic/samples_for_nrf_connect_sdk/tree/main/bootloader_samples/nrf5340"&gt;https://github.com/hellesvik-nordic/samples_for_nrf_connect_sdk/tree/main/bootloader_samples/nrf5340&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Official documentation can be found at &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/device_guides/working_with_nrf/nrf53/nrf5340.html#simultaneous-multi-image-dfu"&gt;Simultaneous multi-image DFU&lt;/a&gt;.&lt;/p&gt;
[quote user=""]how can I verify that it went to exernal flash?[/quote]
&lt;p&gt;It is a bit hard to verify it in runtime, but you can check that all partitions are correct with VS Code Memory Report -&amp;gt; Partitions&lt;/p&gt;
&lt;p&gt;Is this helpful?&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>