<?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>Flash data as hex with nrfutil</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/86600/flash-data-as-hex-with-nrfutil</link><description>Hi! 
 We would like to be able to send two separate dfu-packages independently, one hex/pack containing our main application and one hex/pack containing data to be read by the application. Is this possible? 
 Naturally, loading the two hex images through</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 11 Apr 2022 07:32:14 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/86600/flash-data-as-hex-with-nrfutil" /><item><title>RE: Flash data as hex with nrfutil</title><link>https://devzone.nordicsemi.com/thread/362753?ContentTypeID=1</link><pubDate>Mon, 11 Apr 2022 07:32:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:74fbd30b-d6f1-44b0-a687-d5faf780f36c</guid><dc:creator>raspet</dc:creator><description>&lt;p&gt;Okay, thanks for the clarification!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flash data as hex with nrfutil</title><link>https://devzone.nordicsemi.com/thread/361811?ContentTypeID=1</link><pubDate>Tue, 05 Apr 2022 11:08:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:34e09c6c-81d5-4563-ba4f-111cd8df38c4</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_nrf5_v16.0.0%2Flib_bootloader_modules.html"&gt;bootloader and DFU modules&lt;/a&gt; from nRF5 SDK operate with three different types of update. Those are bootloader, SoftDevice and application. The placement of the application image is fixed for a given SoftDevice, see &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_nrf5_v16.0.0%2Flib_bootloader.html&amp;amp;anchor=lib_bootloader_memory"&gt;memory layout&lt;/a&gt;. A given update will be placed at the start address of the given range.&lt;/p&gt;
&lt;p&gt;The upgrade image itself is a pure binary, without the address information from the hex file. In addition there is an init packet containing some meta information about the upgrade, including type of update and image size, but not including the target location for the image. You gan get this meta information for a packet through the command &lt;code&gt;nrfutil pkg display packet.zip&lt;/code&gt;, where &lt;code&gt;packet.zip&lt;/code&gt; is the name of your DFU zip packet.&lt;/p&gt;
&lt;p&gt;You basically have two options. Either, provide an upgrade of the application, where your data is placed directly after the application and as such is part of the application image. Or, modify the bootloader to accept a fourth upgrade type for the data, with the required code, tests, tools upgrades (modifying nrfutil) etc. for ensuring a working solution, including mechanisms for placing the data in a location within the application area without overlap with the application itself.&lt;/p&gt;
&lt;p&gt;For using the existing solution with one application image, you could operate with separate hex files for the application and the data, ensure that the two don&amp;#39;t overlap, and use the &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fug_nrf_cltools%2FUG%2Fcltools%2Fnrf_mergehex.html"&gt;mergehex&lt;/a&gt; utility to combine those hex files into one appliation upgrade before creating the upgrade zip file with nrfutil.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flash data as hex with nrfutil</title><link>https://devzone.nordicsemi.com/thread/361750?ContentTypeID=1</link><pubDate>Tue, 05 Apr 2022 08:11:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a183ca2c-3a2a-4773-81a2-f25bc1b2708e</guid><dc:creator>raspet</dc:creator><description>&lt;p&gt;Hi!&lt;br /&gt;&lt;br /&gt;Thanks! I use the secure bootloader for uart provided with sdk 16.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;We would strongly prefer to be able to have the two hexes separate (at least as long as it is supported from nrfutil)&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flash data as hex with nrfutil</title><link>https://devzone.nordicsemi.com/thread/361619?ContentTypeID=1</link><pubDate>Mon, 04 Apr 2022 18:46:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b56d3e33-0cf8-4c4b-92d7-6405aab581a0</guid><dc:creator>mytzyiay</dc:creator><description>&lt;p&gt;&amp;gt;&amp;nbsp;&lt;span&gt;perhaps the second package has overwritten some parts of the original application&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Not sure about your particular bootloader, but the one that ships on the nRF52840 dongle keeps metadata about the last DFU image in its own storage area and it hashes that data at boot time:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/85378/nrf52840-dongle-bootloader-doesn-t-like-it-when-app-is-programmed-via-nrfjprog"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/85378/nrf52840-dongle-bootloader-doesn-t-like-it-when-app-is-programmed-via-nrfjprog&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;There may be assumptions baked into the bootloader code that everything needed by the application is contained in a single package file.&lt;/p&gt;
&lt;p&gt;I guess you don&amp;#39;t want to concatenate the two .hex files and flash a single package containing both?&amp;nbsp; It might be necessary to modify the stock bootloader to teach it how to manage the two package types.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>