<?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 non-simultaneous netcore updates with external QSPI</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/89742/nrf5340-non-simultaneous-netcore-updates-with-external-qspi</link><description>Development Environment: VS Code on Windows 10, SDK: 2.0.0, HW: nRF5340 Development Kit I am trying to perform just a network core update on the nRF5340 DK based off of the smp_svr sample where the secondary slot for incoming updates is on an external</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 25 Nov 2022 10:24:57 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/89742/nrf5340-non-simultaneous-netcore-updates-with-external-qspi" /><item><title>RE: nRF5340 non-simultaneous netcore updates with external QSPI</title><link>https://devzone.nordicsemi.com/thread/397600?ContentTypeID=1</link><pubDate>Fri, 25 Nov 2022 10:24:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:173ccc35-22ee-48cc-a1c4-03df48d853dd</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi Darshan,&lt;/p&gt;
&lt;p&gt;There have been a lot of discussion in this case, so it can be hard to tell which issue you are referring to&lt;/p&gt;
&lt;p&gt;Please create a new ticket, and we will help you with your problem.&amp;nbsp;&lt;br /&gt;Feel free to link to this case in your new ticket.&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 non-simultaneous netcore updates with external QSPI</title><link>https://devzone.nordicsemi.com/thread/397537?ContentTypeID=1</link><pubDate>Fri, 25 Nov 2022 06:57:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2ef7ecd2-67ce-4993-b3f3-a11b12e468ed</guid><dc:creator>ErDarshan</dc:creator><description>&lt;p&gt;Any update?&lt;br /&gt;I am also facing the same issue. Saving netcore image in mcuboot_secondary and setting permanent flag, upgrade app core with net core image.&lt;br /&gt;&lt;br /&gt;How to have support of non simultaneous upgrade on NRF53 (App core &amp;amp; Net core)? I am using NCS2.1.0&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 non-simultaneous netcore updates with external QSPI</title><link>https://devzone.nordicsemi.com/thread/386467?ContentTypeID=1</link><pubDate>Thu, 15 Sep 2022 22:04:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f2756ce5-89df-4190-9233-cc9d9ad4f1de</guid><dc:creator>Riccardo Gaiati</dc:creator><description>&lt;p&gt;Hi Simon,&lt;/p&gt;
&lt;p&gt;is there any update about a new version of MCUboot which fixes this problem ? I have been told sdk 2.1.0 might contain some fixes, but as far as i can see, it does not.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks in advance !&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 non-simultaneous netcore updates with external QSPI</title><link>https://devzone.nordicsemi.com/thread/380755?ContentTypeID=1</link><pubDate>Tue, 09 Aug 2022 08:18:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:88862ca9-1146-4577-b790-0abfe0744a9b</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I have explained how to do relative-path MCUBoot keys in &lt;a href="https://devzone.nordicsemi.com/support-private/support/292882#permalink=776206"&gt;another ticket&lt;/a&gt;, and I guess you should be able to use the same method for the hooks. I will copy the relevant answer in below here as well, as the context is not really needed:&lt;/p&gt;
&lt;p&gt;&amp;quot;&lt;/p&gt;
&lt;p&gt;Here are some info on how I have been setting the path to the private key for MCUBoot:&lt;/p&gt;
&lt;p&gt;If you have your mcuboot.conf inside the child_image/ folder, the application will look for your key in &amp;quot;ncs/bootloader/mcuboot/boot/zephyr/&amp;quot; I think.&lt;/p&gt;
&lt;p&gt;To work around this, you can create a &amp;quot;child_image/mcuboot&amp;quot; folder, and place the key +&amp;nbsp; a prj.conf file inside this folder, as I show in &lt;a href="https://github.com/hellesvik-nordic/samples_for_nrf_connect_sdk/tree/main/bootloader_samples/mcuboot_manual_sign"&gt;my sample&lt;/a&gt;. This way, mcuboot will find your key file in your own project (See &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/ug_multi_image.html"&gt;Multi Image builds&lt;/a&gt; for the explanation of this folder setup).&lt;/p&gt;
&lt;p&gt;Another alternative is to use CMake to add the key yourself. To do this, you need some extra apostrophes and backslashes, but the following line into CMakeLists.txt should point to a key in the directory below your source directory.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;set(mcuboot_CONFIG_BOOT_SIGNATURE_KEY_FILE \\&amp;quot;${CMAKE_CURRENT_SOURCE_DIR}/../private_key.pem\\&amp;quot;)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;(Try &amp;quot;message(${CMAKE_CURRENT_SOURCE_DIR}) in CMake to test the path)&lt;br /&gt;&amp;quot;&lt;/p&gt;
&lt;p&gt;Is this what you were looking for?&lt;/p&gt;
&lt;p&gt;EDIT: Since you use windows, you might have to pay some attention to which way the slashes go in the CMake path definitions. Also from the same post as the one I linked above:&lt;br /&gt;&amp;quot;Escaping the backslashes may have worked too, but I have only tried just changing all the back slashes to forward slashes. This is probably only going to be an issue on Windows based development systems.&amp;quot;&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 non-simultaneous netcore updates with external QSPI</title><link>https://devzone.nordicsemi.com/thread/380631?ContentTypeID=1</link><pubDate>Mon, 08 Aug 2022 13:35:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c6caf981-f418-4f7d-b113-0b9104abe8d6</guid><dc:creator>D Miller</dc:creator><description>&lt;p&gt;Is it possible to set a path for this file relative to my source directory (such as the hooks file I wish to use being in my project directory)? Seems like the current setup makes it a little hard to introduce the hooks from an out-of-tree application without using an absolute path for the hooks file.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 non-simultaneous netcore updates with external QSPI</title><link>https://devzone.nordicsemi.com/thread/379765?ContentTypeID=1</link><pubDate>Tue, 02 Aug 2022 16:42:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:181df8f1-622c-44ed-af80-dd501ecd0fa2</guid><dc:creator>D Miller</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;The tips to get the hooks file started were useful. I am needing to do a little more testing to confirm but I might have a hooks file way to perform this update scheme. Have done a net core update.&lt;br /&gt;&lt;br /&gt;Will know more by the end of the week but I am no longer stuck.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Derrick&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 non-simultaneous netcore updates with external QSPI</title><link>https://devzone.nordicsemi.com/thread/379327?ContentTypeID=1</link><pubDate>Fri, 29 Jul 2022 13:06:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8b307c4c-3784-4ad1-87ee-a5a97ef298cb</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;Hello Miller,&lt;/p&gt;
&lt;p&gt;What is the current state on this? Were you able to implement the changes to a hook file? Unfortunately, I haven&amp;#39;t gotten time myself to do it yet. I will be gone for the next two weeks, and my colleague Sigurd will watch the case in the meanwhile (he will be gone until 2 of Aug.).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 non-simultaneous netcore updates with external QSPI</title><link>https://devzone.nordicsemi.com/thread/378182?ContentTypeID=1</link><pubDate>Thu, 21 Jul 2022 21:38:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2357cb14-b597-4165-9183-de834b129996</guid><dc:creator>Simon</dc:creator><description>[quote user="D Miller"]Yes, I did try with and without&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/v2.0.0/modules/mcuboot/boot/zephyr/Kconfig#L98"&gt;CONFIG_&lt;/a&gt;&lt;span&gt;&lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/v2.0.0/modules/mcuboot/boot/zephyr/Kconfig#L98"&gt;BOOT_IMAGE_ACCESS_HOOKS&lt;/a&gt;. This required I do the whole CONFIG_UPDATEABLE_IMAGE_NUMBER=2&amp;nbsp;and&amp;nbsp;&lt;/span&gt;&lt;span&gt;CONFIG_BOOT_UPGRADE_ONLY&lt;/span&gt;&lt;span&gt;=y to get running (the depends for the KConfig on that flag seem to confirm) as there is code in the hooks that assume &amp;gt;1 slots on the secondary and the partitions only seem to be correctly&amp;nbsp;generated with that configuration.&amp;nbsp;But we are not wanting upgrade only updates.&lt;/span&gt;[/quote]
&lt;p&gt;I was able to enable CONFIG_BOOT_IMAGE_ACCESS_HOOKS, I simply set&amp;nbsp;&lt;span&gt;CONFIG_BOOT_IMAGE_ACCESS_HOOKS&lt;/span&gt;&lt;span&gt;=y inside&amp;nbsp;&lt;em&gt;smp_svr\child_image\mcuboot.conf &lt;/em&gt;(should be set in mcuboot sample, not main application). However, I did get some errors, but that is not related to the Kconfigs, but the nrf53_hooks.c file. The nrf53_hooks.c file tries to access the primary_1 partition, which is not present in your case since you&amp;#39;re not doing multi-image updates. I then modified&amp;nbsp;nrf\modules\mcuboot\hooks\nrf53_hooks.c like shown below and was able to build the sample:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;diff --git a/modules/mcuboot/hooks/nrf53_hooks.c b/modules/mcuboot/hooks/nrf53_hooks.c
index ebc61666c..fb7213f3c 100644
--- a/modules/mcuboot/hooks/nrf53_hooks.c
+++ b/modules/mcuboot/hooks/nrf53_hooks.c
@@ -24,7 +24,7 @@ int boot_read_image_header_hook(int img_index, int slot,
 	if (img_index == 1 &amp;amp;&amp;amp; slot == 0) {
 		img_head-&amp;gt;ih_magic = IMAGE_MAGIC;
 		img_head-&amp;gt;ih_hdr_size = PM_MCUBOOT_PAD_SIZE;
-		img_head-&amp;gt;ih_load_addr = PM_MCUBOOT_PRIMARY_1_ADDRESS;
+		img_head-&amp;gt;ih_load_addr = 0x00;//PM_MCUBOOT_PRIMARY_1_ADDRESS;
 		img_head-&amp;gt;ih_img_size = PM_CPUNET_APP_SIZE;
 		img_head-&amp;gt;ih_flags = 0;
 		img_head-&amp;gt;ih_ver.iv_major = 0;
@@ -81,10 +81,10 @@ int network_core_update(bool wait)
 	void *mock_flash;
 	size_t mock_size;
 
-	mock_flash_dev = device_get_binding(PM_MCUBOOT_PRIMARY_1_DEV_NAME);
+	/*mock_flash_dev = device_get_binding(PM_MCUBOOT_PRIMARY_1_DEV_NAME);
 	if (mock_flash_dev == NULL) {
 		return -ENODEV;
-	}
+	}*/
 
 	mock_flash = flash_simulator_get_memory(NULL, &amp;amp;mock_size);
 	hdr = (struct image_header *) mock_flash;&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Then I could see that&amp;nbsp;&lt;span&gt;CONFIG_BOOT_IMAGE_ACCESS_HOOKS was set to y and that&amp;nbsp;&lt;/span&gt;&lt;span&gt;CONFIG_BOOT_IMAGE_ACCESS_HOOKS_FILE was equal to&amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;quot;nrf/modules/mcuboot/hooks/nrf53_hooks.c&amp;quot; in&amp;nbsp;&lt;em&gt;smp_svr\build\mcuboot\zephyr\.config&lt;/em&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Be aware that the above file is not meant to work, I made it just so the code would compile, and it can be a starting point for creating your own custom hook file.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Of course the proper way would be&amp;nbsp;to add your own file to&amp;nbsp;&lt;em&gt;nrf/modules/mcuboot/hooks/&lt;/em&gt; and&amp;nbsp;set&amp;nbsp;CONFIG_BOOT_IMAGE_ACCESS_HOOKS_FILE&amp;nbsp;(in &lt;em&gt;smp_svr\child_image\mcuboot.conf&lt;/em&gt;) accordingly.&lt;/span&gt;&lt;/p&gt;
[quote user="D Miller"] there seems to be some discussion relating to this specifically where hooks do not cover the functionality we are seeking.[/quote]
&lt;p&gt;Yes, that is true. The nrf53_hooks.c file is tailored towards multi-image, so it needs to be modified to your need, non simultaneous netcore/appcore updates.&lt;/p&gt;
&lt;p&gt;I did try to play around and add the changes you made to loader.c into the hooks file, but wasn&amp;#39;t able to make it work (the hooks stuff are new to me and I don&amp;#39;t have complete control of how it works).&amp;nbsp;I will see if I can get it to work the next days. If you succeed if would be nice if you could share the solution, as I&amp;#39;m sure many other customer will benefit from it as well.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 non-simultaneous netcore updates with external QSPI</title><link>https://devzone.nordicsemi.com/thread/378160?ContentTypeID=1</link><pubDate>Thu, 21 Jul 2022 15:14:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1b73cf65-f632-4ef3-b3fa-1edabe9213c0</guid><dc:creator>D Miller</dc:creator><description>&lt;p&gt;(moved my reply up here)&lt;br /&gt;&lt;br /&gt;Hello,&lt;/p&gt;
&lt;p&gt;Yes, I did try with and without&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/v2.0.0/modules/mcuboot/boot/zephyr/Kconfig#L98"&gt;CONFIG_&lt;/a&gt;&lt;span&gt;&lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/v2.0.0/modules/mcuboot/boot/zephyr/Kconfig#L98"&gt;BOOT_IMAGE_ACCESS_HOOKS&lt;/a&gt;. This required I do the whole CONFIG_UPDATEABLE_IMAGE_NUMBER=2&amp;nbsp;and&amp;nbsp;&lt;/span&gt;&lt;span&gt;CONFIG_BOOT_UPGRADE_ONLY&lt;/span&gt;&lt;span&gt;=y to get running (the depends for the KConfig on that flag seem to confirm) as there is code in the hooks that assume &amp;gt;1 slots on the secondary and the partitions only seem to be correctly&amp;nbsp;generated with that configuration.&amp;nbsp;But we are not wanting upgrade only updates.&lt;/span&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The net core updates in nrf53_hooks.c are hooked to `boot_copy_region_post_hook` and `boot_serial_uploaded_hook`.&amp;nbsp;The first is called in loader.c `boot_copy_image` which is only used in&amp;nbsp; `MCUBOOT_OVERWRITE_ONLY` configurations. And the latter&amp;nbsp;is used for serial recovery.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;In the github patch conversation (&lt;a href="https://github.com/nrfconnect/sdk-mcuboot/pull/197"&gt;[nrf noup] loader: Fix reading reset addr to support ext flash by chrta &amp;middot; Pull Request #197 &amp;middot; nrfconnect/sdk-mcuboot &amp;middot; GitHub&lt;/a&gt;), there seems to be some discussion relating to this specifically where hooks do not cover the functionality we are seeking.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1658415690213v1.png" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 non-simultaneous netcore updates with external QSPI</title><link>https://devzone.nordicsemi.com/thread/378079?ContentTypeID=1</link><pubDate>Thu, 21 Jul 2022 12:00:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:053c1f3d-fa86-40b6-aae9-9e3d691604b4</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;Did you remember to enable&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/v2.0.0/modules/mcuboot/boot/zephyr/Kconfig#L98"&gt;CONFIG_&lt;/a&gt;&lt;span&gt;&lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/v2.0.0/modules/mcuboot/boot/zephyr/Kconfig#L98"&gt;BOOT_IMAGE_ACCESS_HOOKS&lt;/a&gt;?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Then add&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/v2.0.0/modules/mcuboot/boot/zephyr/Kconfig#L93"&gt;CONFIG_BOOT_IMAGE_ACCESS_HOOKS_FILE&lt;/a&gt; to your prj.conf file and set it to your custom hook file. That is better than trying to modify loader.c. By default the hook file&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/v2.0.0/modules/mcuboot/hooks/nrf53_hooks.c"&gt;modules/mcuboot/hooks/nrf53_hooks.c&lt;/a&gt; is used:&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/v2.0.0/modules/mcuboot/boot/zephyr/Kconfig#L95"&gt;https://github.com/nrfconnect/sdk-nrf/blob/v2.0.0/modules/mcuboot/boot/zephyr/Kconfig#L95&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 non-simultaneous netcore updates with external QSPI</title><link>https://devzone.nordicsemi.com/thread/377948?ContentTypeID=1</link><pubDate>Wed, 20 Jul 2022 21:56:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:05666a8e-7d1e-4a0a-83a4-5e77e01083bd</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;I&amp;#39;ve asked internally about your patch. I&amp;#39;ll get back to you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 non-simultaneous netcore updates with external QSPI</title><link>https://devzone.nordicsemi.com/thread/377717?ContentTypeID=1</link><pubDate>Tue, 19 Jul 2022 17:53:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:88c4d014-207f-4e8c-ae75-d93fe20b3399</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;Hello D Miller,&lt;/p&gt;
&lt;p&gt;I got affected by the SAS strike in Norway and didn&amp;#39;t get home until today.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll look into this the next days&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 non-simultaneous netcore updates with external QSPI</title><link>https://devzone.nordicsemi.com/thread/377664?ContentTypeID=1</link><pubDate>Tue, 19 Jul 2022 13:44:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:94d61e6f-d5b7-4502-b8f4-83b9396fefea</guid><dc:creator>D Miller</dc:creator><description>&lt;p&gt;Hello Simon,&lt;/p&gt;
&lt;p&gt;Has anyone had a chance to take a look at this matter?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 non-simultaneous netcore updates with external QSPI</title><link>https://devzone.nordicsemi.com/thread/376831?ContentTypeID=1</link><pubDate>Wed, 13 Jul 2022 16:38:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9b518ca8-760e-4180-88b0-5508c83b4a95</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;Hello D Miller,&lt;/p&gt;
&lt;p&gt;Sorry for the late repsonse in this. A huge part of the support team is on summer vacation and that may cause some delayed responses.&lt;/p&gt;
&lt;p&gt;I will test your sample&amp;nbsp;Before the weekend/Monday&amp;nbsp;and investigate the root cause of this.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 non-simultaneous netcore updates with external QSPI</title><link>https://devzone.nordicsemi.com/thread/376673?ContentTypeID=1</link><pubDate>Tue, 12 Jul 2022 18:42:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b103953f-be44-47c5-a157-121cc0c5cc16</guid><dc:creator>D Miller</dc:creator><description>&lt;p&gt;I have applied the changes in that commit in the pull request and then tried the removal of the code block also suggested, both to no avail, the system still attempts all updates like they are for the application core.&lt;/p&gt;
&lt;p&gt;I see the intention is to use nrf53_hooks.c to trigger a net core update but those hooks are only called in UPGRADE_ONLY configurations and I wish to retain app core reversion.&amp;nbsp;It seems like the code block that was suggested to be removed in the other ticket is supposed to handle the &amp;quot;one core at a time&amp;quot; netcore updates but the flash simulator in RAM just isn&amp;#39;t getting set up to pull the data from the external flash like it is in hooks.&lt;/p&gt;
&lt;p&gt;So, I applied the patch like before which correctly runs the header check, but instead of removing the further down lines as the other thread suggested, I turned them into something closer to what is done in nrf53_hooks.c:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#if defined(CONFIG_SOC_NRF5340_CPUAPP) &amp;amp;&amp;amp; defined(PM_CPUNET_B0N_ADDRESS)
        /* If the update is valid, and it targets the network core: perform the
         * update and indicate to the caller of this function that no update is
         * available
         */
        if (upgrade_valid &amp;amp;&amp;amp; reset_addr &amp;gt; PM_CPUNET_B0N_ADDRESS) {
            BOOT_LOG_INF(&amp;quot;Starting network core update&amp;quot;);
            static const struct device *mock_flash_dev;
            void *mock_flash;
            size_t mock_size;

            BOOT_LOG_INF(&amp;quot;Reading update image to flash simulator&amp;quot;);
            mock_flash_dev = device_get_binding(PM_MCUBOOT_PRIMARY_DEV_NAME);
            if (mock_flash_dev == NULL) {
                swap_type = BOOT_SWAP_TYPE_NONE;
            }
            mock_flash = flash_simulator_get_memory(mock_flash_dev, &amp;amp;mock_size);
            int rc = flash_area_read(secondary_fa, 0U, mock_flash, hdr-&amp;gt;ih_hdr_size + hdr-&amp;gt;ih_img_size);
            if (rc != 0) {
                return BOOT_SWAP_TYPE_FAIL;
            }

            BOOT_LOG_INF(&amp;quot;Starting PCD update to network core&amp;quot;);
            hdr = (struct image_header *) mock_flash;
            uint32_t vtable_addr = (uint32_t)hdr + hdr-&amp;gt;ih_hdr_size;
            uint32_t *vtable = (uint32_t *)(vtable_addr);
            rc = pcd_network_core_update(vtable, hdr-&amp;gt;ih_img_size);
            if (rc != 0) {
                swap_type = BOOT_SWAP_TYPE_FAIL;
            } else {
                BOOT_LOG_INF(&amp;quot;Done updating network core&amp;quot;);
#if defined(MCUBOOT_SWAP_USING_SCRATCH) || defined(MCUBOOT_SWAP_USING_MOVE)
                /* swap_erase_trailer_sectors is undefined if upgrade only
                 * method is used. There is no need to erase sectors, because
                 * the image cannot be reverted.
                 */
                rc = swap_erase_trailer_sectors(state,
                    secondary_fa);
#endif
                swap_type = BOOT_SWAP_TYPE_NONE;
            }
        }
#endif /* CONFIG_SOC_NRF5340_CPUAPP */&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I also added the needed includes at the top:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#if defined(CONFIG_SOC_NRF5340_CPUAPP) &amp;amp;&amp;amp; defined(PM_CPUNET_B0N_ADDRESS)
#include &amp;lt;dfu/pcd.h&amp;gt; 
#include &amp;quot;flash_map_backend/flash_map_backend.h&amp;quot;
#include &amp;lt;zephyr/drivers/flash/flash_simulator.h&amp;gt;
#endif&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;No other changes to the SDK or project.&amp;nbsp;With this, I can now perform net and app core updates one at a time from a single secondary slot on the external qspi in a way that still allows for reversion of the application core.&lt;/p&gt;
&lt;p&gt;I&amp;nbsp;don&amp;#39;t feel like I&amp;#39;m doing everything correctly here, especially with the use of the flash simulator, but I can do my update scheme. I&amp;#39;ve uploaded my loader.c, otherwise it is v2.0.0 SDK.&lt;br /&gt;&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/loader.c"&gt;devzone.nordicsemi.com/.../loader.c&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 non-simultaneous netcore updates with external QSPI</title><link>https://devzone.nordicsemi.com/thread/376224?ContentTypeID=1</link><pubDate>Fri, 08 Jul 2022 12:58:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:780ad06a-49fe-41a2-90c9-c248f693ef68</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;Check out this ticket&amp;nbsp;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/87295/busfault-when-mcuboot-reads-network-core-secondary-image-header-in-external-flash"&gt;Busfault when MCUboot reads Network core secondary image header in external flash&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Try applying this patch&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-mcuboot/pull/197/commits/b628d6e238bb15eae06a9582fb19b00ea4990e13"&gt;https://github.com/nrfconnect/sdk-mcuboot/pull/197/commits/b628d6e238bb15eae06a9582fb19b00ea4990e13&lt;/a&gt;&amp;nbsp;and see if you&amp;#39;re able to update the netcore using external flash.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>