<?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>Problem with data sharing</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/115960/problem-with-data-sharing</link><description>Hello, 
 I have a project that contains the b0+mcuboot+app. My project works but now I would like to add &amp;quot;data sharing&amp;quot; in order to retrieve some information in my application about the mcuboot (currently used slot, version number). 
 I am using the nRF</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 11 Nov 2024 13:34:36 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/115960/problem-with-data-sharing" /><item><title>RE: Problem with data sharing</title><link>https://devzone.nordicsemi.com/thread/509898?ContentTypeID=1</link><pubDate>Mon, 11 Nov 2024 13:34:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:041824cd-3e07-434e-b1ab-b16e8e9c4267</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;That needs fixing upstream, the fix will be in NCS for the v3.0 release next year.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;-Amanda H.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with data sharing</title><link>https://devzone.nordicsemi.com/thread/509626?ContentTypeID=1</link><pubDate>Fri, 08 Nov 2024 09:29:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:520a41c3-fa78-4abb-9613-ea66a5dbf96b</guid><dc:creator>QuentinD</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;OK so it&amp;#39;s normal&amp;nbsp;&lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;But then how to avoid this error? (the loader writes in the shared memory for the 2 images but fails on the second write because these TLVs are already present and therefore it stops loading)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with data sharing</title><link>https://devzone.nordicsemi.com/thread/509467?ContentTypeID=1</link><pubDate>Thu, 07 Nov 2024 13:39:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8c66fd72-e907-401a-9bd5-f10147806e0e</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="QuentinD"]But is it normal that I have 2 images?[/quote]
&lt;p&gt;image 0 is for the app and image 1 is for the b1 (mcuboot) because you have b0.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with data sharing</title><link>https://devzone.nordicsemi.com/thread/509304?ContentTypeID=1</link><pubDate>Wed, 06 Nov 2024 16:13:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:35516c42-8314-4a3f-8ba3-3a37ad59fbaa</guid><dc:creator>QuentinD</dc:creator><description>&lt;p&gt;I copied the configs of this example but I still have the same error (there is just the config &amp;quot;CONFIG_BOOT_VALIDATE_SLOT0=n&amp;quot; that I did not use).&lt;/p&gt;
&lt;p&gt;No I have to use the pm_static.yml file to be sure to be able to update the devices in the field.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;But I found where the problem is exactly but I do not know how to solve it...&lt;/p&gt;
&lt;p&gt;I have the error &amp;quot;SHARED_MEMORY_OVERWRITE&amp;quot; because the boot_add_shared_data() function is called twice. So it writes the data on the first call but, on the 2nd call, since the TLVs have already been written, it returns this error...&lt;/p&gt;
&lt;p&gt;It executes this function twice because in &amp;quot;context_boot_go()&amp;quot; it goes through all the images and calls the &amp;quot;boot_add_shared_data()&amp;quot; function for each image.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;But is it normal that I have 2 images?&lt;/p&gt;
&lt;p&gt;So I see this when I retrieve the images in my project (that the sent image is transferts in &amp;quot;image 0 slot 1&amp;quot; and &amp;quot;image 1 slot 1&amp;quot;):&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;PS C:\DocTA\Soft\TA-Smart-BT840P&amp;gt; mcumgr -c my_config image list&lt;/p&gt;
&lt;p&gt;Images:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;image=0 slot=0&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; version: 2.0.0&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; bootable: true&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; flags: active confirmed&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; hash: 2e7bda6855341724a47a3a31fc9781f0b2c14286dacee41ea540e86e1fdd3cdf&lt;/p&gt;
&lt;p&gt;Split status: N/A (0)&lt;/p&gt;
&lt;p&gt;PS C:\DocTA\Soft\TA-Smart-BT840P&amp;gt; mcumgr -c my_config image upload Application\TA_Smart\signed_by_mcuboot_and_b0_s1_image.bin -e -n2&lt;/p&gt;
&lt;p&gt;&amp;nbsp;45.84 KiB / 45.84 KiB [==============================================================================] 100.00% 2.15 KiB/s 21s&lt;/p&gt;
&lt;p&gt;Done&lt;/p&gt;
&lt;p&gt;PS C:\DocTA\Soft\TA-Smart-BT840P&amp;gt; mcumgr -c my_config image list&lt;/p&gt;
&lt;p&gt;Images:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;image=0 slot=0&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; version: 2.0.0&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; bootable: true&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; flags: active confirmed&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; hash: 2e7bda6855341724a47a3a31fc9781f0b2c14286dacee41ea540e86e1fdd3cdf&lt;/p&gt;
&lt;p&gt;&amp;nbsp;image=0 slot=1&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; version: 0.1.0&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; bootable: true&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; flags:&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; hash: 8b4aa96742d98e55f36a080328a6d260923566033484e514839d84e4fa3f76fc&lt;/p&gt;
&lt;p&gt;&amp;nbsp;image=1 slot=1&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; version: 0.1.0&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; bootable: true&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; flags:&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; hash: 8b4aa96742d98e55f36a080328a6d260923566033484e514839d84e4fa3f76fc&lt;/p&gt;
&lt;p&gt;Split status: N/A (0)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with data sharing</title><link>https://devzone.nordicsemi.com/thread/508724?ContentTypeID=1</link><pubDate>Thu, 31 Oct 2024 19:09:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:88933904-713c-471e-994a-3a5b3a001170</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;I would suggest to not use the&amp;nbsp;&lt;span&gt;pm_static.yml while developing and use it for updating via DFU stage.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Did you add&amp;nbsp;&lt;/span&gt;boards&lt;span&gt;&lt;span&gt;/&lt;/span&gt;&lt;a title="nrf52840dk_nrf52840.conf" href="https://github.com/nrfconnect/sdk-zephyr/blob/v3.6.99-ncs2/tests/boot/mcuboot_data_sharing/boards/nrf52840dk_nrf52840.conf"&gt;nrf52840dk_nrf52840.conf&lt;/a&gt;?&amp;nbsp;If this still cannot help, please use&amp;nbsp;this&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/tree/v3.6.99-ncs2/tests/boot/mcuboot_data_sharing"&gt;mcuboot_data_sharing&lt;/a&gt;&amp;nbsp;sample as a base.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with data sharing</title><link>https://devzone.nordicsemi.com/thread/508634?ContentTypeID=1</link><pubDate>Thu, 31 Oct 2024 09:50:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:afe6f2fe-430a-4d10-9aad-10ae9cb277ff</guid><dc:creator>QuentinD</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;Yes I had already seen this example but in this example they do not use the pm_static.yml file: is there something I need to write in addition in this file? You do not see anything in my config that can cause this problem?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with data sharing</title><link>https://devzone.nordicsemi.com/thread/508578?ContentTypeID=1</link><pubDate>Wed, 30 Oct 2024 17:19:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a182a42b-2600-4223-a3b1-524e70210e4f</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Check out this&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/tree/v3.6.99-ncs2/tests/boot/mcuboot_data_sharing"&gt;mcuboot_data_sharing&lt;/a&gt;&amp;nbsp;sample.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Amanda H.&lt;/p&gt;
&lt;p&gt;&lt;code dir="ltr"&gt;&lt;/code&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>