<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://test-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>Mesh DFU - Free flash space &amp;amp; bank erasure</title><link>https://test-devzone.nordicsemi.com/f/nordic-q-a/86393/mesh-dfu---free-flash-space-bank-erasure</link><description>I have a few questions about how exactly the free flash space is intended to be managed with a banked DFU transfer. We observed some devices encounter problems after a DFU to a new application version based on Mesh SDK v5.0, which introduces a new file</description><dc:language>en-US</dc:language><generator>Telligent Community 13 Non-Production</generator><lastBuildDate>Tue, 14 Jun 2022 13:30:34 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://test-devzone.nordicsemi.com/f/nordic-q-a/86393/mesh-dfu---free-flash-space-bank-erasure" /><item><title>RE: Mesh DFU - Free flash space &amp; bank erasure</title><link>https://test-devzone.nordicsemi.com/thread/372406?ContentTypeID=1</link><pubDate>Tue, 14 Jun 2022 13:30:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e25b1f51-2970-4fad-ab5a-bc889b224558</guid><dc:creator>user15475</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Yes, one of our developer have tested the patches and it works.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mesh DFU - Free flash space &amp; bank erasure</title><link>https://test-devzone.nordicsemi.com/thread/372221?ContentTypeID=1</link><pubDate>Mon, 13 Jun 2022 18:58:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:192d1a50-7071-4b19-819f-ca1f535fa0bd</guid><dc:creator>user93769</dc:creator><description>[quote userid="15475" url="~/f/nordic-q-a/86393/mesh-dfu---free-flash-space-bank-erasure/371406#371406"]Please consider that these are only assumptions after the source code investigation. Every solution might face additional issues that will require separate solving. Additionally, both solutions require good testing since the system `bootloader + app ---&amp;gt; DFU` is quite fragile from a stability point of view.&amp;nbsp;[/quote]
&lt;p&gt;Has Nordic done a complete test of these patches all the way through, i.e. upgraded an actual device using the sequence of suggested steps?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mesh DFU - Free flash space &amp; bank erasure</title><link>https://test-devzone.nordicsemi.com/thread/371406?ContentTypeID=1</link><pubDate>Wed, 08 Jun 2022 12:45:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:63f3b18d-2e6f-47a1-ac71-cc0902ad133f</guid><dc:creator>user15475</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;An update from the team:&lt;/p&gt;
&lt;p&gt;1. The first issue might be solved in two ways:&lt;/p&gt;
&lt;p&gt;1.1 Modify DFU command&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;tt&gt;DFU_START_TARGET&lt;/tt&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;and add as a command field the address of the app mesh config end. Then modify bootloader to consider this address instead of&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;tt&gt;BOOTLOADERADDR&lt;/tt&gt;. Pros: automated communication between app and bootloader that considers ongoing sizes of areas. Cons: it requires fixing both bootloader and app dfu parts. Upload both bootloader and app but bootloader only once.&lt;/p&gt;
&lt;p&gt;It will require uploading application first. Then uploading of bootloader. Since command format incompatibility it will corrupt some memory in the command buffer but it should be safe enough.&lt;/p&gt;
&lt;p&gt;1.2 Add compile-time definition in bootloader then bootloader can consider&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;tt&gt;BOOTLOADERADDR + NEW_DEFINED_ADDRESS&lt;/tt&gt;. Then you&amp;nbsp;should follow up on this.&lt;br /&gt;Pros: it requires fixing only bootloader. Cons: it requires following up on app mesh config size and definition and aligning them manually. Upload both bootloader and app every definition change.&lt;/p&gt;
&lt;p&gt;2. The second issue requires implementation erasing allocated bank if bootloader succeeds uploaded image applying.&lt;/p&gt;
&lt;p&gt;The sequence of applying patches&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;add_cleaningup_after_succeed&amp;nbsp; &amp;nbsp;---- erase flash bank area after dfu succeeded&lt;/li&gt;
&lt;li&gt;add_app_data_as_upper_boundary&amp;nbsp; ------ reject image if it overlaps with application data area&lt;/li&gt;
&lt;li&gt;fix_assertion_during_bootbank_erasing ----- fix assertion if bootloader bank is erased&lt;/li&gt;
&lt;li&gt;rebuild application and bootloader&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;`DFU start target` command between application and bootloader has been changed and is not compatible with old versions.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;To upgrade devices with 5.0.0 on the current one you need to upload the application image first and then upload the bootloader image (not another way around).&lt;/p&gt;
&lt;p&gt;&lt;a href="https://test-devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/add_5F00_app_5F00_data_5F00_as_5F00_upper_5F00_boundary.diff"&gt;test-devzone.nordicsemi.com/.../add_5F00_app_5F00_data_5F00_as_5F00_upper_5F00_boundary.diff&lt;/a&gt;&lt;a href="https://test-devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/add_5F00_cleaningup_5F00_after_5F00_succeed.diff"&gt;test-devzone.nordicsemi.com/.../add_5F00_cleaningup_5F00_after_5F00_succeed.diff&lt;/a&gt;&lt;a href="https://test-devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/fix_5F00_assertion_5F00_during_5F00_bootbank_5F00_erasing.diff"&gt;test-devzone.nordicsemi.com/.../fix_5F00_assertion_5F00_during_5F00_bootbank_5F00_erasing.diff&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Please consider that these are only assumptions after the source code investigation. Every solution might face additional issues that will require separate solving. Additionally, both solutions require good testing since the system `bootloader + app ---&amp;gt; DFU` is quite fragile from a stability point of view.&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mesh DFU - Free flash space &amp; bank erasure</title><link>https://test-devzone.nordicsemi.com/thread/362654?ContentTypeID=1</link><pubDate>Fri, 08 Apr 2022 16:14:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:737d9504-4b1d-40b5-9ea6-c9466ea49e53</guid><dc:creator>user15475</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;span&gt;It looks like both concerns are correct. These are bugs but this will most likely be not be fixed since&amp;nbsp;the nRF5 SDK for Mesh is in maintenance mode.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;We can only recommend cleaning up the flash area that is required for Mesh&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;Configuration&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;before running Mesh after DFU.&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mesh DFU - Free flash space &amp; bank erasure</title><link>https://test-devzone.nordicsemi.com/thread/361555?ContentTypeID=1</link><pubDate>Mon, 04 Apr 2022 13:51:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ce12a0c8-1114-459a-a43d-231f9e716b56</guid><dc:creator>user15475</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I have forwarded this to our mesh team, I will give you an update as soon as possible.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>